Class xlifepp::subdivision::GeomFigureMesh#

template<class T_>
class GeomFigureMesh : public xlifepp::subdivision::SubdivisionMesh#

Inheritence diagram for xlifepp::subdivision::GeomFigureMesh:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="xlifepp::subdivision::CartesianMesh< Hexahedron >" tooltip="xlifepp::subdivision::CartesianMesh< Hexahedron >"] "9" [label="xlifepp::subdivision::CartesianMesh< Quadrangle >" tooltip="xlifepp::subdivision::CartesianMesh< Quadrangle >"] "30" [label="xlifepp::subdivision::GeomFigureMesh< Hexahedron >" tooltip="xlifepp::subdivision::GeomFigureMesh< Hexahedron >"] "31" [label="xlifepp::subdivision::GeomFigureMesh< Quadrangle >" tooltip="xlifepp::subdivision::GeomFigureMesh< Quadrangle >"] "32" [label="xlifepp::subdivision::GeomFigureMesh< Tetrahedron >" tooltip="xlifepp::subdivision::GeomFigureMesh< Tetrahedron >"] "33" [label="xlifepp::subdivision::GeomFigureMesh< Triangle >" tooltip="xlifepp::subdivision::GeomFigureMesh< Triangle >"] "17" [label="xlifepp::subdivision::SimplexMesh< Tetrahedron >" tooltip="xlifepp::subdivision::SimplexMesh< Tetrahedron >"] "23" [label="xlifepp::subdivision::SimplexMesh< Triangle >" tooltip="xlifepp::subdivision::SimplexMesh< Triangle >"] "3" [label="xlifepp::subdivision::CartesianMesh< T_ >" tooltip="xlifepp::subdivision::CartesianMesh< T_ >"] "1" [label="xlifepp::subdivision::GeomFigureMesh< T_ >" tooltip="xlifepp::subdivision::GeomFigureMesh< T_ >" fillcolor="#BFBFBF"] "5" [label="xlifepp::subdivision::HexahedronMesh" tooltip="xlifepp::subdivision::HexahedronMesh"] "10" [label="xlifepp::subdivision::QuadrangleMesh" tooltip="xlifepp::subdivision::QuadrangleMesh"] "16" [label="xlifepp::subdivision::SimplexMesh< T_ >" tooltip="xlifepp::subdivision::SimplexMesh< T_ >"] "2" [label="xlifepp::subdivision::SubdivisionMesh" tooltip="xlifepp::subdivision::SubdivisionMesh"] "11" [label="xlifepp::subdivision::SurfMeshQuaCone" tooltip="xlifepp::subdivision::SurfMeshQuaCone"] "12" [label="xlifepp::subdivision::SurfMeshQuaCube" tooltip="xlifepp::subdivision::SurfMeshQuaCube"] "13" [label="xlifepp::subdivision::SurfMeshQuaCylinder" tooltip="xlifepp::subdivision::SurfMeshQuaCylinder"] "14" [label="xlifepp::subdivision::SurfMeshQuaDisk" tooltip="xlifepp::subdivision::SurfMeshQuaDisk"] "15" [label="xlifepp::subdivision::SurfMeshQuaSet" tooltip="xlifepp::subdivision::SurfMeshQuaSet"] "25" [label="xlifepp::subdivision::SurfMeshTriCone" tooltip="xlifepp::subdivision::SurfMeshTriCone"] "26" [label="xlifepp::subdivision::SurfMeshTriCylinder" tooltip="xlifepp::subdivision::SurfMeshTriCylinder"] "27" [label="xlifepp::subdivision::SurfMeshTriDisk" tooltip="xlifepp::subdivision::SurfMeshTriDisk"] "28" [label="xlifepp::subdivision::SurfMeshTriSet" tooltip="xlifepp::subdivision::SurfMeshTriSet"] "29" [label="xlifepp::subdivision::SurfMeshTriSphere" tooltip="xlifepp::subdivision::SurfMeshTriSphere"] "18" [label="xlifepp::subdivision::TetrahedronMesh" tooltip="xlifepp::subdivision::TetrahedronMesh"] "24" [label="xlifepp::subdivision::TriangleMesh" tooltip="xlifepp::subdivision::TriangleMesh"] "6" [label="xlifepp::subdivision::VolMeshHexCone" tooltip="xlifepp::subdivision::VolMeshHexCone"] "7" [label="xlifepp::subdivision::VolMeshHexCube" tooltip="xlifepp::subdivision::VolMeshHexCube"] "8" [label="xlifepp::subdivision::VolMeshHexCylinder" tooltip="xlifepp::subdivision::VolMeshHexCylinder"] "19" [label="xlifepp::subdivision::VolMeshTetCone" tooltip="xlifepp::subdivision::VolMeshTetCone"] "20" [label="xlifepp::subdivision::VolMeshTetCube" tooltip="xlifepp::subdivision::VolMeshTetCube"] "21" [label="xlifepp::subdivision::VolMeshTetCylinder" tooltip="xlifepp::subdivision::VolMeshTetCylinder"] "22" [label="xlifepp::subdivision::VolMeshTetSphere" tooltip="xlifepp::subdivision::VolMeshTetSphere"] "4" -> "3" [dir=forward tooltip="template-instance"] "4" -> "30" [dir=forward tooltip="public-inheritance"] "9" -> "3" [dir=forward tooltip="template-instance"] "9" -> "31" [dir=forward tooltip="public-inheritance"] "30" -> "1" [dir=forward tooltip="template-instance"] "31" -> "1" [dir=forward tooltip="template-instance"] "32" -> "1" [dir=forward tooltip="template-instance"] "33" -> "1" [dir=forward tooltip="template-instance"] "17" -> "16" [dir=forward tooltip="template-instance"] "17" -> "32" [dir=forward tooltip="public-inheritance"] "23" -> "16" [dir=forward tooltip="template-instance"] "23" -> "33" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] "10" -> "9" [dir=forward tooltip="public-inheritance"] "16" -> "1" [dir=forward tooltip="public-inheritance"] "11" -> "10" [dir=forward tooltip="public-inheritance"] "12" -> "10" [dir=forward tooltip="public-inheritance"] "13" -> "10" [dir=forward tooltip="public-inheritance"] "14" -> "10" [dir=forward tooltip="public-inheritance"] "15" -> "10" [dir=forward tooltip="public-inheritance"] "25" -> "24" [dir=forward tooltip="public-inheritance"] "26" -> "24" [dir=forward tooltip="public-inheritance"] "27" -> "24" [dir=forward tooltip="public-inheritance"] "28" -> "24" [dir=forward tooltip="public-inheritance"] "29" -> "24" [dir=forward tooltip="public-inheritance"] "18" -> "17" [dir=forward tooltip="public-inheritance"] "24" -> "23" [dir=forward tooltip="public-inheritance"] "6" -> "5" [dir=forward tooltip="public-inheritance"] "7" -> "5" [dir=forward tooltip="public-inheritance"] "8" -> "5" [dir=forward tooltip="public-inheritance"] "19" -> "18" [dir=forward tooltip="public-inheritance"] "20" -> "18" [dir=forward tooltip="public-inheritance"] "21" -> "18" [dir=forward tooltip="public-inheritance"] "22" -> "18" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::subdivision::GeomFigureMesh:

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

Subclassed by xlifepp::subdivision::CartesianMesh< T_ >, xlifepp::subdivision::SimplexMesh< T_ >

Public Functions

inline GeomFigureMesh(const number_t nbsubdiv, const number_t order, const number_t type, const number_t minVertexNum, const number_t minElementNum, const number_t tnbVpEl, const number_t nbVpEl, const number_t nbEpEl, const number_t nbFpEl, const number_t subF)#

main constructor

std::pair<std::vector<number_t>, std::vector<number_t>> edgeElementsIn(const topologicalArea TA, const number_t num = 0) const#

returns the list of edges of the elements of the mesh belonging to an area of kind TA or belonging to any area of this kind if num=0.

Returns the list of edges of the elements of the mesh belonging to an area num of kind TA or belonging to any area of this kind if num=0.

Each edge is defined by a pair of the form (element number, local edge number)

Each edge is defined by a pair of the form (nelem[i], nedge[i]) where . nelem[i] is the number of the element (>=minElementNum_) the edge belongs to. . nedge[i] is the local number of the edge in the element (from 1 to nb_edges_by_element_) These numbers are stored in two separate vectors nelem and nedge, with the same length, grouped as a pair returned by the function. -> The core of the algorithm is the same in rk_edgesIn. Nota: If TA is an interface, the result consists in fact in two lists, since each segment of the interface belongs to 2 elements. The two lists are intermixed, except when there are only two subdomains, in which case, due to the construction algorithm, the first half of the elements belong to one subdomain and the second half of the elements belong to the other subdomain. If needed, the two lists should be separated using geometric computations.

std::vector<pair_nn> edgesIn(const topologicalArea TA, const number_t num = 0) const#

returns the list of edges of the mesh belonging to an area of kind TA or belonging to any area of this kind if num=0 (given by their number)

Returns the list of edges of a triangle mesh belonging to an area num of kind TA or belonging to any area of this kind if num=0.

Edges are defined by the number of their vertices (starting from minVertexNum_).

virtual std::vector<number_t> element(const number_t num) const#

returns the list of all the vertices of element num, each given by its number, with num such that minElementNum_ <= num <= numberOfElements+minElementNum_-1

Returns the list of all the vertices of the element num, with minElementNum_ <= num <= numberOfElements+minElementNum_-1.

Each vertex is given by its number, which is >= minVertexNum_.

virtual std::vector<number_t> elementsIn(const topologicalArea TA, const number_t num = 0) const#

returns the list of elements of the mesh belonging to an area of kind TA or belonging to any area of kind TA if num=0 (given by their number)

Returns the list of elements of the mesh belonging to an area of kind TA or belonging to any area of kind TA if num=0.

The elements are given by their number in the whole set of elements of the mesh.

std::pair<std::vector<number_t>, std::vector<number_t>> faceElementsIn(const topologicalArea TA, const number_t num = 0) const#

returns the list of faces of the elements of the mesh belonging to an area of kind TA or belonging to any area of this kind if num=0.

Returns the list of faces of the elements of the mesh belonging to an area num of kind TA or belonging to any area of this kind if num=0.

Each face is defined by a pair of the form (element number, local face number)

Each face is defined by a pair of the form (nelem[i], nface[i]) where . nelem[i] is the number of the element (>=minElementNum_) the face belongs to, . nface[i] is the local number of the face in the element (from 1 to nb_faces_by_element_). These numbers are stored in two separate vectors nelem and nface, with the same length, grouped as a pair returned by the function. -> The core of the algorithm is the same in rk_facesIn. Nota: If TA is an interface, the result consists in fact in two lists, since each 2D element of the interface belongs to two 3D elements. The two lists are intermixed, except when there are only two subdomains, in which case, due to the construction algorithm, the first half of the elements belong to one subdomain and the second half of the elements belong to the other subdomain. If needed, the two lists should be separated using geometric computations.

virtual std::vector<real_t> faceExtNormalVec(const number_t num, const number_t i) const#

returns a normal vector to the face number i >= 1 of element num, with num such that minElementNum_ <= num <= numberOfElements+minElementNum_-1 The vector is not normalized and is oriented towards the exterior of the element.

virtual int faceOrientation(const number_t num, const number_t i) const#

returns the orientation of the face number i >= 1 of element num, with num such that minElementNum_ <= num <= numberOfElements+minElementNum_-1.

The function:

  • returns 1 if the first three vertices (i,j,k) of the face define a vector ij x ik oriented towards the exterior of the element,

  • returns -1 otherwise.

std::vector<std::vector<number_t>> facesIn(const topologicalArea TA, const number_t num = 0) const#

returns the list of faces of the mesh belonging to a boundary or belonging to any boundary if numBoundary=0 (given by their number)

Returns the list of faces of a mesh belonging to an area num of kind TA or belonging to any area of this kind if num=0.

Faces are defined by the number of their vertices (starting from minVertexNum_).

map_set_vec facesInside() const#

returns the list of the internal faces of the mesh (given by their number)

Returns the list of faces of a mesh which are inside the boundaries.

Each face is defined by a pair of the form ( vertices, VnTnF ) where . vertices is a set of integers, corresponding to the numbers of the vertices defining the face, . VnTnF is a vector of two pairs of the form (nelem, nface) corresponding to the two elements sharing the face, where . nelem is the number (>=1) of one of the two elements the face belongs to, . nface is the local number of the face in this element (from 1 to nb_faces_by_element_).

refnum_t locCode(const number_t num) const#

returns the localization code of the element num, with num such that minElementNum_ <= num <= numberOfElements+minElementNum_-1

returns the localization code of the element num, with num such that minElementNum_ <= num <= numberOfElements+minElementNum_-1 The code is computed from those of its main vertices.

The function returns the localization code of the domain the element belongs to.

number_t numberOfEdgesIn(const topologicalArea TA, const number_t num = 0) const#

returns the number of edges belonging to an area of kind TA or belonging to any area of this kind if num=0.

Returns the number of edges belonging to an area num of kind TA or belonging to any area of this kind if num=0.

inline virtual number_t numberOfElements() const#

returns the number of elements in the mesh

number_t numberOfFacesIn(const topologicalArea TA, const number_t num = 0) const#

returns the number of faces belonging to an area of kind TA or belonging to any area of this kind if num=0

Returns the number of faces belonging to an area num of kind TA or belonging to any area of this kind if num=0.

number_t numberOfFacesInside() const#

returns the number of the internal faces of the mesh

Returns the number of the internal faces of the mesh.

inline number_t numberOfMainVerticesByElement() const#

returns the number of vertices of order 1 per element

inline virtual number_t numberOfVerticesByElement() const#

returns the total number of vertices of each element (equals listT_[0].numberOfVertices()) This value is checked in the constructor for each element in listT_.

For a simplex, equals C_{k+n}^n with k=order_ and n=”number of main vertices by element minus 1” For a triangle, this value equals C_{k+2}^2 = (k+1)(k+2)/2. For a tetrahedron, this value equals C_{k+3}^3 = (k+1)(k+2)(k+3)/6. For a hexahedron, this value equals (k+1)^3.

virtual void print(std::ostream &os) const#

prints, on stream os, the mesh with vertices numbers

Prints, on stream os, the definition of a mesh.

virtual void printall(std::ostream &os) const#

prints, on stream os, the mesh with vertices coordinates

Prints, on stream os, the definition of a mesh with vertices coordinates.

virtual void printTeX(std::ostream &ftex, const float psi = -30, const float theta = 25, const number_t nbviews = 1, const std::string &DimProj = "4cm,orthogonal", const bool withInterface = true, const bool withElems = false) const#

prints, on stream ftex, fig4tex instructions to draw a mesh with observation direction defined by longitude psi and latitude theta

Prints, on stream ftex, Fig4TeX instructions to draw a mesh.

The observation direction is defined by the longitude Psi and the latitude Theta, given in degrees. nbviews figures are drawn, all with the same latitude, the longitude varying by a 360/nbviews increment.

virtual void printTeXNumberConvention(std::ostream&) const = 0#

prints, on stream ftex, Fig4TeX instructions to draw the numbering convention for a element mesh of order k