dune-fem 2.8.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::Fem::GenericAdaptiveDofMapper< TraitsImp > Class Template Reference

#include <dune/fem/space/mapper/genericadaptivedofmapper.hh>

Inheritance diagram for Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >:
Inheritance graph

Classes

struct  EntityDofStorage
 
struct  InsertSubEntities
 
struct  NumDofs
 
struct  NumDofs< codim, true >
 
struct  PolynomialOrderStorage
 
struct  RemoveSubEntities
 

Public Types

enum  { minOrder = 1 }
 
enum  { maxOrder = polynomialOrder }
 
enum  { numOrders = maxOrder - minOrder + 1 }
 
typedef TraitsImp Traits
 
typedef std::size_t SizeType
 
typedef Traits::GridPartType GridPartType
 type of the grid part
 
typedef Traits::ElementType ElementType
 type of entities (codim 0)
 
typedef GridPartType::GridType GridType
 type of the underlying grid
 
typedef GridPartType::IndexSetType IndexSetType
 type of the index set
 
typedef Traits::GlobalKeyType GlobalKeyType
 type of global key
 
typedef GridType::ctype FieldType
 type of coordinates within the grid
 
typedef Traits::CompiledLocalKeyVectorType CompiledLocalKeyVectorType
 type of vector containing compiled local keys
 
typedef CompiledLocalKeyVectorType::value_type::value_type CompiledLocalKeyType
 compiled local key type
 
typedef DofManager< GridTypeDofManagerType
 type of the DoF manager
 
typedef EntityDofStorage EntityDofStorageType
 
typedef PolynomialOrderStorage PolynomialOrderStorageType
 
typedef PersistentContainer< GridType, EntityDofStorageTypeDofContainerType
 
typedef PersistentContainer< GridType, PolynomialOrderStorageTypePolyOrderContainerType
 
typedef Traits::DofMapperType DofMapperType
 type of the DofMapper implementation
 
typedef ElementType EntityType
 

Public Member Functions

 GenericAdaptiveDofMapper (const GridPartType &gridPart, const int order, CompiledLocalKeyVectorType &compiledLocalKeyVector)
 constructor
 
 GenericAdaptiveDofMapper (const GenericAdaptiveDofMapper &other, const int order, CompiledLocalKeyVectorType &compiledLocalKeyVector)
 sort of copy constructor
 
int polynomOrder (const ElementType &entity) const
 
int suggestedOrder (const ElementType &entity) const
 
void suggestPolynomOrder (const ElementType &entity, const int polOrd)
 
DofContainerTypedofContainer (const std::size_t codim) const
 
const CompiledLocalKeyTypecompiledLocalKey (const int polOrd, const GeometryType type) const
 
virtual ~GenericAdaptiveDofMapper ()
 destructor
 
int size () const
 return overall number of degrees of freedom
 
template<class Functor >
void mapEach (const ElementType &element, Functor f) const
 
int mapToGlobal (const ElementType &entity, const int localDof) const
 
template<class Entity , class Functor >
void mapEachEntityDof (const Entity &entity, Functor f) const
 map each local DoF number to a global key
 
void onSubEntity (const ElementType &element, int i, int c, std::vector< bool > &indices) const
 
void map (const ElementType &element, std::vector< SizeType > &indices) const
 
template<class Entity >
void mapEntityDofs (const Entity &entity, std::vector< SizeType > &indices) const
 
int maxNumDofs () const
 obtain maximal number of DoFs on one entity
 
int numDofs (const ElementType &entity) const
 obtain number of DoFs on an entity
 
template<class Entity >
int numEntityDofs (const Entity &entity) const
 obtain number of DoFs actually belonging to an entity
 
bool contains (int codim) const
 Check, whether any DoFs are associated with a codimension.
 
bool fixedDataSize (int codim) const
 Check, whether the data in a codimension has fixed size.
 
int oldIndex (const int hole, const int block) const
 
int newIndex (const int hole, const int block) const
 
int numberOfHoles (const int block) const
 
int numBlocks () const
 
int oldOffSet (const int block) const
 
int offSet (const int block) const
 
bool consecutive () const
 
void resizeContainers ()
 
void insertEntity (const ElementType &entity)
 
unsigned int insertEntityDofs (const ElementType &entity)
 
void removeEntity (const ElementType &entity)
 
void resize ()
 
void adapt ()
 adjust mapper to newly set polynomial orders
 
unsigned int insertFather (const ElementType &entity)
 
bool considerHierarchy () const
 return true if elements can be refined more than once during adaptation
 
size_t insertAllUsed ()
 return number of DoFs currently used for space
 
void printDofs () const
 
void printEntityDofs (const ElementType &entity) const
 
void setUnused ()
 reset all used flags of all DoF entries
 
bool compress ()
 
void backup () const
 
void restore ()
 
template<class InStream >
void read (InStream &in)
 
template<class OutStream >
void write (OutStream &out)
 
 GenericAdaptiveDofMapper (const ThisType &)=delete
 
ThisTypeoperator= (const ThisType &)=delete
 
void update ()
 update DoF mapping after grid modification
 

Static Public Attributes

static const bool discontinuousMapper = Traits :: discontinuousMapper
 
static const int dimension = GridType::dimension
 dimension of the grid
 
static const int highestDimension = ( discontinuousMapper ) ? 0 : dimension
 highest codimension used to attach dofs
 
static const int polynomialOrder = Traits::polynomialOrder
 order of the Lagrange polynoms
 

Protected Member Functions

const Implementation & asImp () const
 
Implementation & asImp ()
 

Static Protected Member Functions

static const Implementation & asImp (const ThisType &other)
 
static Implementation & asImp (ThisType &other)
 
static const DofMapperTraits ::DofMapperTypeasImp (const ThisType &other)
 
static DofMapperTraits ::DofMapperTypeasImp (ThisType &other)
 

Member Typedef Documentation

◆ CompiledLocalKeyType

template<class TraitsImp >
typedef CompiledLocalKeyVectorType::value_type::value_type Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::CompiledLocalKeyType

compiled local key type

◆ CompiledLocalKeyVectorType

template<class TraitsImp >
typedef Traits::CompiledLocalKeyVectorType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::CompiledLocalKeyVectorType

type of vector containing compiled local keys

◆ DofContainerType

template<class TraitsImp >
typedef PersistentContainer< GridType, EntityDofStorageType > Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::DofContainerType

◆ DofManagerType

template<class TraitsImp >
typedef DofManager< GridType > Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::DofManagerType

type of the DoF manager

◆ DofMapperType

template<class DofMapperTraits >
typedef Traits::DofMapperType Dune::Fem::DofMapper< DofMapperTraits >::DofMapperType
inherited

type of the DofMapper implementation

◆ ElementType

template<class TraitsImp >
typedef Traits::ElementType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::ElementType

type of entities (codim 0)

◆ EntityDofStorageType

template<class TraitsImp >
typedef EntityDofStorage Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::EntityDofStorageType

◆ EntityType

template<class DofMapperTraits >
typedef ElementType Dune::Fem::DofMapper< DofMapperTraits >::EntityType
inherited

◆ FieldType

template<class TraitsImp >
typedef GridType::ctype Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::FieldType

type of coordinates within the grid

◆ GlobalKeyType

template<class TraitsImp >
typedef Traits::GlobalKeyType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GlobalKeyType

type of global key

◆ GridPartType

template<class TraitsImp >
typedef Traits::GridPartType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GridPartType

type of the grid part

◆ GridType

template<class TraitsImp >
typedef GridPartType::GridType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GridType

type of the underlying grid

◆ IndexSetType

template<class TraitsImp >
typedef GridPartType::IndexSetType Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::IndexSetType

type of the index set

◆ PolynomialOrderStorageType

template<class TraitsImp >
typedef PolynomialOrderStorage Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::PolynomialOrderStorageType

◆ PolyOrderContainerType

template<class TraitsImp >
typedef PersistentContainer< GridType, PolynomialOrderStorageType > Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::PolyOrderContainerType

◆ SizeType

template<class TraitsImp >
typedef std::size_t Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::SizeType

◆ Traits

template<class TraitsImp >
typedef TraitsImp Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::Traits

Member Enumeration Documentation

◆ anonymous enum

template<class TraitsImp >
anonymous enum
Enumerator
minOrder 

◆ anonymous enum

template<class TraitsImp >
anonymous enum
Enumerator
maxOrder 

◆ anonymous enum

template<class TraitsImp >
anonymous enum
Enumerator
numOrders 

Constructor & Destructor Documentation

◆ GenericAdaptiveDofMapper() [1/3]

template<class TraitsImp >
Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GenericAdaptiveDofMapper ( const GridPartType gridPart,
const int  order,
CompiledLocalKeyVectorType compiledLocalKeyVector 
)
inline

constructor

◆ GenericAdaptiveDofMapper() [2/3]

template<class TraitsImp >
Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GenericAdaptiveDofMapper ( const GenericAdaptiveDofMapper< TraitsImp > &  other,
const int  order,
CompiledLocalKeyVectorType compiledLocalKeyVector 
)
inline

sort of copy constructor

◆ ~GenericAdaptiveDofMapper()

template<class TraitsImp >
virtual Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::~GenericAdaptiveDofMapper ( )
inlinevirtual

destructor

◆ GenericAdaptiveDofMapper() [3/3]

template<class TraitsImp >
Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::GenericAdaptiveDofMapper ( const ThisType )
delete

Member Function Documentation

◆ adapt()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::adapt ( )
inline

adjust mapper to newly set polynomial orders

◆ asImp() [1/6]

Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/6]

const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited

◆ asImp() [3/6]

static const DofMapperTraits ::DofMapperType & Dune::Fem::BartonNackmanInterface< DofMapper< DofMapperTraits > , DofMapperTraits ::DofMapperType >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [4/6]

static const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [5/6]

static DofMapperTraits ::DofMapperType & Dune::Fem::BartonNackmanInterface< DofMapper< DofMapperTraits > , DofMapperTraits ::DofMapperType >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ asImp() [6/6]

static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ backup()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::backup ( ) const
inline

◆ compiledLocalKey()

template<class TraitsImp >
const CompiledLocalKeyType & Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::compiledLocalKey ( const int  polOrd,
const GeometryType  type 
) const
inline

◆ compress()

template<class TraitsImp >
bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::compress ( )
inline

◆ consecutive()

template<class TraitsImp >
bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::consecutive ( ) const
inline

◆ considerHierarchy()

template<class TraitsImp >
bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::considerHierarchy ( ) const
inline

return true if elements can be refined more than once during adaptation

◆ contains()

template<class TraitsImp >
bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::contains ( int  codim) const
inline

Check, whether any DoFs are associated with a codimension.

◆ dofContainer()

template<class TraitsImp >
DofContainerType & Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::dofContainer ( const std::size_t  codim) const
inline

◆ fixedDataSize()

template<class TraitsImp >
bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::fixedDataSize ( int  codim) const
inline

Check, whether the data in a codimension has fixed size.

◆ insertAllUsed()

template<class TraitsImp >
size_t Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::insertAllUsed ( )
inline

return number of DoFs currently used for space

◆ insertEntity()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::insertEntity ( const ElementType entity)
inline

◆ insertEntityDofs()

template<class TraitsImp >
unsigned int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::insertEntityDofs ( const ElementType entity)
inline

◆ insertFather()

template<class TraitsImp >
unsigned int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::insertFather ( const ElementType entity)
inline

◆ map()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::map ( const ElementType element,
std::vector< SizeType > &  indices 
) const
inline

◆ mapEach()

template<class TraitsImp >
template<class Functor >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::mapEach ( const ElementType element,
Functor  f 
) const
inline

◆ mapEachEntityDof()

template<class TraitsImp >
template<class Entity , class Functor >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::mapEachEntityDof ( const Entity &  entity,
Functor  f 
) const
inline

map each local DoF number to a global key

Parameters
[in]entityentity, the DoFs belong to
[in]ffunctor to call for each DoF

The functor has to be a copyable object satisfying the following interface:

struct Functor
{
// application operator
template< class GlobalKey >
void operator() ( const int localDoF, const GlobalKey &globalKey );
};

For each DoF to be mapped, this method will call the application operator once.

Note
There is no guarantee on the order, in which the functor is applied.
The global key has to be compatible with the Dof storage.

◆ mapEntityDofs()

template<class TraitsImp >
template<class Entity >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::mapEntityDofs ( const Entity &  entity,
std::vector< SizeType > &  indices 
) const
inline

◆ mapToGlobal()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::mapToGlobal ( const ElementType entity,
const int  localDof 
) const
inline

◆ maxNumDofs()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::maxNumDofs ( ) const
inline

obtain maximal number of DoFs on one entity

◆ newIndex()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::newIndex ( const int  hole,
const int  block 
) const
inline

◆ numberOfHoles()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::numberOfHoles ( const int  block) const
inline

◆ numBlocks()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::numBlocks ( ) const
inline

◆ numDofs()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::numDofs ( const ElementType entity) const
inline

obtain number of DoFs on an entity

Parameters
[in]elemententity of codimension 0
Returns
number of DoFs on the entity

◆ numEntityDofs()

template<class TraitsImp >
template<class Entity >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::numEntityDofs ( const Entity &  entity) const
inline

obtain number of DoFs actually belonging to an entity

In contrast to numDofs, this method returns the number of DoFs actually associated with an entity (usually a subentity). We have the following relation for an entity $E$ of codimension 0:

\[
\mathrm{numDofs}( E ) = \sum_{e \subset E} \mathrm{numEntityDofs}( e ),
\]

where $\subset$ denotes the subentity relation.

Parameters
[in]entityentity of codimension
Returns
number of DoFs on the entity

◆ offSet()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::offSet ( const int  block) const
inline

◆ oldIndex()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::oldIndex ( const int  hole,
const int  block 
) const
inline

◆ oldOffSet()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::oldOffSet ( const int  block) const
inline

◆ onSubEntity()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::onSubEntity ( const ElementType element,
int  i,
int  c,
std::vector< bool > &  indices 
) const
inline

◆ operator=()

template<class TraitsImp >
ThisType & Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::operator= ( const ThisType )
delete

◆ polynomOrder()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::polynomOrder ( const ElementType entity) const
inline

◆ printDofs()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::printDofs ( ) const
inline

◆ printEntityDofs()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::printEntityDofs ( const ElementType entity) const
inline

◆ read()

template<class TraitsImp >
template<class InStream >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::read ( InStream &  in)
inline

◆ removeEntity()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::removeEntity ( const ElementType entity)
inline

◆ resize()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::resize ( )
inline

◆ resizeContainers()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::resizeContainers ( )
inline

◆ restore()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::restore ( )
inline

◆ setUnused()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::setUnused ( )
inline

reset all used flags of all DoF entries

◆ size()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::size ( ) const
inline

return overall number of degrees of freedom

◆ suggestedOrder()

template<class TraitsImp >
int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::suggestedOrder ( const ElementType entity) const
inline

◆ suggestPolynomOrder()

template<class TraitsImp >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::suggestPolynomOrder ( const ElementType entity,
const int  polOrd 
)
inline

◆ update()

void Dune::Fem::AdaptiveDofMapper< TraitsImp >::update ( )
inlineinherited

update DoF mapping after grid modification

Adaptive DoF mappers are considered to be always up to date and this method does nothing.

◆ write()

template<class TraitsImp >
template<class OutStream >
void Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::write ( OutStream &  out)
inline

Member Data Documentation

◆ dimension

template<class TraitsImp >
const int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::dimension = GridType::dimension
static

dimension of the grid

◆ discontinuousMapper

template<class TraitsImp >
const bool Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::discontinuousMapper = Traits :: discontinuousMapper
static

◆ highestDimension

template<class TraitsImp >
const int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::highestDimension = ( discontinuousMapper ) ? 0 : dimension
static

highest codimension used to attach dofs

◆ polynomialOrder

template<class TraitsImp >
const int Dune::Fem::GenericAdaptiveDofMapper< TraitsImp >::polynomialOrder = Traits::polynomialOrder
static

order of the Lagrange polynoms


The documentation for this class was generated from the following file: