Class xlifepp::RefElement#

class RefElement#

Inheritence diagram for xlifepp::RefElement:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "42" [label="xlifepp::ArgyrisTriangle" tooltip="xlifepp::ArgyrisTriangle"] "57" [label="xlifepp::BuffaChristiansenRT" tooltip="xlifepp::BuffaChristiansenRT"] "31" [label="xlifepp::CrouzeixRaviartStdTetrahedronP1" tooltip="xlifepp::CrouzeixRaviartStdTetrahedronP1"] "44" [label="xlifepp::CrouzeixRaviartStdTriangleP1" tooltip="xlifepp::CrouzeixRaviartStdTriangleP1"] "30" [label="xlifepp::CrouzeixRaviartTetrahedron" tooltip="xlifepp::CrouzeixRaviartTetrahedron"] "43" [label="xlifepp::CrouzeixRaviartTriangle" tooltip="xlifepp::CrouzeixRaviartTriangle"] "24" [label="xlifepp::HermiteSegment" tooltip="xlifepp::HermiteSegment"] "25" [label="xlifepp::HermiteStdSegment< Pk >" tooltip="xlifepp::HermiteStdSegment< Pk >"] "46" [label="xlifepp::HermiteStdTriangle< Pk >" tooltip="xlifepp::HermiteStdTriangle< Pk >"] "45" [label="xlifepp::HermiteTriangle" tooltip="xlifepp::HermiteTriangle"] "4" [label="xlifepp::LagrangeGLHexahedron" tooltip="xlifepp::LagrangeGLHexahedron"] "18" [label="xlifepp::LagrangeGLQuadrangle" tooltip="xlifepp::LagrangeGLQuadrangle"] "27" [label="xlifepp::LagrangeGLSegment" tooltip="xlifepp::LagrangeGLSegment"] "3" [label="xlifepp::LagrangeHexahedron" tooltip="xlifepp::LagrangeHexahedron"] "11" [label="xlifepp::LagrangePrism" tooltip="xlifepp::LagrangePrism"] "14" [label="xlifepp::LagrangePyramid" tooltip="xlifepp::LagrangePyramid"] "17" [label="xlifepp::LagrangeQuadrangle" tooltip="xlifepp::LagrangeQuadrangle"] "26" [label="xlifepp::LagrangeSegment" tooltip="xlifepp::LagrangeSegment"] "5" [label="xlifepp::LagrangeStdHexahedron" tooltip="xlifepp::LagrangeStdHexahedron"] "12" [label="xlifepp::LagrangeStdPrism< Pk >" tooltip="xlifepp::LagrangeStdPrism< Pk >"] "15" [label="xlifepp::LagrangeStdPyramid< Pk >" tooltip="xlifepp::LagrangeStdPyramid< Pk >"] "19" [label="xlifepp::LagrangeStdQuadrangle" tooltip="xlifepp::LagrangeStdQuadrangle"] "28" [label="xlifepp::LagrangeStdSegment" tooltip="xlifepp::LagrangeStdSegment"] "33" [label="xlifepp::LagrangeStdTetrahedron< Pk >" tooltip="xlifepp::LagrangeStdTetrahedron< Pk >"] "34" [label="xlifepp::LagrangeStdTetrahedronPk" tooltip="xlifepp::LagrangeStdTetrahedronPk"] "48" [label="xlifepp::LagrangeStdTriangle< Pk >" tooltip="xlifepp::LagrangeStdTriangle< Pk >"] "49" [label="xlifepp::LagrangeStdTrianglePk" tooltip="xlifepp::LagrangeStdTrianglePk"] "32" [label="xlifepp::LagrangeTetrahedron" tooltip="xlifepp::LagrangeTetrahedron"] "47" [label="xlifepp::LagrangeTriangle" tooltip="xlifepp::LagrangeTriangle"] "50" [label="xlifepp::MorleyTriangle" tooltip="xlifepp::MorleyTriangle"] "7" [label="xlifepp::NedelecEdgeFirstHexahedronPk" tooltip="xlifepp::NedelecEdgeFirstHexahedronPk"] "21" [label="xlifepp::NedelecEdgeFirstQuadranglePk" tooltip="xlifepp::NedelecEdgeFirstQuadranglePk"] "36" [label="xlifepp::NedelecEdgeFirstTetrahedronPk" tooltip="xlifepp::NedelecEdgeFirstTetrahedronPk"] "6" [label="xlifepp::NedelecEdgeHexahedron" tooltip="xlifepp::NedelecEdgeHexahedron"] "20" [label="xlifepp::NedelecEdgeQuadrangle" tooltip="xlifepp::NedelecEdgeQuadrangle"] "8" [label="xlifepp::NedelecEdgeSecondHexahedronPk" tooltip="xlifepp::NedelecEdgeSecondHexahedronPk"] "22" [label="xlifepp::NedelecEdgeSecondQuadranglePk" tooltip="xlifepp::NedelecEdgeSecondQuadranglePk"] "37" [label="xlifepp::NedelecEdgeSecondTetrahedronPk" tooltip="xlifepp::NedelecEdgeSecondTetrahedronPk"] "35" [label="xlifepp::NedelecEdgeTetrahedron" tooltip="xlifepp::NedelecEdgeTetrahedron"] "39" [label="xlifepp::NedelecFaceFirstTetrahedronPk" tooltip="xlifepp::NedelecFaceFirstTetrahedronPk"] "40" [label="xlifepp::NedelecFaceSecondTetrahedronPk" tooltip="xlifepp::NedelecFaceSecondTetrahedronPk"] "38" [label="xlifepp::NedelecFaceTetrahedron" tooltip="xlifepp::NedelecFaceTetrahedron"] "52" [label="xlifepp::NedelecFirstTriangleP1" tooltip="xlifepp::NedelecFirstTriangleP1"] "53" [label="xlifepp::NedelecFirstTrianglePk" tooltip="xlifepp::NedelecFirstTrianglePk"] "54" [label="xlifepp::NedelecSecondTrianglePk" tooltip="xlifepp::NedelecSecondTrianglePk"] "51" [label="xlifepp::NedelecTriangle" tooltip="xlifepp::NedelecTriangle"] "56" [label="xlifepp::RaviartThomasStdTriangleP1" tooltip="xlifepp::RaviartThomasStdTriangleP1"] "58" [label="xlifepp::RaviartThomasStdTrianglePk" tooltip="xlifepp::RaviartThomasStdTrianglePk"] "55" [label="xlifepp::RaviartThomasTriangle" tooltip="xlifepp::RaviartThomasTriangle"] "1" [label="xlifepp::RefElement" tooltip="xlifepp::RefElement" fillcolor="#BFBFBF"] "2" [label="xlifepp::RefHexahedron" tooltip="xlifepp::RefHexahedron"] "9" [label="xlifepp::RefPoint" tooltip="xlifepp::RefPoint"] "10" [label="xlifepp::RefPrism" tooltip="xlifepp::RefPrism"] "13" [label="xlifepp::RefPyramid" tooltip="xlifepp::RefPyramid"] "16" [label="xlifepp::RefQuadrangle" tooltip="xlifepp::RefQuadrangle"] "23" [label="xlifepp::RefSegment" tooltip="xlifepp::RefSegment"] "29" [label="xlifepp::RefTetrahedron" tooltip="xlifepp::RefTetrahedron"] "41" [label="xlifepp::RefTriangle" tooltip="xlifepp::RefTriangle"] "42" -> "41" [dir=forward tooltip="public-inheritance"] "57" -> "56" [dir=forward tooltip="public-inheritance"] "31" -> "30" [dir=forward tooltip="public-inheritance"] "44" -> "43" [dir=forward tooltip="public-inheritance"] "30" -> "29" [dir=forward tooltip="public-inheritance"] "43" -> "41" [dir=forward tooltip="public-inheritance"] "24" -> "23" [dir=forward tooltip="public-inheritance"] "25" -> "24" [dir=forward tooltip="public-inheritance"] "46" -> "45" [dir=forward tooltip="public-inheritance"] "45" -> "41" [dir=forward tooltip="public-inheritance"] "4" -> "3" [dir=forward tooltip="public-inheritance"] "18" -> "17" [dir=forward tooltip="public-inheritance"] "27" -> "26" [dir=forward tooltip="public-inheritance"] "3" -> "2" [dir=forward tooltip="public-inheritance"] "11" -> "10" [dir=forward tooltip="public-inheritance"] "14" -> "13" [dir=forward tooltip="public-inheritance"] "17" -> "16" [dir=forward tooltip="public-inheritance"] "26" -> "23" [dir=forward tooltip="public-inheritance"] "5" -> "3" [dir=forward tooltip="public-inheritance"] "12" -> "11" [dir=forward tooltip="public-inheritance"] "15" -> "14" [dir=forward tooltip="public-inheritance"] "19" -> "17" [dir=forward tooltip="public-inheritance"] "28" -> "26" [dir=forward tooltip="public-inheritance"] "33" -> "32" [dir=forward tooltip="public-inheritance"] "34" -> "32" [dir=forward tooltip="public-inheritance"] "48" -> "47" [dir=forward tooltip="public-inheritance"] "49" -> "47" [dir=forward tooltip="public-inheritance"] "32" -> "29" [dir=forward tooltip="public-inheritance"] "47" -> "41" [dir=forward tooltip="public-inheritance"] "50" -> "41" [dir=forward tooltip="public-inheritance"] "7" -> "6" [dir=forward tooltip="public-inheritance"] "21" -> "20" [dir=forward tooltip="public-inheritance"] "36" -> "35" [dir=forward tooltip="public-inheritance"] "6" -> "2" [dir=forward tooltip="public-inheritance"] "20" -> "16" [dir=forward tooltip="public-inheritance"] "8" -> "6" [dir=forward tooltip="public-inheritance"] "22" -> "20" [dir=forward tooltip="public-inheritance"] "37" -> "35" [dir=forward tooltip="public-inheritance"] "35" -> "29" [dir=forward tooltip="public-inheritance"] "39" -> "38" [dir=forward tooltip="public-inheritance"] "40" -> "38" [dir=forward tooltip="public-inheritance"] "38" -> "29" [dir=forward tooltip="public-inheritance"] "52" -> "51" [dir=forward tooltip="public-inheritance"] "53" -> "51" [dir=forward tooltip="public-inheritance"] "54" -> "51" [dir=forward tooltip="public-inheritance"] "51" -> "41" [dir=forward tooltip="public-inheritance"] "56" -> "55" [dir=forward tooltip="public-inheritance"] "58" -> "55" [dir=forward tooltip="public-inheritance"] "55" -> "41" [dir=forward tooltip="public-inheritance"] "2" -> "1" [dir=forward tooltip="public-inheritance"] "9" -> "1" [dir=forward tooltip="public-inheritance"] "10" -> "1" [dir=forward tooltip="public-inheritance"] "13" -> "1" [dir=forward tooltip="public-inheritance"] "16" -> "1" [dir=forward tooltip="public-inheritance"] "23" -> "1" [dir=forward tooltip="public-inheritance"] "29" -> "1" [dir=forward tooltip="public-inheritance"] "41" -> "1" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::RefElement:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "14" [label="std::list< std::vector< PolynomialT< real_t > > >" tooltip="std::list< std::vector< PolynomialT< real_t > > >"] "17" [label="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >" tooltip="std::map< xlifepp::Quadrature *, std::vector< xlifepp::ShapeValues > >"] "15" [label="std::list< T >" tooltip="std::list< T >"] "18" [label="std::map< K, T >" tooltip="std::map< K, T >"] "4" [label="std::vector< T >" tooltip="std::vector< T >"] "5" [label="std::vector< ShapeType >" tooltip="std::vector< ShapeType >"] "3" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "7" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "6" [label="std::vector< std::vector< number_t > >" tooltip="std::vector< std::vector< number_t > >"] "8" [label="std::vector< xlifepp::GeomRefElement * >" tooltip="std::vector< xlifepp::GeomRefElement * >"] "10" [label="std::vector< xlifepp::Interpolation * >" tooltip="std::vector< xlifepp::Interpolation * >"] "16" [label="std::vector< xlifepp::PolynomialsBasisT >" tooltip="std::vector< xlifepp::PolynomialsBasisT >"] "11" [label="std::vector< xlifepp::RefDof * >" tooltip="std::vector< xlifepp::RefDof * >"] "12" [label="std::vector< xlifepp::RefElement * >" tooltip="std::vector< xlifepp::RefElement * >"] "2" [label="xlifepp::GeomRefElement" tooltip="xlifepp::GeomRefElement"] "9" [label="xlifepp::Interpolation" tooltip="xlifepp::Interpolation"] "13" [label="xlifepp::PolynomialsBasisT< K >" tooltip="xlifepp::PolynomialsBasisT< K >"] "1" [label="xlifepp::RefElement" tooltip="xlifepp::RefElement" fillcolor="#BFBFBF"] "14" -> "15" [dir=forward tooltip="template-instance"] "17" -> "18" [dir=forward tooltip="template-instance"] "5" -> "4" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="template-instance"] "7" -> "4" [dir=forward tooltip="template-instance"] "6" -> "4" [dir=forward tooltip="template-instance"] "8" -> "4" [dir=forward tooltip="template-instance"] "10" -> "4" [dir=forward tooltip="template-instance"] "16" -> "4" [dir=forward tooltip="template-instance"] "11" -> "4" [dir=forward tooltip="template-instance"] "12" -> "4" [dir=forward tooltip="template-instance"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "5" [dir=forward tooltip="usage"] "2" -> "6" [dir=forward tooltip="usage"] "2" -> "7" [dir=forward tooltip="usage"] "2" -> "8" [dir=forward tooltip="usage"] "9" -> "10" [dir=forward tooltip="usage"] "13" -> "14" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "9" [dir=forward tooltip="usage"] "1" -> "11" [dir=forward tooltip="usage"] "1" -> "12" [dir=forward tooltip="usage"] "1" -> "6" [dir=forward tooltip="usage"] "1" -> "13" [dir=forward tooltip="usage"] "1" -> "16" [dir=forward tooltip="usage"] "1" -> "17" [dir=forward tooltip="usage"] }

A RefElement object represents the standard FE reference element.

Subclassed by xlifepp::RefHexahedron, xlifepp::RefPoint, xlifepp::RefPrism, xlifepp::RefPyramid, xlifepp::RefQuadrangle, xlifepp::RefSegment, xlifepp::RefTetrahedron, xlifepp::RefTriangle

Public Functions

RefElement()#

default constructor

RefElement(ShapeType, const Interpolation*)#

constructor by shape & interpolation

virtual ~RefElement()#

destructor

inline const RefElement *actualRefElement(const number_t sideNum = 0, const dimen_t sideDim = 0) const#

returns this if sideNum = 0 or reference element of sideDim side sideNum(sideNum = 1, …)

void buildPolynomialTree()#

build tree representation of polynomial shape functions

inline virtual void computeShapeFunctions()#

compute shape functions

inline dimen_t dim() const#

returns element dimension

inline virtual std::vector<number_t> dofsMap(const number_t &i, const number_t &j, const number_t &k = 0) const#

< dofs permutation (NO LONGER USED)

inline virtual Value evalEdgeDof(const Point &S1, const Point &S2, number_t e, number_t i, const Function &f, const Function &gradf, const Function &grad2f) const#

eval edge dof

inline virtual Value evalEltDof(const FeDof &dof, const Function &f, const Function &gradf, const Function &grad2f) const#

eval element dof

inline virtual Value evalFaceDof(const FeDof &dof, const GeomElement &selt, const Function &f, const Function &gradf, const Function &grad2f) const#

eval face dof

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

return associated Geometric Reference Element (i=0) or GeomRefElement of its side i

virtual const splitvec_t &getO1splitting() const = 0#

returns reference to splitting scheme computed by splitO1

inline const Interpolation &interpolation() const#

returns associated Geometric Reference Element

inline bool isSimplex() const#

returns true for a segment or triangle or tetrahedron

inline string_t name() const#

returns (protected) reference element name

number_t nbDofs(const number_t sideNum = 0, const dimen_t sideDim = 0) const#

returns number of element D.o.F’s (sideNum = 0) number of D.o.F’s on a given sideDim side sideNum (sideNum = 1, …)

number of D.o.F’s on sideDim side sideNum ( sideNum = 1, …)

inline number_t nbDofsInSideOfSides() const#

returns (protected) number of D.o.F supported by edges excluding D.o.F support by vertices

inline number_t nbDofsInSides() const#

returns (protected) number of D.o.F supported by faces excluding D.o.F supported by vertices or edges

inline number_t nbDofsOnVertices() const#

returns (protected) number of D.o.F supported by vertices

number_t nbInternalDofs(const number_t sideNum = 0, const dimen_t sideDim = 0) const#

returns number of element internal D.o.F (sideNum = 0 ) or number of internal D.o.F’s on sideDim side sideNum (sideNum = 1, …)

number of internal D.o.F’s on sideDim side sideNum ( sideNum = 1, …)

inline number_t nbPts() const#

returns (protected) number of points

virtual number_t nbShapeFcts() const = 0#

returns the number of shape functions

inline number_t order() const#

returns element numtype (order for Lagrange element)

inline virtual void print(CoutStream &os, bool withDerivative = false) const#

print RefElement

inline virtual void print(PrintStream &os, bool withDerivative = false) const#

print RefElement

virtual void print(std::ostream&, bool withDerivative = false) const#

print RefElement

prints RefElement object to ostream if withDerivative is true, print derivatives of shape functions (only if formal representations exist)

inline void printShapeValues(CoutStream &os, std::vector<real_t>::const_iterator it_pt, const ShapeValues &shv) const#

print RefElement shape functions

inline void printShapeValues(PrintStream &os, std::vector<real_t>::const_iterator it_pt, const ShapeValues &shv) const#

print RefElement shape functions

void printShapeValues(std::ostream&, std::vector<real_t>::const_iterator it_pt, const ShapeValues &shv) const#

print RefElement shape functions

void printShapeValues(std::vector<real_t>::const_iterator it_pt, const ShapeValues &shv) const#

print RefElement shape functions print reference element as P1 reference

inline RefElement *refElement(number_t sideNum = 0)#

returns this if sideNum = 0 or reference element of side sideNum (sideNum = 1, …) non const version, to avoid a forbidden const to non const cast in Space class

inline const RefElement *refElement(number_t sideNum = 0) const#

returns this if sideNum = 0 or reference element of side sideNum (sideNum = 1, …)

inline virtual void rotateDofs(const std::vector<number_t>&, ShapeValues &shv, bool der1 = false, bool der2 = false) const#

apply rotation to some shapevalues (rotation given by children)

ShapeType shapeType() const#

returns shape of element

size_t shapeValueSize() const#

length of shape function storage computed from set of D.o.Fs

length of shape function storage

std::vector<std::vector<number_t>> splitLagrange1DToP1() const#

creates the list of nodes numbers of first order segment elements when splitting Lagrange element

general splitting algorithm for Lagrange element (expansive method) based on an exhaustive analysis of all n-simplexes build from closed nodes i.e |N1_x-N2.x|<=1/k & |N1_y-N2.y|<=1/k & |N1_z-N2.z|<=1/k (k order of the element) and check if simplexes do not intersect together partial tests for segment, triangle and tetrahedron, seems to work

std::vector<std::vector<number_t>> splitLagrange2DToP1() const#

creates the list of nodes numbers of first order triangle elements when splitting Lagrange element

std::vector<std::vector<number_t>> splitLagrange3DToP1() const#

creates the list of nodes numbers of first order tetrahedron elements when splitting Lagrange element

splitvec_t splitLagrange3DToPrismO1() const#

creates the list of nodes numbers of first order prism elements when splitting Lagrange element

splitvec_t splitLagrange3DToQ1() const#

creates the list of nodes numbers of first order hexahedron elements when splitting Lagrange element

virtual splitvec_t splitO1() const#

return nodes numbers of first order elements of same shape when splitting current element (virtual function) a void vector is returned when splitting is not handled

virtual std::vector<std::vector<number_t>> splitP1() const#

return nodes numbers of first order elements (P1) when splitting current element return nodes numbers of first order elements of same shape when splitting current element

return nodes numbers of first order elements (P1) when splitting current element (virtual function) a void vector is returned when spliting is not handled

virtual std::vector<std::pair<number_t, number_t>> splitP1Side(number_t s) const#

return side numbers of first order elements (P1) when splitting current element

return side numbers of first order elements (P1) when splitting current element (virtual function) a void vector is returned when spliting is not handled

Public Members

dimen_t dimShapeFunction#

dimension of shape function

DofCompatibility dofCompatibility#

compatibility rule to applied to side dofs (_noDofCompatibility,_signDofCompatibility)

std::vector<PolynomialsBasis> dWk#

derivatives of shape functions basis

PolynomialsBasis Ek#

auxiliary edge polynomial basis

PolynomialsBasis Fk#

auxiliary face polynomial basis

GeomRefElement *geomRefElem_p#

geometric data is gathered from geometric reference element

bool hasShapeValues#

tell that ref element has shapevalues, generally true

const Interpolation *interpolation_p#

interpolation parameters

PolynomialsBasis Kk#

auxiliary element polynomial basis

FEMapType mapType#

type of map applied to shape functions of reference element

number_t maxDegree#

maximum degree of shape functions

mutable std::map<Quadrature*, std::vector<ShapeValues>> qshvs_#

temporary structure to store shape values at some points of quadrature

mutable std::map<Quadrature*, std::vector<ShapeValues>> qshvs_aux#

temporary structure to store auxiliary shape values at some points of quadrature

std::vector<RefDof*> refDofs#

vector of local reference Degrees of Freedom

bool reverseEdge#

reverse edge orientation when evaluating dof (default = false)

bool rotateDof#

if true, apply rotation (given by childs) to shape values in order to insure correct matching on shared side

std::vector<std::vector<number_t>> sideDofNumbers_#

list of dof numbers for each side

std::vector<std::vector<number_t>> sideOfSideDofNumbers_#

list of dof numbers for each side of side (edge in 3D)

PolynomialsBasis Wk#

shape functions basis

Public Static Functions

static void clearGlobalVector()#

delete all RefElement objects

static void printAllRefElements(std::ostream&)#

print the list of RefElement objects in memory

Public Static Attributes

static std::vector<RefElement*> theRefElements#

vector to store run-time RefElement pointers

list of pointers of all reference elements

Friends

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

output operator