hp2D::hpAdaptiveSpaceDG< F > Class Template Referenceabstract

hp-adaptive FEM space in 2D composed of separate spaces hpAdapativeSpace and may be discontinuous. More...

#include <hpAdaptiveSpaceDG.hh>

Inheritance diagram for hp2D::hpAdaptiveSpaceDG< F >:
concepts::SpaceOnCoarseCells< 2u, Real > concepts::SpaceOnCells< Real > concepts::Space< Real >

Public Types

typedef concepts::Scan< hp2D::Element< Real > > Scan
 
typedef Scan< ElementWithCell< Real > > Scanner
 
typedef ElementWithCell< Real > type
 

Public Member Functions

virtual const std::set< typename concepts::CellType< 2u >::cell * > allCells () const
 
virtual const std::set< typename CellType< dimC >::cell * > allCells () const=0
 
virtual uint dim () const
 
virtual uint dim () const=0
 Returns the dimension of the space. More...
 
virtual uint getOutputDimension () const
 Returns the default output dimension, when we consider plotting a real-valued operator on this space. More...
 
 hpAdaptiveSpaceDG (concepts::Mesh2 &msh, uint l, uint p, concepts::Sequence< concepts::Set< uint > > domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor. More...
 
 hpAdaptiveSpaceDG (concepts::Mesh2 &msh, uint l, uint p, const char *domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor. More...
 
 hpAdaptiveSpaceDG (concepts::Mesh2 &msh, uint l, uint p, std::string domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor. More...
 
 hpAdaptiveSpaceDG (hpFull &prebuild, uint spcNo, concepts::Sequence< concepts::Set< uint > > domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor for using same mesh and distribution of degrees of freedom object as another space. More...
 
 hpAdaptiveSpaceDG (hpFull &prebuild, uint spcNo, const char *domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor for using same mesh and distribution of degrees of freedom object as another space. More...
 
 hpAdaptiveSpaceDG (hpFull &prebuild, uint spcNo, std::string domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
 Constructor for using same mesh and distribution of degrees of freedom object as another space. More...
 
virtual uint nelm () const
 
virtual uint nelm () const=0
 Returns the number of elements in the space. More...
 
void rebuild ()
 Rebuilds the mesh and the elements due to adjustment orders. More...
 
void recomputeShapefunctions ()
 Recompute shape functions, e.g. More...
 
virtual Scanscan () const
 
virtual Scannerscan () const=0
 Returns a scanner to iterate over the elements of the space. More...
 
const concepts::Sequence< F * > spaces () const
 
 ~hpAdaptiveSpaceDG ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 

Protected Attributes

concepts::Sequence< F * > spc_
 The separate spaces for each sub-domain. More...
 

Private Attributes

std::set< uint > activeCells_
 marker of all active cell specified by /c domains More...
 
uint build_
 Number of the build. More...
 
concepts::Sequence< concepts::CellConditionscc_
 Cell conditions for switching on sub-domains (just to hold for rebuilding) More...
 
uint dim_
 Dimension of the space. More...
 
concepts::Joiner< Element< Real > *, 1 > * elm_
 Linked list of the elements. More...
 
uint nelm_
 Number of elements currently active in the mesh. More...
 

Detailed Description

template<class F>
class hp2D::hpAdaptiveSpaceDG< F >

hp-adaptive FEM space in 2D composed of separate spaces hpAdapativeSpace and may be discontinuous.

Author
Kersten Schmidt, 2009 Vsevolod Shashkov, 2018

Definition at line 27 of file hpAdaptiveSpaceDG.hh.

Member Typedef Documentation

◆ Scan

template<class F >
typedef concepts::Scan<hp2D::Element<Real> > hp2D::hpAdaptiveSpaceDG< F >::Scan

Definition at line 29 of file hpAdaptiveSpaceDG.hh.

◆ Scanner

typedef Scan<ElementWithCell<Real > > concepts::SpaceOnCells< Real >::Scanner
inherited

Definition at line 84 of file space.hh.

◆ type

typedef ElementWithCell<Real > concepts::SpaceOnCells< Real >::type
inherited

Definition at line 83 of file space.hh.

Constructor & Destructor Documentation

◆ hpAdaptiveSpaceDG() [1/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( concepts::Mesh2 msh,
uint  l,
uint  p,
concepts::Sequence< concepts::Set< uint > >  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor.

Parameters
mshThe overall domain of interest partitioned into a mesh.
lLevel of refinement.
pDegree of the polynomials to be used.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains. The constructor takes the sequence of sets where each set correspond to the attributes of the corresponding sub-domain. E.g., taking domains(0) = {1,2,3} and domains(1) = {4} there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. The attribute '0' is forbidden. Remark: All the attributes have to be given explicitly, and the constructor throws an exception when domains is empty, or domains(i) is empty for any index i.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

◆ hpAdaptiveSpaceDG() [2/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( concepts::Mesh2 msh,
uint  l,
uint  p,
const char *  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor.

Parameters
mshThe overall domain of interest partitioned into a mesh.
lLevel of refinement.
pDegree of the polynomials to be used.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains, e.g. taking "1 2 3;4" there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. Remark: All the attributes have to be given explicitly, e.g. "1 2; " is not allowed, however "1 2;" is considered as one sub-domain.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

◆ hpAdaptiveSpaceDG() [3/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( concepts::Mesh2 msh,
uint  l,
uint  p,
std::string  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor.

Parameters
mshThe overall domain of interest partitioned into a mesh.
lLevel of refinement.
pDegree of the polynomials to be used.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains, e.g. taking "1 2 3;4" there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. Remark: All the attributes have to be given explicitly, e.g. "1 2; " is not allowed, however "1 2;" is considered as one sub-domain.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

◆ hpAdaptiveSpaceDG() [4/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( hpFull prebuild,
uint  spcNo,
concepts::Sequence< concepts::Set< uint > >  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor for using same mesh and distribution of degrees of freedom object as another space.

The global indices are sorted by the topological entities, on which the degrees of freedoms lie. Spaces could have no common entities, e.g. first space has Dirichlet boundary and this has only dof on the boundary. If they have common entities, like in mixed problems, the global indices per topological entity can be uniquely given by spcNo.

Parameters
prebuildspace pre builder
spcNoNumber for distinguish between global indices on same topological entity.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains. The constructor takes the sequence of sets where each set correspond to the attributes of the corresponding sub-domain. E.g., taking domains(0) = {1,2,3} and domains(1) = {4} there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. The attribute '0' is forbidden. Remark: All the attributes have to be given explicitly, and the constructor throws an exception when domains is empty, or domains(i) is empty for any index i.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

REMARK: If and only if the flag emptyElements of the cell conditions cc is set to false, empty elements will not be built for inactive cells.

◆ hpAdaptiveSpaceDG() [5/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( hpFull prebuild,
uint  spcNo,
std::string  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor for using same mesh and distribution of degrees of freedom object as another space.

The global indices are sorted by the topological entities, on which the degrees of freedoms lie. Spaces could have no common entities, e.g. first space has Dirichlet boundary and this has only dof on the boundary. If they have common entities, like in mixed problems, the global indices per topological entity can be uniquely given by spcNo.

Parameters
prebuildspace pre builder
spcNoNumber for distinguish between global indices on same topological entity.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains, e.g. taking "1 2 3;4" there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. Remark: All the attributes have to be given explicitly, e.g. "1 2; " is not allowed, however "1 2;" is considered as one sub-domain.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

REMARK: If and only if the flag emptyElements of the cell conditions cc is set to false, empty elements will not be built for inactive cells.

◆ hpAdaptiveSpaceDG() [6/6]

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::hpAdaptiveSpaceDG ( hpFull prebuild,
uint  spcNo,
const char *  domains,
concepts::BoundaryConditions bc = 0,
bool  linearTrunk = false 
)

Constructor for using same mesh and distribution of degrees of freedom object as another space.

The global indices are sorted by the topological entities, on which the degrees of freedoms lie. Spaces could have no common entities, e.g. first space has Dirichlet boundary and this has only dof on the boundary. If they have common entities, like in mixed problems, the global indices per topological entity can be uniquely given by spcNo.

Parameters
prebuildspace pre builder
spcNoNumber for distinguish between global indices on same topological entity.
domainsCell attributes of the sub-domains being continuous (for each sub-domain a space of type F will be built), and discontinuous over the common edges between the sub-domains, e.g. taking "1 2 3;4" there are two sub-domains, where the first sub-domain consists of cells with attributes 1, 2 or 3, and the second of cells with attributes 4. Remark: All the attributes have to be given explicitly, e.g. "1 2; " is not allowed, however "1 2;" is considered as one sub-domain.
bcBoundary conditions
linearTrunkBoolean indicating the use of linear trunk space or not, by default, trunk space is built.

REMARK: If and only if the flag emptyElements of the cell conditions cc is set to false, empty elements will not be built for inactive cells.

◆ ~hpAdaptiveSpaceDG()

template<class F >
hp2D::hpAdaptiveSpaceDG< F >::~hpAdaptiveSpaceDG ( )

Member Function Documentation

◆ allCells() [1/2]

template<class F >
virtual const std::set<typename concepts::CellType<2u>::cell * > hp2D::hpAdaptiveSpaceDG< F >::allCells ( ) const
virtual

◆ allCells() [2/2]

virtual const std::set<typename CellType<dimC>::cell * > concepts::SpaceOnCoarseCells< dimC, Real >::allCells
pure virtualinherited

◆ dim() [1/2]

template<class F >
virtual uint hp2D::hpAdaptiveSpaceDG< F >::dim ( ) const
inlinevirtual

Definition at line 216 of file hpAdaptiveSpaceDG.hh.

◆ dim() [2/2]

virtual uint concepts::SpaceOnCells< Real >::dim ( ) const
pure virtualinherited

◆ getOutputDimension()

virtual uint concepts::Space< Real >::getOutputDimension ( ) const
inlinevirtualinherited

Returns the default output dimension, when we consider plotting a real-valued operator on this space.

Definition at line 50 of file space.hh.

◆ info()

template<class F >
virtual std::ostream& hp2D::hpAdaptiveSpaceDG< F >::info ( std::ostream &  os) const
protectedvirtual

◆ nelm() [1/2]

template<class F >
virtual uint hp2D::hpAdaptiveSpaceDG< F >::nelm ( ) const
inlinevirtual

Definition at line 217 of file hpAdaptiveSpaceDG.hh.

◆ nelm() [2/2]

virtual uint concepts::SpaceOnCells< Real >::nelm ( ) const
pure virtualinherited

Returns the number of elements in the space.

Implements concepts::Space< Real >.

Implemented in hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.

◆ rebuild()

template<class F >
void hp2D::hpAdaptiveSpaceDG< F >::rebuild ( )

Rebuilds the mesh and the elements due to adjustment orders.

◆ recomputeShapefunctions()

template<class F >
void hp2D::hpAdaptiveSpaceDG< F >::recomputeShapefunctions ( )

Recompute shape functions, e.g.

for other abscissas redefined through setIntegrationRule

◆ scan() [1/2]

template<class F >
virtual Scan* hp2D::hpAdaptiveSpaceDG< F >::scan ( ) const
inlinevirtual

Definition at line 218 of file hpAdaptiveSpaceDG.hh.

◆ scan() [2/2]

virtual Scanner* concepts::SpaceOnCells< Real >::scan ( ) const
pure virtualinherited

Returns a scanner to iterate over the elements of the space.

Implements concepts::Space< Real >.

Implemented in hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.

◆ spaces()

template<class F >
const concepts::Sequence<F*> hp2D::hpAdaptiveSpaceDG< F >::spaces ( ) const
inline

Definition at line 230 of file hpAdaptiveSpaceDG.hh.

Member Data Documentation

◆ activeCells_

template<class F >
std::set<uint> hp2D::hpAdaptiveSpaceDG< F >::activeCells_
private

marker of all active cell specified by /c domains

Definition at line 241 of file hpAdaptiveSpaceDG.hh.

◆ build_

template<class F >
uint hp2D::hpAdaptiveSpaceDG< F >::build_
private

Number of the build.

Definition at line 247 of file hpAdaptiveSpaceDG.hh.

◆ cc_

Cell conditions for switching on sub-domains (just to hold for rebuilding)

Definition at line 251 of file hpAdaptiveSpaceDG.hh.

◆ dim_

template<class F >
uint hp2D::hpAdaptiveSpaceDG< F >::dim_
private

Dimension of the space.

Definition at line 243 of file hpAdaptiveSpaceDG.hh.

◆ elm_

template<class F >
concepts::Joiner<Element<Real>*, 1>* hp2D::hpAdaptiveSpaceDG< F >::elm_
private

Linked list of the elements.

Definition at line 249 of file hpAdaptiveSpaceDG.hh.

◆ nelm_

template<class F >
uint hp2D::hpAdaptiveSpaceDG< F >::nelm_
private

Number of elements currently active in the mesh.

Definition at line 245 of file hpAdaptiveSpaceDG.hh.

◆ spc_

template<class F >
concepts::Sequence<F*> hp2D::hpAdaptiveSpaceDG< F >::spc_
protected

The separate spaces for each sub-domain.

Definition at line 237 of file hpAdaptiveSpaceDG.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich