Class xlifepp::Space#

class Space#

base class of spaces

Subclassed by xlifepp::FeSpace, xlifepp::ProdSpace, xlifepp::SpSpace, xlifepp::SubSpace

Public Functions

Space(const GeomDomain &dom, const Interpolation &in, const string_t &na, bool opt = true)#

constructor from domain and Interpolation (FeSpace)

constructor of Fe space (from domain and interpolation) if opt=true, dof numbering is optimized to reduce the matrix bandwith

Space(const GeomDomain &dom, const std::vector<number_t> &dofids, Space &sp, const string_t &na = "")#

constructor from GeomDomain, dofIds list and Space (SubSpace)

constructor of subspace from domain, dof numbers list and parent space dofids is the list of dof number ids linked to domain g this constructor is usefull in case of subspace of subspace

Space(const GeomDomain &dom, Space &sp, const string_t &na = "")#

constructor from GeomDomain and Space (SubSpace)

inline Space(const Space &V)#

copy constructor (shared pointers!)

Space(const SpectralBasis &spb, const string_t &na)#

constructor of spectral space from explicit spectral basis

Space(const std::vector<number_t> &dofids, Space &sp, const string_t &na = "")#

constructor from dofIds list and Space (SubSpace)

virtual ~Space()#

destructor

inline virtual void builddofid2rank() const#

construct the map dofid2rank from dofs list

inline virtual void buildgelt2elt() const#

construct the map gelt2elt from elements list

void buildSpFun(const GeomDomain &dom, const Function &f, number_t nbFun, dimen_t dimFun, const string_t &na)#

real constructor of analytic functions spectral space

Space *buildSubspaces(const std::vector<const GeomDomain*> &doms, std::vector<Space*> &subspaces)#

build subspaces from a list of subdomains and the largest subspace

build subspaces of current space from a list of subdomains, return list of spaces (subspaces) and returns the largest space (pointer to) this function:

  • travel along domains

  • identify the largest geometric domain

  • build the largest subspace

  • create subspace related to each domain if it does not exist

  • create dofs numbering between domain subspaces ands largest subspace

dofs numbering: whole space largest subspace domain subspace 1 5 2 2 3 1 3 1 4 5

inline SobolevType conformingSpace() const#

returns space conformity

SubSpace *createSubSpace(const GeomDomain &dom, Space &sp, const string_t &na)#

actual subspace constructor

void createSubSpaces(const std::vector<const GeomDomain*> &doms, std::vector<Space*> &subspaces)#

create subspaces of current space from a list of subdomains

inline dimen_t dimDomain() const#

returns dimension of space related domain

inline dimen_t dimFun() const#

returns dimension of basis functions

inline dimen_t dimPoint() const#

returns dimension of points

virtual number_t dimSpace() const#

space dimension (number of dofs)

virtual const Dof &dof(number_t n) const#

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

virtual number_t dofId(number_t n) const#

return the n-th DoF id of space

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

return the map dof to rank, built on fly (only for FeSpace and SubSpace)

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

return the DoF ids on space

inline const GeomDomain *domain() const#

returns space related domain

inline 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 for FESpace and FESubspace only

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

access to element (pointer) associated to a geomelement

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

access to k-th 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 element for FESpace and FESubspace only

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

access to dofs ranks (parent numbering) of k-th element for FESpace and FESubspace only

virtual bool extensionRequired() const#

true if space has no trace space

inline virtual const Point &feDofCoords(number_t k) const#

return coordinates of dot as a point (may be virtual coordinates when not a Lagrange dof)

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

access to vector of fedofs

virtual FeSpace *feSpace()#

access to child fespace object

virtual const FeSpace *feSpace() const#

access to child fespace object (const)

virtual const FeSubSpace *feSubSpace() const#

access to child fesubspace object (const)

std::vector<Space*> findSubSpaces(const Space *sp)#

find subspaces linked to a space

std::vector<Space*> findSubSpaces(Space *sp)#

find subspaces linked to a space

virtual bool include(const Space *sp) const#

return true if space is included in current space

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

inline virtual Dof &locateDof(const Point &P) const#

< locate Lagrange dof nearest a given point (only for FeSpace)

inline string_t name() const#

returns space name

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

inline virtual number_t numElement(GeomElement *gelt) const#

access to element number associated to a geomelement

inline virtual void print(PrintStream &os) const#

print utility

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

print utility

inline void printSpaceInfo(PrintStream &os) const#

print utility

void printSpaceInfo(std::ostream &out) const#

print utility

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

access to set of pointer to RefElement involved in FESpace and FESubspace only

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

optimize dofs numbering to reduce matrix bandwith

virtual Space *rootSpace()#

access to root space pointer

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)

inline const Space *space() const#

returns true space object

inline const SpaceInfo *spaceInfo() const#

returns true space object

virtual const SpSpace *spSpace() const#

access to child spspace object (const)

virtual StrucType strucType() const#

return structure type of basis function (scalar or vector)

virtual SubSpace *subSpace()#

access to SubSpace from Space class

virtual const SubSpace *subSpace() const#

access to child subspace object (const)

inline SpaceType typeOfSpace() const#

returns type of space

SpaceType typeOfSubSpace() const#

returns type of sub-space

virtual ValueType valueType() const#

return value type of basis function (real or complex)

Public Members

mutable bool global#

declare space as global, if true forbid deletion of pointer space_p

Public Static Functions

static void clearGlobalVector()#

delete all space objects

static Space *findSpace(const string_t &na)#

find space by its name

static const Space *findSubSpace(const GeomDomain *dom, const Space *sp)#

find subspace in list

static Space *findSubSpace(const GeomDomain *dom, Space *sp)#

find subspace in list

static inline void printAllSpaces(PrintStream &os)#

output all spaces in memory

static void printAllSpaces(std::ostream &out)#

output all spaces in memory

Public Static Attributes

static std::vector<Space*> theSpaces#

unique list of defined spaces

Friends

friend std::ostream &operator<<(std::ostream &out, const Space &sp)#

output space characteristics