Class xlifepp::Element#
-
class Element#
-
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
-
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
-
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)
-
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
Public Members
-
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
-
RefElement *refElt_p#
-
pointer to associated reference element object
-
Element(FeSpace*, number_t, RefElement*, GeomElement*, FeSubSpace* = nullptr)#