Class xlifepp::MeshElement#
-
class MeshElement#
-
object represents the geometric support of a mesh element.
It mainly stores global numberings of element
Public Functions
-
MeshElement()#
-
default constructor
-
MeshElement(const MeshElement&)#
-
copy constructor
-
MeshElement(const RefElement*, dimen_t, number_t)#
-
constructor of plain element from ReferenceElement and space dimension
-
~MeshElement()#
-
destructor
-
Point center() const#
-
compute the center of element
return the center of element based on vertices: sum_i vertex(i) / nb_vertex
-
real_t characteristicSize() const#
-
compute a characteristic size of element (diameter of the circumscribed ball or max of length of edges)
-
bool checkLinearMap() const#
-
check if linear map is available
-
inline void clearGeomMapData()#
-
clear geometric map data (i.e geoMapData object)
-
void computeMeasure()#
-
compute measure of element
-
void computeMeasureOfSides()#
-
compute measure sides of element
-
void computeMeasures()#
-
build the GeomMapData if not built
compute measure of element and its side
-
void computeOrientation()#
-
compute orientation of element: sign(det(jacobian))
-
bool contains(const std::vector<real_t>&)#
-
return true if mesh element contains a point given as Point or std::vector<real_t>
test if a point belongs to current mesh element if element is a simplex and is one order , we use the map from element to ref element else the element is split in P1 elements and test is performed on each P1 sub element The tolerance is chosen as size(element)/1000
-
inline const GeomRefElement *geomRefElement(number_t i = 0) const#
-
return geometric reference element if i=0 else geomrefelement of side i
-
inline bool isSimplex() const#
-
return true for a segment or triangle or tetrahedron
-
inline real_t measure(const number_t sideNo = 0) const#
-
return measure of element if side_no = 0, measure of side number side_no > 0
-
const std::vector<real_t> &normalVector() const#
-
return normal vector to element according to orientation
-
std::vector<real_t> normalVector(number_t s) const#
-
return outward normal vector on side s>0, if s=0 normal vector to element
return outward normal vector on side s (edge in 2D, face in 3D) normal is computed from vertices of side, exact only for 1 order element Is not normalized ! if s=0 return the normal to element using the jacobian and the orientation
-
void print(std::ostream&) const#
-
print utility
-
inline const RefElement *refElement(number_t i = 0) const#
-
return reference element if i=0 else refelement of side i
-
void setNodes(std::vector<Point>&)#
-
update node pointers vector from Mesh::nodes
-
inline ShapeType shapeType(number_t i = 0) const#
-
return the shape type of element (i=0) and its sides (_segment, _triangle, …)
-
std::vector<MeshElement*> splitP1() const#
-
split MeshElement in P1 (simplex and order 1) mesh elements
-
std::vector<real_t> tangentVector(number_t e) const#
-
return tangent vector on edge
return tangent vector on edge e (side in 2D, side on side in 3D) tangent vector is computed from vertices of edge, exact only for 1 order element
-
MeshElement *toP1() const#
-
associate a P1 meshelement to current (linearization)
associate a P1 meshelement to current (linearization), built from 2/3/4 first nodes
-
inline const Point &vertexOnSide(number_t i, number_t s) const#
-
return the vertex i (i=1,…) on side s
Public Members
-
const MeshElement *firstOrderParent_#
-
parent element when the current element is a first order element coming from an element of order>1
-
mutable GeomMapData *geomMapData_p#
-
useful data for geometric map (jacobian,…)
-
std::vector<Point*> isoNodes#
-
list of isoNodes (nodes in parameters domain) if required, default empty (deleted by destructor)
-
bool linearMap#
-
true if geometric map from ref element is linear (for instance first order simplicial element)
-
number_t mapIndex = 1#
-
parametrization index (MeshElement has to be map in the same parameters domain)
-
std::vector<real_t> measures#
-
length or area or volume of element and of its sides
-
mutable MeshElement *meltP1#
-
P1 related mesh element if curved mesh element (2/3/4 first nodes) else itself.
-
std::vector<number_t> nodeNumbers#
-
node numbers: a subset of Mesh::nodes (index starts from 1)
-
std::vector<Point*> nodes#
-
a subset of Mesh::nodes (direct access to nodes)
-
short int orientation#
-
element orientation (sign of jacobian determinant), 0 means unset orientation
-
std::vector<number_t> sideNumbers#
-
element side numbers: a subset of Mesh::sides_ (built if required)
-
std::vector<number_t> sideOfSideNumbers#
-
element side of side numbers: : a subset of Mesh::sideOfSides_ (built if required)
-
real_t size#
-
characteristic size of element, set by computeMeasures
-
std::vector<number_t> vertexNumbers#
-
vertexNumbers: a subset of Mesh::nodes (may be equal to nodeNumbers, index starts from 1))
Friends
-
friend std::ostream &operator<<(std::ostream&, const MeshElement&)#
-
prints characteristics and point numbers
-
MeshElement()#