Class xlifepp::subdivision::SurfMeshTriSet#

class SurfMeshTriSet : public xlifepp::subdivision::TriangleMesh#

Inheritence diagram for xlifepp::subdivision::SurfMeshTriSet:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="xlifepp::subdivision::GeomFigureMesh< Triangle >" tooltip="xlifepp::subdivision::GeomFigureMesh< Triangle >"] "3" [label="xlifepp::subdivision::SimplexMesh< Triangle >" tooltip="xlifepp::subdivision::SimplexMesh< Triangle >"] "6" [label="xlifepp::subdivision::GeomFigureMesh< T_ >" tooltip="xlifepp::subdivision::GeomFigureMesh< T_ >"] "8" [label="xlifepp::subdivision::GeomFigureMesh< T_ >" tooltip="xlifepp::subdivision::GeomFigureMesh< T_ >"] "7" [label="xlifepp::subdivision::SimplexMesh< T_ >" tooltip="xlifepp::subdivision::SimplexMesh< T_ >"] "5" [label="xlifepp::subdivision::SubdivisionMesh" tooltip="xlifepp::subdivision::SubdivisionMesh"] "1" [label="xlifepp::subdivision::SurfMeshTriSet" tooltip="xlifepp::subdivision::SurfMeshTriSet" fillcolor="#BFBFBF"] "2" [label="xlifepp::subdivision::TriangleMesh" tooltip="xlifepp::subdivision::TriangleMesh"] "4" -> "5" [dir=forward tooltip="public-inheritance"] "4" -> "6" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "3" -> "7" [dir=forward tooltip="template-instance"] "6" -> "5" [dir=forward tooltip="public-inheritance"] "8" -> "5" [dir=forward tooltip="public-inheritance"] "7" -> "8" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::subdivision::SurfMeshTriSet:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="xlifepp::subdivision::GeomFigureMesh< Triangle >" tooltip="xlifepp::subdivision::GeomFigureMesh< Triangle >"] "3" [label="xlifepp::subdivision::SimplexMesh< Triangle >" tooltip="xlifepp::subdivision::SimplexMesh< Triangle >"] "7" [label="std::basic_string< char >" tooltip="std::basic_string< char >"] "8" [label="std::basic_string< Char >" tooltip="std::basic_string< Char >"] "6" [label="std::string" tooltip="std::string"] "11" [label="std::vector< T >" tooltip="std::vector< T >"] "22" [label="std::vector< T_ >" tooltip="std::vector< T_ >"] "20" [label="std::vector< Triangle >" tooltip="std::vector< Triangle >"] "14" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "19" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "12" [label="std::vector< refnum_t >" tooltip="std::vector< refnum_t >"] "16" [label="std::vector< std::pair< xlifepp::subdivision::PatchGeometry *, refnum_t > >" tooltip="std::vector< std::pair< xlifepp::subdivision::PatchGeometry *, refnum_t > >"] "13" [label="std::vector< std::string >" tooltip="std::vector< std::string >"] "10" [label="std::vector< std::vector< number_t > >" tooltip="std::vector< std::vector< number_t > >"] "15" [label="std::vector< xlifepp::subdivision::PatchGeometry * >" tooltip="std::vector< xlifepp::subdivision::PatchGeometry * >"] "17" [label="std::vector< xlifepp::subdivision::Vertex >" tooltip="std::vector< xlifepp::subdivision::Vertex >"] "18" [label="xlifepp::Point" tooltip="xlifepp::Point"] "21" [label="xlifepp::subdivision::GeomFigureMesh< T_ >" tooltip="xlifepp::subdivision::GeomFigureMesh< T_ >"] "24" [label="xlifepp::subdivision::GeomFigureMesh< T_ >" tooltip="xlifepp::subdivision::GeomFigureMesh< T_ >"] "23" [label="xlifepp::subdivision::SimplexMesh< T_ >" tooltip="xlifepp::subdivision::SimplexMesh< T_ >"] "5" [label="xlifepp::subdivision::SubdivisionMesh" tooltip="xlifepp::subdivision::SubdivisionMesh"] "1" [label="xlifepp::subdivision::SurfMeshTriSet" tooltip="xlifepp::subdivision::SurfMeshTriSet" fillcolor="#BFBFBF"] "9" [label="xlifepp::subdivision::TopoGeom" tooltip="xlifepp::subdivision::TopoGeom"] "2" [label="xlifepp::subdivision::TriangleMesh" tooltip="xlifepp::subdivision::TriangleMesh"] "4" -> "5" [dir=forward tooltip="public-inheritance"] "4" -> "20" [dir=forward tooltip="usage"] "4" -> "21" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "3" -> "23" [dir=forward tooltip="template-instance"] "7" -> "8" [dir=forward tooltip="template-instance"] "6" -> "7" [dir=forward tooltip="public-inheritance"] "22" -> "11" [dir=forward tooltip="template-instance"] "20" -> "11" [dir=forward tooltip="template-instance"] "14" -> "11" [dir=forward tooltip="template-instance"] "19" -> "11" [dir=forward tooltip="template-instance"] "12" -> "11" [dir=forward tooltip="template-instance"] "16" -> "11" [dir=forward tooltip="template-instance"] "13" -> "11" [dir=forward tooltip="template-instance"] "10" -> "11" [dir=forward tooltip="template-instance"] "15" -> "11" [dir=forward tooltip="template-instance"] "17" -> "11" [dir=forward tooltip="template-instance"] "18" -> "19" [dir=forward tooltip="public-inheritance"] "21" -> "5" [dir=forward tooltip="public-inheritance"] "21" -> "22" [dir=forward tooltip="usage"] "24" -> "5" [dir=forward tooltip="public-inheritance"] "24" -> "22" [dir=forward tooltip="usage"] "23" -> "24" [dir=forward tooltip="public-inheritance"] "5" -> "6" [dir=forward tooltip="usage"] "5" -> "9" [dir=forward tooltip="usage"] "5" -> "17" [dir=forward tooltip="usage"] "5" -> "18" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "9" -> "10" [dir=forward tooltip="usage"] "9" -> "12" [dir=forward tooltip="usage"] "9" -> "13" [dir=forward tooltip="usage"] "9" -> "14" [dir=forward tooltip="usage"] "9" -> "15" [dir=forward tooltip="usage"] "9" -> "16" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="public-inheritance"] }

This class allows the construction of a surfacic mesh made of triangles.

It is built by successive subdivisions of an initial elementary mesh consisting of a set of triangles given by the user.

Public Functions

SurfMeshTriSet(const std::vector<Point> &pts, const std::vector<std::vector<number_t>> &tri, const std::vector<std::vector<number_t>> &bound, const number_t nbsubdiv = 0, const number_t order = 1, const number_t minElementNum = 1)#

main constructor

Build a mesh of triangles by successive subdivisions from an initial set of triangles.

Works in 2D and 3D.

Parameters:
  • pts – set of vertices of the initial triangulation. This vector should contain at least three points. They are implicitly numbered starting from 1.

  • tri – list of triangles of the initial triangulation. Each element of the vector is a triplet of numbers, each of them being the number of a vertex in the vector pts according to the implicit numbering starting from 1. Some points in the vector pts may not be referenced ; thus, only a subset of them may be used to define the initial triangulation.

  • bound – list of the boundaries of the domain. A boundary is defined by the list of the vertex numbers lying on it, in the initial triangulation ; no order is required. Several boundaries must be defined if, in the initial triangulation tri, there are internal edges whose vertices are both boundary vertices. In this case, the two vertices must belong to two different boundaries, otherwise the (internal) points created by the subdivision process along this edge would be considered as boundary vertices.

  • nbsubdiv – subdivision level (0 by default) nbsubdiv = 0 corresponds to the initial mesh. For nbsubdiv > 0, each triangle is subdivided into 4 triangles with the same orientation as the original one: if the first triangle is (1,2,3), the vectors 12x13 define the exterior normal to the face.

  • order – order of the triangles in the final mesh (1 by default) The default value is 1, which leads to a P1 mesh, in which case each triangle is defined by its 3 vertices. For higher orders, the supplemental vertices correspond to the regular Lagrange mesh.

  • minElementNum – minimum number associated to the elements of the mesh (1 by default)