Class xlifepp::MeshElement#

class MeshElement#

Collaboration diagram for xlifepp::MeshElement:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "26" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"] "23" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "8" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "32" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "41" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"] "61" [label="std::list< std::vector< PolynomialT< real_t > > >" tooltip="std::list< std::vector< PolynomialT< real_t > > >"] "19" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"] "17" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"] "40" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "49" [label="std::map< xlifepp::GeomElement *, std::set< number_t > >" tooltip="std::map< xlifepp::GeomElement *, std::set< number_t > >"] "43" [label="std::map< xlifepp::Quadrature *, std::vector< xlifepp::Point > >" tooltip="std::map< xlifepp::Quadrature *, std::vector< xlifepp::Point > >"] "63" [label="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >" tooltip="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >"] "42" [label="std::list< T >" tooltip="std::list< T >"] "18" [label="std::map< K, T >" tooltip="std::map< K, T >"] "3" [label="std::vector< T >" tooltip="std::vector< T >"] "29" [label="std::vector< T >" tooltip="std::vector< T >"] "10" [label="std::vector< K >" tooltip="std::vector< K >"] "14" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"] "53" [label="std::vector< ShapeType >" tooltip="std::vector< ShapeType >"] "48" [label="std::vector< const xlifepp::GeomDomain * >" tooltip="std::vector< const xlifepp::GeomDomain * >"] "25" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "4" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "5" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "37" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"] "20" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "54" [label="std::vector< std::vector< number_t > >" tooltip="std::vector< std::vector< number_t > >"] "50" [label="std::vector< std::vector< real_t > >" tooltip="std::vector< std::vector< real_t > >"] "27" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "36" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"] "35" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"] "55" [label="std::vector< xlifepp::GeomRefElement * >" tooltip="std::vector< xlifepp::GeomRefElement * >"] "57" [label="std::vector< xlifepp::Interpolation * >" tooltip="std::vector< xlifepp::Interpolation * >"] "39" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "2" [label="std::vector< xlifepp::Point * >" tooltip="std::vector< xlifepp::Point * >"] "16" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"] "62" [label="std::vector< xlifepp::PolynomialsBasisT >" tooltip="std::vector< xlifepp::PolynomialsBasisT >"] "58" [label="std::vector< xlifepp::RefDof * >" tooltip="std::vector< xlifepp::RefDof * >"] "59" [label="std::vector< xlifepp::RefElement * >" tooltip="std::vector< xlifepp::RefElement * >"] "30" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"] "33" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "13" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"] "28" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"] "47" [label="xlifepp::DomainInfo" tooltip="xlifepp::DomainInfo"] "45" [label="xlifepp::Extension" tooltip="xlifepp::Extension"] "44" [label="xlifepp::ExtensionData" tooltip="xlifepp::ExtensionData"] "21" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"] "31" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"] "46" [label="xlifepp::GeomDomain" tooltip="xlifepp::GeomDomain"] "7" [label="xlifepp::GeomMapData" tooltip="xlifepp::GeomMapData"] "52" [label="xlifepp::GeomRefElement" tooltip="xlifepp::GeomRefElement"] "12" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "56" [label="xlifepp::Interpolation" tooltip="xlifepp::Interpolation"] "24" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "34" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh"] "1" [label="xlifepp::MeshElement" tooltip="xlifepp::MeshElement" fillcolor="#BFBFBF"] "15" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"] "38" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "11" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"] "6" [label="xlifepp::Point" tooltip="xlifepp::Point"] "60" [label="xlifepp::PolynomialsBasisT< K >" tooltip="xlifepp::PolynomialsBasisT< K >"] "51" [label="xlifepp::RefElement" tooltip="xlifepp::RefElement"] "22" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"] "9" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "26" -> "27" [dir=forward tooltip="public-inheritance"] "26" -> "28" [dir=forward tooltip="template-instance"] "23" -> "5" [dir=forward tooltip="public-inheritance"] "23" -> "24" [dir=forward tooltip="template-instance"] "8" -> "5" [dir=forward tooltip="public-inheritance"] "8" -> "9" [dir=forward tooltip="template-instance"] "32" -> "33" [dir=forward tooltip="public-inheritance"] "32" -> "9" [dir=forward tooltip="template-instance"] "41" -> "42" [dir=forward tooltip="template-instance"] "61" -> "42" [dir=forward tooltip="template-instance"] "19" -> "18" [dir=forward tooltip="template-instance"] "17" -> "18" [dir=forward tooltip="template-instance"] "40" -> "18" [dir=forward tooltip="template-instance"] "49" -> "18" [dir=forward tooltip="template-instance"] "43" -> "18" [dir=forward tooltip="template-instance"] "63" -> "18" [dir=forward tooltip="template-instance"] "10" -> "3" [dir=forward tooltip="template-instance"] "14" -> "3" [dir=forward tooltip="template-instance"] "53" -> "3" [dir=forward tooltip="template-instance"] "48" -> "3" [dir=forward tooltip="template-instance"] "25" -> "3" [dir=forward tooltip="template-instance"] "4" -> "3" [dir=forward tooltip="template-instance"] "5" -> "3" [dir=forward tooltip="template-instance"] "37" -> "3" [dir=forward tooltip="template-instance"] "20" -> "3" [dir=forward tooltip="template-instance"] "54" -> "3" [dir=forward tooltip="template-instance"] "50" -> "3" [dir=forward tooltip="template-instance"] "27" -> "3" [dir=forward tooltip="template-instance"] "36" -> "3" [dir=forward tooltip="template-instance"] "35" -> "3" [dir=forward tooltip="template-instance"] "55" -> "3" [dir=forward tooltip="template-instance"] "57" -> "3" [dir=forward tooltip="template-instance"] "39" -> "3" [dir=forward tooltip="template-instance"] "2" -> "3" [dir=forward tooltip="template-instance"] "16" -> "3" [dir=forward tooltip="template-instance"] "62" -> "3" [dir=forward tooltip="template-instance"] "58" -> "3" [dir=forward tooltip="template-instance"] "59" -> "3" [dir=forward tooltip="template-instance"] "30" -> "3" [dir=forward tooltip="template-instance"] "33" -> "3" [dir=forward tooltip="template-instance"] "13" -> "14" [dir=forward tooltip="usage"] "28" -> "29" [dir=forward tooltip="public-inheritance"] "47" -> "34" [dir=forward tooltip="usage"] "45" -> "46" [dir=forward tooltip="usage"] "45" -> "49" [dir=forward tooltip="usage"] "44" -> "45" [dir=forward tooltip="usage"] "44" -> "5" [dir=forward tooltip="usage"] "44" -> "50" [dir=forward tooltip="usage"] "44" -> "16" [dir=forward tooltip="usage"] "21" -> "22" [dir=forward tooltip="usage"] "21" -> "26" [dir=forward tooltip="usage"] "21" -> "4" [dir=forward tooltip="usage"] "21" -> "5" [dir=forward tooltip="usage"] "21" -> "8" [dir=forward tooltip="usage"] "21" -> "30" [dir=forward tooltip="usage"] "21" -> "6" [dir=forward tooltip="usage"] "31" -> "31" [dir=forward tooltip="usage"] "31" -> "12" [dir=forward tooltip="usage"] "46" -> "47" [dir=forward tooltip="usage"] "46" -> "46" [dir=forward tooltip="usage"] "46" -> "12" [dir=forward tooltip="usage"] "46" -> "48" [dir=forward tooltip="usage"] "7" -> "1" [dir=forward tooltip="usage"] "7" -> "6" [dir=forward tooltip="usage"] "7" -> "8" [dir=forward tooltip="usage"] "7" -> "11" [dir=forward tooltip="usage"] "7" -> "43" [dir=forward tooltip="usage"] "7" -> "44" [dir=forward tooltip="usage"] "7" -> "33" [dir=forward tooltip="usage"] "52" -> "5" [dir=forward tooltip="usage"] "52" -> "53" [dir=forward tooltip="usage"] "52" -> "54" [dir=forward tooltip="usage"] "52" -> "20" [dir=forward tooltip="usage"] "52" -> "55" [dir=forward tooltip="usage"] "12" -> "13" [dir=forward tooltip="usage"] "12" -> "15" [dir=forward tooltip="usage"] "12" -> "17" [dir=forward tooltip="usage"] "12" -> "19" [dir=forward tooltip="usage"] "12" -> "20" [dir=forward tooltip="usage"] "12" -> "21" [dir=forward tooltip="usage"] "12" -> "11" [dir=forward tooltip="usage"] "12" -> "12" [dir=forward tooltip="usage"] "12" -> "31" [dir=forward tooltip="usage"] "56" -> "57" [dir=forward tooltip="usage"] "24" -> "10" [dir=forward tooltip="public-inheritance"] "34" -> "12" [dir=forward tooltip="usage"] "34" -> "16" [dir=forward tooltip="usage"] "34" -> "35" [dir=forward tooltip="usage"] "34" -> "36" [dir=forward tooltip="usage"] "34" -> "4" [dir=forward tooltip="usage"] "34" -> "37" [dir=forward tooltip="usage"] "34" -> "34" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "4" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] "1" -> "6" [dir=forward tooltip="usage"] "1" -> "7" [dir=forward tooltip="usage"] "1" -> "1" [dir=forward tooltip="usage"] "1" -> "51" [dir=forward tooltip="usage"] "15" -> "16" [dir=forward tooltip="usage"] "38" -> "39" [dir=forward tooltip="usage"] "38" -> "40" [dir=forward tooltip="usage"] "11" -> "12" [dir=forward tooltip="usage"] "11" -> "8" [dir=forward tooltip="usage"] "11" -> "32" [dir=forward tooltip="usage"] "11" -> "34" [dir=forward tooltip="usage"] "11" -> "38" [dir=forward tooltip="usage"] "11" -> "41" [dir=forward tooltip="usage"] "6" -> "5" [dir=forward tooltip="public-inheritance"] "60" -> "61" [dir=forward tooltip="public-inheritance"] "51" -> "52" [dir=forward tooltip="usage"] "51" -> "56" [dir=forward tooltip="usage"] "51" -> "58" [dir=forward tooltip="usage"] "51" -> "59" [dir=forward tooltip="usage"] "51" -> "54" [dir=forward tooltip="usage"] "51" -> "60" [dir=forward tooltip="usage"] "51" -> "62" [dir=forward tooltip="usage"] "51" -> "63" [dir=forward tooltip="usage"] "22" -> "23" [dir=forward tooltip="usage"] "22" -> "8" [dir=forward tooltip="usage"] "22" -> "25" [dir=forward tooltip="usage"] "9" -> "10" [dir=forward tooltip="public-inheritance"] }

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 dimen_t elementDim() const#

return space dimension of element

inline const GeomRefElement *geomRefElement(number_t i = 0) const#

return geometric reference element if i=0 else geomrefelement of side i

inline number_t &index()#

return element index

inline number_t index() const#

return element index

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

inline Point &node(number_t i) const#

return the node i (i=1,…)

inline number_t nodeNumber(number_t i) const#

return the global number of node i (i=1,…)

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

inline number_t numberOfNodes() const#

returns number of nodes

inline number_t numberOfSideOfSides() const#

returns number of sides of sides

inline number_t numberOfSides() const#

returns number of sides

inline number_t numberOfVertices() const#

returns number of vertices

inline number_t order() const#

return order of Lagrange interpolation

void print(std::ostream&) const#

print utility

Point projection(const std::vector<real_t>&, real_t&) const#

projection of a point onto meshelement

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, …)

inline dimen_t spaceDim() const#

return space dimension

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 Point &vertex(number_t i) const#

return the vertex i (i=1,…)

inline number_t vertexNumber(number_t i) const#

return the global number of vertex i (i=1,…)

inline const Point &vertexOnSide(number_t i, number_t s) const#

return the vertex i (i=1,…) on side s

inline const Point &vertexOnSideOfSide(number_t i, number_t ss) const#

return the vertex i (i=1,…) on side of side ss

inline const Point &vertexOppositeToSide(number_t s) const#

return a vertex opposite to side s

std::vector<number_t> verticesNumbers(number_t s = 0) const#

return the global numbers of vertices of element (s=0), of side s>0

Public Members

Point centroid#

centroid of the element, set by computeMeasures

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)

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