Class xlifepp::subdivision::VolMeshTetSphere#
-
class VolMeshTetSphere : public xlifepp::subdivision::TetrahedronMesh#
-
Inheritence diagram for xlifepp::subdivision::VolMeshTetSphere:
Collaboration diagram for xlifepp::subdivision::VolMeshTetSphere:
Public Functions
-
VolMeshTetSphere(const std::vector<std::pair<real_t, dimen_t>> &rots, const int nboctants, const number_t nbsubdiv = 0, const number_t order = 1, const number_t type = 1, const real_t radius = 1., const Point Center = Point(0, 0, 0), const number_t minVertexNum = 1, const number_t minElementNum = 1)#
-
main constructor
Build a mesh of tetrahedrons by successive subdivisions.
- Parameters:
-
rots – rotations to be applied to the sphere to get its final position. Each rotation, if any, is defined by an angle in degrees and the number of the absolute axis (1, 2 or 3) around which the rotation is made. Each rotation is applied in turn to the sphere starting from the canonical initial position where the sphere is centered at the origin and its local axes are parallel to the absolute axes.
nboctants – number of octants to be filled nboctants may take a value in [1, 8]. For the half-sphere and the sphere, when a spherical subdivision is requested (argument type different from 0, see below), the initial mesh may consist of one single tetrahedron instead of respectively 4 and 8 tetrahedrons, which reduces the number of tetrahedrons of the final mesh by a factor 4 and 8 respectively. In order to activate this behaviour, nboctants must take the value -4 and -8 respectively.
nbsubdiv – subdivision level (0 by default) nbsubdiv = 0 corresponds to the initial mesh. For nbsubdiv > 0, each tetrahedron is subdivided into 8 tetrahedrons with the same orientation as the original one: if the first tetrahedron is (1,2,3,4), the vectors 12x13, 41x43, 43x42 and 42x41 define the exterior normals to the faces.
order – order of the tetrahedra in the final mesh (1 by default) The default value is 1, which leads to a P1 mesh, in which case each tetrahedron is defined by its 4 vertices. For higher orders, the supplemental vertices correspond to the regular Lagrange mesh. Moreover, if the second argument (type) is non 0, the vertices belonging to the appropriate boundary lie on the sphere. See below the two possible ways to compute these vertices.
type – type of the subdivision (1 by default) . if type = 0, the algorithm leads to a simple (flat) subdivision of the initial mesh where new vertices are all the midpoints of the edges. . if type = 1, the algorithm leads to a subdivision where the vertices belonging to a prescribed boundary are computed so that they lie on the sphere ; they are computed as the radial projections of the vertices of the Lagrange mesh of order k over the triangular chord face.
radius – radius of the sphere (1. by default)
Center – center of the sphere ((0,0,0) by default)
minVertexNum – minimum number associated to the vertices of the mesh (1 by default)
minElementNum – minimum number associated to the elements of the mesh (1 by default)
-
void statistics(std::ostream &os) const#
-
prints, on stream os, some statistics about the mesh
Prints, on stream os, some statistics about a tetrahedron mesh.
-
VolMeshTetSphere(const std::vector<std::pair<real_t, dimen_t>> &rots, const int nboctants, const number_t nbsubdiv = 0, const number_t order = 1, const number_t type = 1, const real_t radius = 1., const Point Center = Point(0, 0, 0), const number_t minVertexNum = 1, const number_t minElementNum = 1)#