Class xlifepp::FeSpace#

class FeSpace : public xlifepp::Space#

Inheritence diagram for xlifepp::FeSpace:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="xlifepp::FeSpace" tooltip="xlifepp::FeSpace" fillcolor="#BFBFBF"] "2" [label="xlifepp::Space" tooltip="xlifepp::Space"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::FeSpace:

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

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