Class xlifepp::Element#

class Element#

Collaboration diagram for xlifepp::Element:

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

defines data related to one finite element.

It is mainly defined from its geometric support (GeomElement) and its finite element interpolation defined by a RefElement It carries also its dof numbering relative to

Public Functions

Element(FeSpace*, number_t, RefElement*, GeomElement*, FeSubSpace* = nullptr)#

basic constructor

inline virtual ~Element()#

destructor (needs to be virtual)

Vector<real_t> computeNormalVector(const Point&) const#

compute normal vector at a physical point

compute normal vector at a physical point, force some recomputation

virtual ShapeValues computeShapeValues(const Point&, bool refPoint, bool der1, bool der2, Vector<real_t>* = nullptr) const#

compute shape values at a reference or physical point

compute shape values at a point in ref space (if refPoint is true) in physical space else if the sign_p pointer =0 then sign dofs vector is computed here if required else pointer is used

inline dimen_t dim() const#

dimension of node (space dimension)

inline dimen_t dimElt() const#

dimension of the element

inline dimen_t dimFun() const#

return dimension of shape functions

void dofsRenumbered(const std::vector<number_t>&, std::vector<FeDof>&)#

renumber dofs

inline number_t feOrder() const#

return FE numtype (order for Lagrange)

inline const FeSpace *feSpaceP() const#

pointer to Finite Element parent space

inline FEType feType() const#

return FE type ( _Lagrange, _Hermite, …)

Vector<real_t> &getDofSigns() const#

get dof sign correction for interpolation involving normal or tangential dofs (RT, Nedelec, …)

get dof signs, compute them if not computed

template<typename T>
T &interpolate(const Vector<T>&, const Point&, const std::vector<number_t>&, T&, DiffOpType = _id) const#

compute interpolated value at P, scalar to scalar and vector to vector cases

compute interpolated value at P from vector of dof coefficients in global numbering: vint = sum_i v(I) d_wi(P) i local dof number, I global dof number, say dofNumers(i) v: dof coefficients in global numbering of type K P: point in physical space where to interpolate d: differential operator: _id -> value, _dx -> first derivative of value, … vint: interpolated value of type T (returned) dofnum: numbering of element dofs relative to dof coefficients vector

Note: P has to belong to element (no test here), use MeshDomain::locate to find element containing a point

There are 4 cases: coefficient v and result vint are scalar (Lagrange scalar) coefficient v is scalar and result vint is vector (e.g edge element) coefficient v is vector and result vint is scalar (case of difop vector-> scalar, e.g div) coefficient v and result vint are vector (Lagrange vector) vint has to be of the right type !

Recall that shapevalues are always stored in a continuous vector

template<typename T>
Vector<T> &interpolate(const Vector<T>&, const Point&, const std::vector<number_t>&, Vector<T>&, DiffOpType = _id) const#

compute interpolated value at P, scalar to vector case

template<typename T>
T &interpolate(const Vector<Vector<T>>&, const Point&, const std::vector<number_t>&, T&, DiffOpType = _id) const#

compute interpolated value at P, vector to scalar case

template<typename T>
T &interpolate(const VectorEntry&, const Point&, const std::vector<number_t>&, T&, DiffOpType = _id) const#

compute interpolated at P

compute interpolated values at P, using VectorEntry Note: automatic access to entries consistent with type T

void mapShapeValues(GeomMapData&, number_t ord, dimen_t dimfun, Vector<real_t>*, ShapeValues&, ShapeValues&) const#

map shapevalues

map shapevalues in physical space regarding some FE rules WARNING: mapdata has to be allocated previously, jacobian and normal have to be up to date

Vector<real_t> &normalVector()#

access to normal vector if computed (writable)

return normal vector assuming already computed

const Vector<real_t> &normalVector() const#

access to normal vector if computed

return normal vector assuming already computed

inline number_t number() const#

return number_ attribute

std::pair<Element*, number_t> parentSide() const#

return first parent and side number if side element

void print(std::ostream&) const#

print utility

number_t refDofNumber(number_t) const#

return reference dof number of n th dofs (implemented in FeSpace.cpp)

void setDofSigns() const#

set dof sign correction for interpolation involving normal or tangential dofs (RT, Nedelec, …)

set dof sign correction for interpolation involving normal or tangential dofs (RT, Nedelec, …) only sign correction for the moment (normal to side or tangent to edge dofs) for each dof: compute inner product between a reference normal/tangent given by global dof and local normal/tangent and take its sign

build geometric information before calling sign

PolynomialsBasis shapeFunctions() const#

return shape functions as polynomials (if available)

return physical shape functions of current element as polynomials (if available)

inline ShapeType shapeType() const#

shape of the element

bool signDof(Vector<real_t>&) const#

dof sign correction for interpolation involving normal or tangential dofs (RT, Nedelec, …)

dof sign correction for interpolation involving normal or tangential dofs (RT, Nedelec, …) only sign correction for the moment (normal to side or tangent to edge dofs) for each dof: compute inner product between a reference normal/tangent given by global dof and local normal/tangent and take its sign

old method, keep it for non regressive

splitvec_t splitO1(std::map<number_t, number_t> *renumbering) const#

split element in first order elements and return as a list of dof numbers

Point toReferenceSpace(const Point &p) const#

point in physical space to point to reference space (inverse map)

Public Members

std::vector<number_t> dofNumbers#

global numbering of element dofs in FeSpace dofs

mutable Vector<real_t> *dofSigns_p#

sign (+1/-1) of dofs, when void all sign equal to +1 (build on fly)

ExtendedElement *extElt_p#

pointer to extension of element (0 by default)

FeSubSpace *feSubSpace_p#

pointer to Finite Element parent sub space if it belongs to a FESubSpace (0 if not)

GeomElement *geomElt_p#

pointer to Geometric Element support

std::vector<Element*> parents_#

parent elements when a side of element

RefElement *refElt_p#

pointer to associated reference element object

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)

Friends

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

print operator