Class xlifepp::GeomElement#

class GeomElement#

Collaboration diagram for xlifepp::GeomElement:

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

object represents the geometric support of mesh elements.

It either a plain element or a side element (side of a GeomElement).

  • when it is a plain element, there is always a MeshElement associated to its but no parentSides

  • when it is a side element, there is at least a parent (parentSides is not empty) and by default no MeshElement, but if required, MeshElement may be constructed (buildSideMeshElement)

Public Functions

GeomElement(const GeomElement&)#

copy constructor

GeomElement(const Mesh*, const RefElement*, dimen_t, number_t)#

construct a plain element from Mesh, ReferenceElement and space dimension

inline GeomElement(const Mesh *m = nullptr, number_t n = 0)#

basic constructor

GeomElement(GeomElement*, number_t, number_t)#

construct a side element from GeomElement parent and side number

inline ~GeomElement()#

destructor

MeshElement *buildSideMeshElement() const#

create a MeshElement object when element it a side element (not automatic)

Point center() const#

compute the center of element

centroid of element (computed if not available)

inline void clearGeomMapData()#

clear geometric map data (i.e geoMapData object)

bool contains(const std::vector<real_t>&)#

true if point p as vector belongs to element

void deleteMeshElement()#

destroy meshElement information

const Point &edgeVertex(number_t i, number_t e) const#

return the ith vertex of edge e>=1 (i=1,…) (side in 2D, side of side in 3D)

dimen_t elementDim() const#

return dimension of the element

GeoNumPair elementSharingSide(number_t s) const#

if exists, return the side element associated to side s>=1 else return 0

return the adjacent element by side s as a pair of (GeomElement*, number_t)

std::vector<GeoNumPair> elementsSharingSideOfSide(number_t s, bool o = false) const#

return the list of adjacent elements by side of side s

std::vector<GeoNumPair> elementsSharingVertex(number_t v, bool o = false) const#

return the list of adjacent elements by vertex v

string_t encodeElement(number_t s = 0, number_t ss = 0) const#

string key of element or side element or side of side element from ascending vertex numbers

string_t encodeElementNodes(number_t s = 0) const#

string key of element or side element from ascending node numbers

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

return geomrefelement if i=0 else geomrefelement of side i

inline bool hasMeshElement() const#

true if it handles a MeshElement structure

inline bool isSideElement() const#

true if it is a side element

real_t measure(const number_t sideNo = 0) const#

return measure of element if side_no = 0, measure of side number side_no > 0

MeshElement *meshElement()#

return meshElement_p if not null (non const) else error

const MeshElement *meshElement() const#

return meshElement_p if not null else error

inline const Mesh *&meshP()#

return mesh pointer

inline const Mesh *meshP() const#

return mesh pointer

number_t nodeNumber(number_t i) const#

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

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

return the global numbers of nodes if s=0, of side s else

const std::vector<real_t> &normalVector() const#

return normal vector to element according to orientation

return outward normal vector on element

std::vector<real_t> normalVector(number_t s) const#

return outward normal vector on side s>0 (not normalized) or normal to element when s=0

return outward normal vector on side

inline number_t &number()#

returns element number (writable)

inline number_t number() const#

returns element number

number_t numberOfNodes() const#

returns number of nodes of element

inline number_t numberOfParents() const#

number of parents of side element

number_t numberOfSideOfSides() const#

returns number of edges (edges in 3D)

number_t numberOfSides() const#

returns number of sides (faces in 3D, edges in 2D)

number_t numberOfVertices() const#

returns number of vertices of element

GeomElement &operator=(const GeomElement&)#

assign operator

const GeomElement *parent(number_t i = 0) const#

return i-th parent (no check)

const GeomElement *parentInDomain(const MeshDomain*) const#

look for a parent in a domain (if exists return the first one)

const GeoNumPair parentSide(number_t i) const#

return i-th parent and its side (no check)

inline std::vector<GeoNumPair> &parentSides()#

access to parentSides_

inline const std::vector<GeoNumPair> &parentSides() const#

access to parentSides_ (const)

void print(std::ostream&) const#

print geomelement characteristics

void printVertices(std::ostream&, IOFormat f = _undefFormat) const#

print vertices in default format, raw format and matlab format

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

projection of a point onto element

const RefElement *refElement(number_t i = 0) const#

return reference element if i=0 else ref element of side i

ShapeType shapeType(number_t i = 0) const#

return the shape type of element (i=0) and its sides (_segment, _triangle, …)

const Point &sideOfSideVertex(number_t i, number_t ss) const#

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

real_t size() const#

return measure of element if side_no = 0, measure of side number side_no > 0

characteristic size of element (computed if not available)

dimen_t spaceDim() const#

return space dimension, i.e nodes dimension

std::vector<GeomElement*> splitP1() const#

split element in first order elements and return as a list

std::vector<real_t> tangentVector(number_t) const#

return tangent vector on an edge (not normalized)

return outward normal vector on side

const Point &vertex(number_t i, number_t s = 0) const#

return the ith vertex of element or side s (i=1,…)

number_t vertexNumber(number_t i) const#

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

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

return the global numbers of vertices if s=0, of side s else

Public Members

mutable real_t color#

useful to mark an element (default = 0)

number_t domainId#

domain id (default=0)

mutable real_t flag#

useful to mark an element in internal process (default = 0)

number_t materialId#

material id (default= 0)

real_t phi#

angle to describe local curvature (phi in x-z plane), default 0

real_t theta#

angle to describe local curvature (theta in x-y plane), default 0

mutable GeomElement *twin_p#

twin geomElement in case of geomElement on an interface

mutable void *userData_p#

a free pointer allowing users to attach data of any type to the Element (casting and memory management are the responsability of the users)

mutable std::vector<void*> userData_ps#

a free void pointer vector to attach data of any type to the Element (useful when mutiltithreading)

Friends

friend std::ostream &operator<<(std::ostream&, const GeomElement&)#

outputs geomelement characteristics