dune-fem 2.8.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys > Struct Template Reference

An $hp$-adaptive Dune::Fem::DofMapper. More...

#include <dune/fem/space/hpdg/blockmapper.hh>

Inheritance diagram for Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >:
Inheritance graph

Classes

struct  Reserve
 
struct  Resize
 

Public Types

using ThisType = DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >
 
using BaseType = AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >
 
using SizeType = typename BaseType::SizeType
 size type
 
using GlobalKeyType = typename BaseType::GlobalKeyType
 global key type
 
using GridPartType = GridPart
 grid part type
 
using ElementType = typename BaseType::ElementType
 element type
 
using LocalKeysType = LocalKeys
 basis function sets type
 
using KeyType = typename LocalKeysType::KeyType
 key type
 
using DofManagerType = DofManager< GridType >
 dof manager type
 
typedef DofMapperTraits Traits
 
typedef Traits::DofMapperType DofMapperType
 type of the DofMapper implementation
 
typedef ElementType EntityType
 

Public Member Functions

bool consecutive () const
 return true if compress will affect data
 
SizeType oldOffSet (const int block) const
 return old offsets for given block
 
SizeType offSet (const int block) const
 return current offsets for given block
 
SizeType numBlocks () const
 return number of supported blocks
 
void update ()
 update DoF mapping after grid modification
 
bool contains (const int codim) const
 returns true if DoFs for given codimension exist
 
bool fixedDataSize (const int codim) const
 Check, whether the data in a codimension has fixed size.
 
template<class Functor >
void mapEach (const ElementType &element, Functor f) const
 map each local DoF number to a global key
 
template<class Entity , class Functor >
void mapEachEntityDof (const Entity &entity, Functor f) const
 map each local DoF number to a global key
 
Construction
template<class Function >
 DiscontinuousGalerkinBlockMapper (const GridPartType &gridPart, const LocalKeysType &localKeys, const KeyType &value, Function function)
 
 DiscontinuousGalerkinBlockMapper (const GridPartType &gridPart, const LocalKeysType &localKeys, const KeyType &value)
 
Copying and assignment
 DiscontinuousGalerkinBlockMapper (const ThisType &)=delete
 copy constructor
 
 DiscontinuousGalerkinBlockMapper (ThisType &&)=default
 move constructor
 
ThisTypeoperator= (const ThisType &)=delete
 assignment operator
 
ThisTypeoperator= (ThisType &&)=default
 move assignment operator
 
Adaptation interface
template<class Element >
std::enable_if<(std::is_same< Element, ElementType >::value||std::is_same< Element, GridElementType >::value), constKeyType & >::type key (const Element &element) const
 get key currently assigned to an entity
 
void mark (const KeyType &key, const ElementType &element)
 set key to be assigned to an entity after next call to adapt()
 
KeyType getMark (const ElementType &element) const
 get key to be assigned to an entity after next call to adapt()
 
template<class Function >
bool adapt (Function function)
 please doc me
 
bool adapt ()
 please doc me
 

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)
 

Public interface for adaptation managers

const DofManagerTypedofManager () const
 return DOF manager
 
void insertEntity (const GridElementType &gridElement)
 add DOFs for element
 
void removeEntity (const GridElementType &gridElement)
 mark DOFs for removal
 
void insertNewEntity (const GridElementType &gridElement)
 add DOFs for new element
 
void resize ()
 
bool compress ()
 compress DOF mapping
 
template<class Traits >
void write (OutStreamInterface< Traits > &)
 this mapper has no I/O capabilities
 
template<class Traits >
void read (InStreamInterface< Traits > &)
 this mapper has no I/O capabilities
 
void backup () const
 this mapper has no I/O capabilities
 
void restore ()
 this mapper has no I/O capabilities
 

Interface methods

SizeType size () const
 return number of dofs
 
int maxNumDofs () const
 return upper bound for number of dofs
 
SizeType numDofs (const ElementType &element) const
 return number of dofs for given element
 
template<class Entity >
SizeType numEntityDofs (const Entity &entity) const
 return number of dofs for given element
 
void onSubEntity (const ElementType &element, int i, int c, std::vector< bool > &indices) const
 
template<class Function >
void mapEach (const ElementType &element, Function function) const
 map local dof to global key
 
template<class Entity , class Function >
void mapEachEntityDof (const Entity &entity, Function function) const
 map local dof to global key
 
SizeType numberOfHoles (const int block) const
 return number of holes during compression
 
GlobalKeyType oldIndex (const int hole, const int block) const
 return old index of given hole during compression
 
GlobalKeyType newIndex (const int hole, const int block) const
 return new index of given hole during compression
 
static constexpr bool contains (const int codim)
 return true if dofs are associated to codimension
 
static constexpr bool fixedDataSize (int codim)
 return true if number of dofs is fixed for given codimension
 
static constexpr bool consecutive ()
 return true (this mapper yields a consecutive DOF numbering)
 
static constexpr SizeType oldOffSet (const int block)
 return 0 (this mapper has no offset)
 
static constexpr SizeType offSet (const int block)
 return 0 (this mapper has no offset)
 
static constexpr SizeType numBlocks ()
 return 1 (this mapper has one block)
 

Detailed Description

template<class GridPart, class LocalKeys>
struct Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >

An $hp$-adaptive Dune::Fem::DofMapper.

Template Parameters
GridParta Dune::Fem::GridPart type
LocalKeyssee documentation below
Note
The second template parameter is required to provide the following member methods:
struct LocalKeys
{
// type of key
using KeyType = ImplementationDefined;
// type of data
using DataType = ImplementationDefined;
// return maximum number of dofs associated with an entity
std::size_t maxBlocks () const;
// return maximum number of dofs for given type and key
std::size_t blocks ( GeometryType type, const KeyType &key ) const;
// map key to data type
DataType encode ( const KeyType &key ) const;
// map data to key type
KeyType decode ( const DataType &data ) const;
};
typename LocalKeysType::KeyType KeyType
key type
Definition: blockmapper.hh:120

Member Typedef Documentation

◆ BaseType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::BaseType = AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >

◆ DofManagerType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::DofManagerType = DofManager< GridType >

dof manager type

◆ DofMapperType

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

type of the DofMapper implementation

◆ ElementType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::ElementType = typename BaseType::ElementType

element type

◆ EntityType

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

◆ GlobalKeyType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::GlobalKeyType = typename BaseType::GlobalKeyType

global key type

◆ GridPartType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::GridPartType = GridPart

grid part type

◆ KeyType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::KeyType = typename LocalKeysType::KeyType

key type

◆ LocalKeysType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::LocalKeysType = LocalKeys

basis function sets type

◆ SizeType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::SizeType = typename BaseType::SizeType

size type

◆ ThisType

template<class GridPart , class LocalKeys >
using Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::ThisType = DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >

◆ Traits

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

Constructor & Destructor Documentation

◆ DiscontinuousGalerkinBlockMapper() [1/4]

template<class GridPart , class LocalKeys >
template<class Function >
Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::DiscontinuousGalerkinBlockMapper ( const GridPartType gridPart,
const LocalKeysType localKeys,
const KeyType value,
Function  function 
)
inline

◆ DiscontinuousGalerkinBlockMapper() [2/4]

template<class GridPart , class LocalKeys >
Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::DiscontinuousGalerkinBlockMapper ( const GridPartType gridPart,
const LocalKeysType localKeys,
const KeyType value 
)
inline

◆ DiscontinuousGalerkinBlockMapper() [3/4]

template<class GridPart , class LocalKeys >
Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::DiscontinuousGalerkinBlockMapper ( const ThisType )
delete

copy constructor

◆ DiscontinuousGalerkinBlockMapper() [4/4]

template<class GridPart , class LocalKeys >
Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::DiscontinuousGalerkinBlockMapper ( ThisType &&  )
default

move constructor

Member Function Documentation

◆ adapt() [1/2]

template<class GridPart , class LocalKeys >
bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::adapt ( )
inline

please doc me

◆ adapt() [2/2]

template<class GridPart , class LocalKeys >
template<class Function >
bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::adapt ( Function  function)

please doc me

◆ 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 GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::backup ( ) const
inline

this mapper has no I/O capabilities

◆ compress()

template<class GridPart , class LocalKeys >
bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::compress

compress DOF mapping

◆ consecutive() [1/2]

template<class GridPart , class LocalKeys >
static constexpr bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::consecutive ( )
inlinestaticconstexpr

return true (this mapper yields a consecutive DOF numbering)

◆ consecutive() [2/2]

bool Dune::Fem::AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >::consecutive ( ) const
inlineinherited

return true if compress will affect data

◆ contains() [1/2]

template<class GridPart , class LocalKeys >
static constexpr bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::contains ( const int  codim)
inlinestaticconstexpr

return true if dofs are associated to codimension

◆ contains() [2/2]

template<class DofMapperTraits >
bool Dune::Fem::DofMapper< DofMapperTraits >::contains ( const int  codim) const
inlineinherited

returns true if DoFs for given codimension exist

Parameters
[in]codimcodimension to check
Returns
true if DoFs for codimension exist

◆ dofManager()

template<class GridPart , class LocalKeys >
const DofManagerType & Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::dofManager ( ) const
inline

return DOF manager

◆ fixedDataSize() [1/2]

template<class DofMapperTraits >
bool Dune::Fem::DofMapper< DofMapperTraits >::fixedDataSize ( const int  codim) const
inlineinherited

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

◆ fixedDataSize() [2/2]

template<class GridPart , class LocalKeys >
static constexpr bool Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::fixedDataSize ( int  codim)
inlinestaticconstexpr

return true if number of dofs is fixed for given codimension

◆ getMark()

template<class GridPart , class LocalKeys >
KeyType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::getMark ( const ElementType element) const
inline

get key to be assigned to an entity after next call to adapt()

◆ insertEntity()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::insertEntity ( const GridElementType &  gridElement)
inline

add DOFs for element

◆ insertNewEntity()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::insertNewEntity ( const GridElementType &  gridElement)
inline

add DOFs for new element

◆ key()

template<class GridPart , class LocalKeys >
template<class Element >
std::enable_if<(std::is_same< Element, ElementType >::value||std::is_same< Element, GridElementType >::value), constKeyType & >::type Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::key ( const Element &  element) const
inline

get key currently assigned to an entity

◆ mapEach() [1/2]

template<class GridPart , class LocalKeys >
template<class Function >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::mapEach ( const ElementType element,
Function  function 
) const
inline

map local dof to global key

◆ mapEach() [2/2]

template<class DofMapperTraits >
template<class Functor >
void Dune::Fem::DofMapper< DofMapperTraits >::mapEach ( const ElementType element,
Functor  f 
) const
inlineinherited

map each local DoF number to a global key

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
template< class GlobalKey >
void operator() ( const int localDoF, const GlobalKey &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.
The global key has to be compatible with the Dof storage.

◆ mapEachEntityDof() [1/2]

template<class GridPart , class LocalKeys >
template<class Entity , class Function >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::mapEachEntityDof ( const Entity &  entity,
Function  function 
) const
inline

map local dof to global key

◆ mapEachEntityDof() [2/2]

template<class DofMapperTraits >
template<class Entity , class Functor >
void Dune::Fem::DofMapper< DofMapperTraits >::mapEachEntityDof ( const Entity &  entity,
Functor  f 
) const
inlineinherited

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.

◆ mark()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::mark ( const KeyType key,
const ElementType element 
)
inline

set key to be assigned to an entity after next call to adapt()

◆ maxNumDofs()

template<class GridPart , class LocalKeys >
int Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::maxNumDofs ( ) const
inline

return upper bound for number of dofs

◆ newIndex()

template<class GridPart , class LocalKeys >
GlobalKeyType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::newIndex ( const int  hole,
const int  block 
) const
inline

return new index of given hole during compression

◆ numberOfHoles()

template<class GridPart , class LocalKeys >
SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::numberOfHoles ( const int  block) const
inline

return number of holes during compression

◆ numBlocks() [1/2]

template<class GridPart , class LocalKeys >
static constexpr SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::numBlocks ( )
inlinestaticconstexpr

return 1 (this mapper has one block)

◆ numBlocks() [2/2]

SizeType Dune::Fem::AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >::numBlocks ( ) const
inlineinherited

return number of supported blocks

◆ numDofs()

template<class GridPart , class LocalKeys >
SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::numDofs ( const ElementType element) const
inline

return number of dofs for given element

◆ numEntityDofs()

template<class GridPart , class LocalKeys >
template<class Entity >
SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::numEntityDofs ( const Entity &  entity) const
inline

return number of dofs for given element

◆ offSet() [1/2]

template<class GridPart , class LocalKeys >
static constexpr SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::offSet ( const int  block)
inlinestaticconstexpr

return 0 (this mapper has no offset)

◆ offSet() [2/2]

SizeType Dune::Fem::AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >::offSet ( const int  block) const
inlineinherited

return current offsets for given block

◆ oldIndex()

template<class GridPart , class LocalKeys >
GlobalKeyType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::oldIndex ( const int  hole,
const int  block 
) const
inline

return old index of given hole during compression

◆ oldOffSet() [1/2]

template<class GridPart , class LocalKeys >
static constexpr SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::oldOffSet ( const int  block)
inlinestaticconstexpr

return 0 (this mapper has no offset)

◆ oldOffSet() [2/2]

SizeType Dune::Fem::AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >::oldOffSet ( const int  block) const
inlineinherited

return old offsets for given block

◆ onSubEntity()

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

◆ operator=() [1/2]

template<class GridPart , class LocalKeys >
ThisType & Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::operator= ( const ThisType )
delete

assignment operator

◆ operator=() [2/2]

template<class GridPart , class LocalKeys >
ThisType & Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::operator= ( ThisType &&  )
default

move assignment operator

◆ read()

template<class GridPart , class LocalKeys >
template<class Traits >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::read ( InStreamInterface< Traits > &  )
inline

this mapper has no I/O capabilities

◆ removeEntity()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::removeEntity ( const GridElementType &  gridElement)
inline

mark DOFs for removal

◆ resize()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::resize ( )
inline

◆ restore()

template<class GridPart , class LocalKeys >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::restore ( )
inline

this mapper has no I/O capabilities

◆ size()

template<class GridPart , class LocalKeys >
SizeType Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::size ( ) const
inline

return number of dofs

◆ update()

void Dune::Fem::AdaptiveDofMapper< DiscontinuousGalerkinBlockMapperTraits< GridPart, LocalKeys > >::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 GridPart , class LocalKeys >
template<class Traits >
void Dune::Fem::hpDG::DiscontinuousGalerkinBlockMapper< GridPart, LocalKeys >::write ( OutStreamInterface< Traits > &  )
inline

this mapper has no I/O capabilities


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