Class xlifepp::FeSpace#

class FeSpace : public xlifepp::Space#

defines general data of a finite element space.

FeSpace class is not directly exposed to end users

Public Functions

FeSpace(const GeomDomain &gd, const Interpolation &in, const string_t &na, bool opt = true, bool withLocateData = true)#

constructor from GeomDomain and Interpolation(s)

void addToBcDof(BCDof*, FeDof&, number_t, std::list<GeoNumPair>&, number_t, const Point&, const Point&, GeomElement*, int rev = 1)#

tool for buildBCRTSpace()

tools for FeSpace:: buildBCRTSpace() add to the BC dof located on side s of element gelt, the parts of shape basis related to one vertex of an edge bcd: BcDof fed: FeDof s: side number elts: list of elements (counterclockwise) connected to the vertex (vnum) of side s X: middle point of side s gelt: related geometric element rev: reverse order vertex not on the boundary

void addToBcDofBoundary(BCDof*, FeDof&, number_t, std::list<GeoNumPair>&, number_t, const Point&, const Point&, GeomElement*, int rev = 1)#

tool for buildBCRTSpace()

tools for FeSpace:: buildBCRTSpace() add to the BC dof located on side s of element gelt, the parts of shape basis related to one vertex of an edge elts is the list of elements (counterclockwise) connected to the vertex (vnum) of side s and X is the middle point of side s vertex on the boundary

void buildBCRTSpace()#

special construction of BuffaChristiansen-RT space

buildBCRTSpace: special construction of BuffaChristiansen-RT space from F.P.

Andriulli, K.f Cools, H. Bagci, F. Olyslager, A. Buffa, S. Christiansen and E. Michielssen A Multiplicative Calderon Preconditioner for the Electric Field Integral Equation IEEE TRANSACTIONS ON ANTENNAS AND PROPAGATION, VOL. 56, NO. 8, AUGUST 2008 and XLiFE++ documentation

virtual void builddofid2rank() const#

construct the map dofid2rank from dofs list

construct the map dofid2rank from dofs list, ranks start from 1

void buildElements()#

construct the list of elements

void buildFeDofs()#

construct the list of FeDofs

buildFeDofs: create FeDofs of FeSpace defined by a mesh domain and an interpolation algorithm: for Discontinuous Galerkin interpolation (_L2 space comforming), all local dofs are global dofs for “continuous” approximation with sharable dofs the algorithm travels the list of elements on each element, local dofs are indexed along a DofKey object wich uniquely determines a global dof: vertex dof: V + global mesh vertex number side dof: S + ascending global mesh numbers of side vertices + local dof number side of side dof: E + “ascending” global mesh numbers of side vertices + local dof number internal or not sharable dof: not indexed thus, a global dof is created from a local dof if it is not already indexed or if it is a non sharable dof

NOTE: algorithm of this new version is more general than the previous one it works by using a loop on ref dofs of ref elements while the old one using a loop on vertices, edges, faces and non sharable dofs Now all the dof informations are provided by refdof and not by refdof and refelement that leads to a more general and compact algorithm, probably more efficient !

virtual void buildgelt2elt() const#

construct the map gelt2elt from elements list

buildgelt2elt: construct the map gelt2elt from elements list

dimen_t dimElements() const#

return the dimension of FE elements

inline virtual number_t dimSpace() const#

return the space dimension

inline virtual const Dof &dof(number_t n) const#

return n-th FeDof as Dof (n=1,…)

inline virtual number_t dofId(number_t n) const#

return the DoF id of n-th space DoF (n=1,…)

inline virtual const std::map<number_t, number_t> &dofid2rank() const#

return the map dof to rank, built on fly

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

return the DoF ids on space

virtual std::vector<number_t> dofsOn(const GeomDomain&, int_t ord = -1, dimen_t dim = 0, ProjectionType = _noProjection) const#

return the set of dof numbers of dofs “located” on a domain: when a plain domain, return all the dofs when a side domain, return only dofs with support in the side domain when a side of side domain, return only dofs with support in the side of side domain

filter dofs along some characteristics (see Refdof class): order_: order of a derivative D.o.F or a moment D.o.F (0) supportDim_: dimension of the D.o.F geometric support (0 point, 1 segment, …) projectionType_: type of projection (_noProjection , _givenProjection, _dotnProjection, _crossnProjection)

order = -1 means all dofs

NOTE: this function is useful when the restriction of FeSpace on a side does not define a FeSubSpace for instance, this is the case for Raviart, Nedelec space where the trace on a side domain is not a finite element space

virtual const Element &element(GeomElement *gelt) const#

access to element associated to a geomelement

inline virtual const Element &element(number_t k) const#

access to k-th (k>=0) element (pointer) for FESpace and FESubspace only

virtual const Element *element_p(GeomElement *gelt) const#

access to element associated to a geomelement

return element linked to a given geom element used gelt2elt map; has to be already built

inline virtual const Element *element_p(number_t k) const#

access to k-th (k>=0) element (pointer) for FESpace and FESubspace only

inline virtual const std::vector<number_t> &elementDofs(number_t k) const#

access to dofs ranks (local numbering) of k-th (>=0) element for FESpace and FESubspace only

inline virtual std::vector<number_t> elementParentDofs(number_t k) const#

access to dofs ranks (parent numbering, same as local) of k-th (>=0) element for FESpace and FESubspace only

virtual bool extensionRequired() const#

true if space has no trace space

true if trace space cannot be defined from trace of FE on side, case of edge FE

inline virtual const FeDof &fedof(number_t n) const#

return n-th FeDof (n=1,…)

inline virtual const std::vector<FeDof> &feDofs() const#

return dofs vector

inline virtual FeSpace *feSpace()#

access to child fespace object

inline virtual const FeSpace *feSpace() const#

access to child fespace object (const)

Graph graphOfDofs()#

return the set of dof numbers of dofs “located” on a domain

create dof connection graph

virtual bool include(const Space*) const#

return true if space is included in current space

template<typename T, typename K>
T &interpolate(const Vector<K>&, const Point&, T&, DiffOpType = _id, bool useNearest = false) const#

compute interpolation value at P

inline virtual const Interpolation *interpolation() const#

return pointer to interpolation

virtual bool isFE() const#

true if FE space or FeSubspace

virtual bool isSpectral() const#

true if spectral space

virtual Dof &locateDof(const Point&) const#

locate Lagrange dof nearest a given point

locate Lagrange dof nearest of a given point

const Element *locateElement(const Point &P, bool useNearest = false, bool errorOnOutDom = true, real_t tol = theLocateToleranceFactor) const#

locate element of the Fespace containing P

number_t maxDegree() const#

max degree of polynomials involved by shape functions

max degree of polynomials involved by shape functions if not polynomial return a default degree 5

inline virtual number_t nbDofs() const#

number of dofs (a dof may be a vector dof)

inline virtual number_t nbOfElements() const#

number of elements for FESpace and FESubspace only

virtual number_t numElement(GeomElement *gelt) const#

access to element number associated to a geomelement

access to element number associated to a geomelement if not found return the size of gelt2elt (number of elements)

virtual void print(std::ostream&) const#

print utility

inline virtual const std::set<RefElement*> &refElements() const#

access to set of pointer to RefElement (refElts) involved in FESpace

virtual std::pair<number_t, number_t> renumberDofs()#

renumber dofs with bandwith minimisation

inline virtual Space *rootSpace()#

access to root space pointer

inline virtual const Space *rootSpace() const#

access to root space pointer (const)

inline virtual void shiftDofs(number_t n)#

shift dofs numbering from n (special utility for SpSpace)

virtual StrucType strucType() const#

return structure type of basis function (scalar or vector)

virtual ValueType valueType() const#

return value type of basis function (real or complex)

Public Members

mutable std::map<number_t, number_t> dofid2rank_#

map dof iD -> rank in dofs vector

std::vector<FeDof> dofs#

list of global degrees of freedom

std::vector<Element> elements#

list of finite elements

mutable std::map<GeomElement*, number_t> gelt2elt#

map GeomElement -> element number (useful to interpolation tools)

std::set<RefElement*> refElts#

set of pointer to RefElement involved in FeSpace (usually one)

Public Static Attributes

static number_t lastEltIndex = 0#

to manage a unique index for elements

for unique elements numbering