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

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

Inheritance diagram for Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >:
Inheritance graph

Classes

struct  BuildFunctor
 
struct  MapFunctor
 
struct  SubEntityFilter
 
struct  SubEntityInfo
 

Public Types

typedef std::size_t SizeType
 
typedef SizeType GlobalKeyType
 
typedef GridPart GridPartType
 
typedef LocalDofMapping LocalDofMappingType
 
typedef GridPart::GridType GridType
 
typedef GridPartType::template Codim< 0 >::EntityType ElementType
 

Public Member Functions

template<class CodeFactory >
 DofMapperBase (const GridPartType &gridPart, LocalDofMappingType localDofMapping, const CodeFactory &codeFactory)
 
template<class Functor >
void mapEach (const ElementType &element, Functor f) const
 map each local DoF number to a global one
 
void map (const ElementType &element, std::vector< GlobalKeyType > &indices) const
 
void onSubEntity (const ElementType &element, int i, int c, std::vector< bool > &indices) const
 fills a vector of bools with true indicating that the corresponding local degree of freedom is attached to the subentity specified by the (c,i) pair. A local dof is attached to a subentity S if it is attached either to that subentity or to a subentity S'<S i.e. S' has codimension greater than c and lies within S. For example all dofs are attached to the element itself and dofs attached to a vertex of an edge are also attached to that edge.
 
unsigned int maxNumDofs () const
 
unsigned int numDofs (const ElementType &element) const
 
template<class Entity , class Functor >
void mapEachEntityDof (const Entity &entity, Functor f) const
 
template<class Entity >
void mapEntityDofs (const Entity &entity, std::vector< GlobalKeyType > &indices) const
 
template<class Entity >
unsigned int numEntityDofs (const Entity &entity) const
 
bool contains (int codim) const
 
bool fixedDataSize (int codim) const
 
SizeType size () const
 
void update ()
 update mapper offsets
 
SizeType numBlocks () const
 
SizeType numberOfHoles (int) const
 
GlobalKeyType oldIndex (int hole, int) const
 
GlobalKeyType newIndex (int hole, int) const
 
SizeType oldOffSet (int) const
 
SizeType offSet (int) const
 
template<class Entity >
void insertEntity (const Entity &entity)
 
template<class Entity >
void removeEntity (const Entity &entity)
 
void resize ()
 
bool compress ()
 
void backup () const
 
void restore ()
 
template<class StreamTraits >
void write (OutStreamInterface< StreamTraits > &out) const
 
template<class StreamTraits >
void read (InStreamInterface< StreamTraits > &in)
 

Static Public Member Functions

static constexpr bool consecutive () noexcept
 

Protected Types

enum  CodimType { CodimEmpty , CodimFixedSize , CodimVariableSize }
 
typedef Dune::ReferenceElements< typename GridPart::ctype, dimensionRefElementsType
 
typedef RefElementsType::ReferenceElement RefElementType
 
typedef GridPartType::IndexSetType IndexSetType
 
typedef std::vector< GeometryType > BlockMapType
 

Protected Member Functions

void requestCodimensions ()
 submit request for codimensions used to index set
 
const DofMapperCodecode (const GeometryType &gt) const
 
const DofMapperCodecode (const ElementType &element) const
 
template<class Entity >
const SubEntityInfosubEntityInfo (const Entity &entity) const
 
const IndexSetTypeindexSet () const
 

Protected Attributes

const IndexSetTypeindexSet_
 
LocalDofMapping localDofMapping_
 
std::vector< DofMapperCodecode_
 
unsigned int maxNumDofs_
 
SizeType size_
 
std::vector< SubEntityInfosubEntityInfo_
 
BlockMapType blockMap_
 
CodimType codimType_ [dimension+1]
 

Static Protected Attributes

static const int dimension = GridPart::dimension
 

Member Typedef Documentation

◆ BlockMapType

template<class GridPart , class LocalDofMapping >
typedef std::vector< GeometryType > Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::BlockMapType
protected

◆ ElementType

template<class GridPart , class LocalDofMapping >
typedef GridPartType::template Codim<0>::EntityType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::ElementType

◆ GlobalKeyType

template<class GridPart , class LocalDofMapping >
typedef SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::GlobalKeyType

◆ GridPartType

template<class GridPart , class LocalDofMapping >
typedef GridPart Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::GridPartType

◆ GridType

template<class GridPart , class LocalDofMapping >
typedef GridPart::GridType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::GridType

◆ IndexSetType

template<class GridPart , class LocalDofMapping >
typedef GridPartType::IndexSetType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::IndexSetType
protected

◆ LocalDofMappingType

template<class GridPart , class LocalDofMapping >
typedef LocalDofMapping Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::LocalDofMappingType

◆ RefElementsType

template<class GridPart , class LocalDofMapping >
typedef Dune::ReferenceElements< typename GridPart::ctype, dimension > Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::RefElementsType
protected

◆ RefElementType

template<class GridPart , class LocalDofMapping >
typedef RefElementsType::ReferenceElement Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::RefElementType
protected

◆ SizeType

template<class GridPart , class LocalDofMapping >
typedef std::size_t Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::SizeType

Member Enumeration Documentation

◆ CodimType

template<class GridPart , class LocalDofMapping >
enum Dune::Fem::__IndexSetDofMapper::DofMapperBase::CodimType
protected
Enumerator
CodimEmpty 
CodimFixedSize 
CodimVariableSize 

Constructor & Destructor Documentation

◆ DofMapperBase()

template<class GridPart , class LocalDofMapping >
template<class CodeFactory >
Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::DofMapperBase ( const GridPartType gridPart,
LocalDofMappingType  localDofMapping,
const CodeFactory &  codeFactory 
)
inline

Member Function Documentation

◆ backup()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::backup ( ) const
inline

◆ code() [1/2]

template<class GridPart , class LocalDofMapping >
const DofMapperCode & Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::code ( const ElementType element) const
inlineprotected

◆ code() [2/2]

template<class GridPart , class LocalDofMapping >
const DofMapperCode & Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::code ( const GeometryType &  gt) const
inlineprotected

◆ compress()

template<class GridPart , class LocalDofMapping >
bool Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::compress ( )
inline

◆ consecutive()

template<class GridPart , class LocalDofMapping >
static constexpr bool Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::consecutive ( )
inlinestaticconstexprnoexcept

◆ contains()

template<class GridPart , class LocalDofMapping >
bool Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::contains ( int  codim) const
inline

◆ fixedDataSize()

template<class GridPart , class LocalDofMapping >
bool Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::fixedDataSize ( int  codim) const
inline

◆ indexSet()

template<class GridPart , class LocalDofMapping >
const IndexSetType & Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::indexSet ( ) const
inlineprotected

◆ insertEntity()

template<class GridPart , class LocalDofMapping >
template<class Entity >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::insertEntity ( const Entity &  entity)
inline

◆ map()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::map ( const ElementType element,
std::vector< GlobalKeyType > &  indices 
) const
inline

◆ mapEach()

template<class GridPart , class LocalDofMapping >
template<class Functor >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::mapEach ( const ElementType element,
Functor  f 
) const
inline

map each local DoF number to a global one

Parameters
[in]elementelement, 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
void operator() ( int localDoF, int globalDoF );
};

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.

◆ mapEachEntityDof()

template<class GridPart , class LocalDofMapping >
template<class Entity , class Functor >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::mapEachEntityDof ( const Entity &  entity,
Functor  f 
) const
inline

◆ mapEntityDofs()

template<class GridPart , class LocalDofMapping >
template<class Entity >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::mapEntityDofs ( const Entity &  entity,
std::vector< GlobalKeyType > &  indices 
) const
inline

◆ maxNumDofs()

template<class GridPart , class LocalDofMapping >
unsigned int Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::maxNumDofs ( ) const
inline

◆ newIndex()

template<class GridPart , class LocalDofMapping >
GlobalKeyType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::newIndex ( int  hole,
int   
) const
inline

◆ numberOfHoles()

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::numberOfHoles ( int  ) const
inline

◆ numBlocks()

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::numBlocks ( ) const
inline

◆ numDofs()

template<class GridPart , class LocalDofMapping >
unsigned int Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::numDofs ( const ElementType element) const
inline

◆ numEntityDofs()

template<class GridPart , class LocalDofMapping >
template<class Entity >
unsigned int Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::numEntityDofs ( const Entity &  entity) const
inline

◆ offSet()

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::offSet ( int  ) const
inline

◆ oldIndex()

template<class GridPart , class LocalDofMapping >
GlobalKeyType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::oldIndex ( int  hole,
int   
) const
inline

◆ oldOffSet()

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::oldOffSet ( int  ) const
inline

◆ onSubEntity()

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

fills a vector of bools with true indicating that the corresponding local degree of freedom is attached to the subentity specified by the (c,i) pair. A local dof is attached to a subentity S if it is attached either to that subentity or to a subentity S'<S i.e. S' has codimension greater than c and lies within S. For example all dofs are attached to the element itself and dofs attached to a vertex of an edge are also attached to that edge.

◆ read()

template<class GridPart , class LocalDofMapping >
template<class StreamTraits >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::read ( InStreamInterface< StreamTraits > &  in)
inline

◆ removeEntity()

template<class GridPart , class LocalDofMapping >
template<class Entity >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::removeEntity ( const Entity &  entity)
inline

◆ requestCodimensions()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::requestCodimensions
inlineprotected

submit request for codimensions used to index set

◆ resize()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::resize ( )
inline

◆ restore()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::restore ( )
inline

◆ size()

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::size ( ) const
inline

◆ subEntityInfo()

template<class GridPart , class LocalDofMapping >
template<class Entity >
const DofMapperBase< GridPart, LocalDofMapping >::SubEntityInfo & Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::subEntityInfo ( const Entity &  entity) const
inlineprotected

◆ update()

template<class GridPart , class LocalDofMapping >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::update
inline

update mapper offsets

◆ write()

template<class GridPart , class LocalDofMapping >
template<class StreamTraits >
void Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::write ( OutStreamInterface< StreamTraits > &  out) const
inline

Member Data Documentation

◆ blockMap_

template<class GridPart , class LocalDofMapping >
BlockMapType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::blockMap_
protected

◆ code_

template<class GridPart , class LocalDofMapping >
std::vector< DofMapperCode > Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::code_
protected

◆ codimType_

template<class GridPart , class LocalDofMapping >
CodimType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::codimType_[dimension+1]
protected

◆ dimension

template<class GridPart , class LocalDofMapping >
const int Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::dimension = GridPart::dimension
staticprotected

◆ indexSet_

template<class GridPart , class LocalDofMapping >
const IndexSetType& Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::indexSet_
protected

◆ localDofMapping_

template<class GridPart , class LocalDofMapping >
LocalDofMapping Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::localDofMapping_
protected

◆ maxNumDofs_

template<class GridPart , class LocalDofMapping >
unsigned int Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::maxNumDofs_
protected

◆ size_

template<class GridPart , class LocalDofMapping >
SizeType Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::size_
protected

◆ subEntityInfo_

template<class GridPart , class LocalDofMapping >
std::vector< SubEntityInfo > Dune::Fem::__IndexSetDofMapper::DofMapperBase< GridPart, LocalDofMapping >::subEntityInfo_
protected

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