#include <meshImport3D.hh>
Classes | |
class | NodeCell |
class | NodeHexahedron |
class | NodeTetrahedron |
Public Member Functions | |
Import3dMesh (const std::string coord, const std::string elms, const std::string boundary, const uint idxStart=1, const bool leftHand=false, const uint elmtyp=0) | |
virtual uint | ncell () const |
Returns the number of cells in the mesh. | |
virtual Scan3 * | scan () |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. | |
Imports 3D mesh with tetrahedra and hexahedra. They can be mixed in the mesh—the only problem is, that tetrahedra and hexahedra cannot connect to each other, but this importer can be enhanced to support prisms or pyramids as well.
The notation for the meshes is used in [1] for instance.
Definition at line 94 of file meshImport3D.hh.
concepts::Import3dMesh::Import3dMesh | ( | const std::string | coord, |
const std::string | elms, | ||
const std::string | boundary, | ||
const uint | idxStart = 1 , |
||
const bool | leftHand = false , |
||
const uint | elmtyp = 0 |
||
) |
Constructor. Reads the data from three files and creates a mesh from it. The vertices, faces and cells should be number in striclty increasing order, ie. 1, 2, 3 etc.
coord | File with coordinates of vertices. Format: <node> <x> <y> <z>For instance: 1 1.0 1.0 2.0 2 0.0 0.5 1.0 3 0.0 0.0 0.0 4 -1.0 2.0 3.0 |
elms | File with node numbers of tetrahedra or hexahedra. Format: <tetrahedron> <node0> <node1> <node2> <node3>or <hexahedron> <node0> <node1> <node2> <node3> <node4> <node5> <node6> <node7>For instance: 1 1 2 3 4or 1 1 2 3 4 5 6 7 8 |
boundary | File with node numbers of edges with boundary conditions and attribute number. Format for a triangle: <face> <node0> <node1> <node2> <attr>Format for a quad: <face> <node0> <node1> <node2> <node3> <attr>Format for an edge: <edge> <node0> <node1> <attr>Format for a vertex: <vtx> <node> <attr>For instance: 1 2 33 2 1 2 66 3 1 2 3 44 4 1 2 3 4 55Vertices should come first in the list of boundary attributes, then edges and triangle or quads last. |
idxStart | Starting point of indices in the files (1 or 0) |
leftHand | Indicates if the order of the points in a tet follow the left hand rule |
elmtyp | only for hexahedras (0: Hexahedron3d is used, 1: Parallelepiped3d is used) |
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::Mesh.
Returns the number of cells in the mesh.
Implements concepts::Mesh.
Definition at line 140 of file meshImport3D.hh.
Returns a scanner over the cells of the mesh.
Implements concepts::Mesh3.
Definition at line 141 of file meshImport3D.hh.