Class xlifepp::subdivision::GeomFigureMesh#
-
template<class T_>
class GeomFigureMesh : public xlifepp::subdivision::SubdivisionMesh#
-
Inheritence diagram for xlifepp::subdivision::GeomFigureMesh:
Collaboration diagram for xlifepp::subdivision::GeomFigureMesh:
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.
-
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
-
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)#