DUNE-FEM (unstable)

Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage > Class Template Reference

adaptive DG discrete function space More...

#include <dune/fem/space/padaptivespace/discontinuousgalerkin.hh>

Public Types

typedef int IdentifierType
 type of identifier for this discrete function space
 
typedef DofManager< GridTypeDofManagerType
 type of DoF manager
 
typedef CommunicationManager< DiscreteFunctionSpaceTypeCommunicationManagerType
 type of communication manager
 
typedef AuxiliaryDofsType SlaveDofsType
 deprecated type
 

Public Member Functions

 PAdaptiveDGSpace (GridPartType &gridPart, const int order, const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
 constructor More...
 
 PAdaptiveDGSpace (GridPartType &gridPart, const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
 constructor More...
 
bool continuous (const IntersectionType &intersection) const
 returns true if the space contains only globally continuous functions More...
 
const CompiledLocalKeyType & lagrangePointSet (const GeometryType &type, const int order=BaseType::polynomialOrder) const
 Please doc me.
 
bool continuous () const
 returns true if the space contains only globally continuous functions More...
 
BlockMapperTypeblockMapper () const
 get a reference to the block mapper More...
 
template<class EntityType >
const CompiledLocalKeyType & compiledLocalKey (const EntityType &entity) const
 provide access to the compiled local keys for an entity More...
 
const CompiledLocalKeyType & compiledLocalKey (const GeometryType type, const int order=polynomialOrder) const
 provide access to the compiled local keys for a geometry type and polynomial order More...
 
BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity More...
 
DFSpaceIdentifier type () const
 return type identifier of discrete function space More...
 
BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity More...
 
bool continuous (const IntersectionType &intersection) const
 returns true if discrete functions over this space have zero jump over the given intersection. More...
 
int order () const
 get global order of space More...
 
int order (const typename BaseType::EntityType &entity) const
 get global order of space More...
 
int order (const EntityType &entity) const
 default implementation of the method order More...
 
bool multipleBaseFunctionSets () const
 this space has more than one base function set
 
ShapeFunctionSetType shapeFunctionSet (const EntityType &entity) const
 return shape function set for given entity More...
 
ShapeFunctionSetType shapeFunctionSet (const GeometryType &type, const int order=polynomialOrder) const
 return shape unique function set for geometry type More...
 
const CompiledLocalKeyType & compiledLocalKey (const EntityType &entity) const
 provide access to the compiled local keys for an entity More...
 
void adapt (const Vector &polynomialOrders, const int polOrderShift=0) const
 default implementation of adapt does nothing, its only used in PAdaptiveLagrangeSpace
 
int sequence () const
 get index of the sequence in grid sequences More...
 
const GridTypegrid () const
 get reference to grid this discrete function space belongs to More...
 
GridTypegrid ()
 get reference to grid this discrete function space belongs to More...
 
GridPartType & gridPart () const
 
GridPartType & gridPart ()
 get a reference to the associated grid partition More...
 
const IndexSetTypeindexSet () const
 Get a reference to the associated index set. More...
 
int size () const
 get number of DoFs for this space More...
 
int primarySize () const
 get number of primary DoFs for this space More...
 
int auxiliarySize () const
 get number of auxiliary DoFs for this space More...
 
int maxNumDofs () const
 return the maximal number of dofs on entities
 
IteratorType begin () const
 get iterator pointing to the first entity of the associated grid partition More...
 
IteratorType end () const
 get iterator pointing behind the last entity of the associated grid partition More...
 
void forEach (FunctorType &f) const
 apply a functor to each entity in the associated grid partition More...
 
bool multipleGeometryTypes () const
 returns true if the grid has more than one geometry type More...
 
bool multipleBasisFunctionSets () const
 returns true if base function sets depend on the entity More...
 
InterfaceType communicationInterface () const
 return the communication interface appropriate for this space More...
 
CommunicationDirection communicationDirection () const
 return the communication interface appropriate for this space More...
 
const CommunicationManagerTypecommunicator () const
 return reference to communicator (see CommunicationManager) More...
 
void communicate (DiscreteFunction &discreteFunction) const
 communicate data for given discrete function using the space's default communication operation More...
 
void communicate (DiscreteFunction &discreteFunction, const Operation &op) const
 communicate data for given discrete function More...
 
BaseType::template CommDataHandle< DiscreteFunction, Operation >::Type createDataHandle (DiscreteFunction &discreteFunction, const Operation &operation) const
 
const AuxiliaryDofsTypeauxiliaryDofs () const
 get auxiliary dofs
 
void addFunction (DiscreteFunction &df) const
 default implementation of addFunction does nothing at the moment
 
void removeFunction (DiscreteFunction &df) const
 default implementation of removeFunction does nothing at the moment
 
const std::vector< GeometryType > & geomTypes (int codim) const
 returns true if the grid has more than one geometry type More...
 
const AuxiliaryDofsTypeslaveDofs () const
 deprecated method, use auxiliaryDofs
 
Adaptation
KeyType key (const EntityType &entity) const
 get identifiying basis function set key assigned to given entity More...
 
void mark (const KeyType &key, const EntityType &entity)
 assign new key to given entity More...
 
KeyType getMark (const EntityType &entity) const
 get key to be assigned to an entity after next call to adapt() More...
 
void adapt ()
 p adaptation More...
 
void adapt (DataProjection< DiscreteFunctionSpace, Implementation > &projection)
 

Static Public Attributes

static const int polynomialOrder
 maximal available polynomial order
 
static const IdentifierType id
 identifier of this discrete function space
 
static constexpr std::size_t localBlockSize
 size of local blocks
 

Related Functions

(Note that these are not member functions.)

bool operator== (const DiscreteFunctionSpaceInterface< Traits > &X, const DiscreteFunctionSpaceInterface< Traits > &Y)
 check two spaces for equality More...
 

Detailed Description

template<class FunctionSpace, class GridPart, int polOrder, class Storage = CachingStorage>
class Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage >

adaptive DG discrete function space

Constructor & Destructor Documentation

◆ PAdaptiveDGSpace() [1/2]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage >::PAdaptiveDGSpace ( GridPartType &  gridPart,
const int  order,
const InterfaceType  commInterface = defaultInterface,
const CommunicationDirection  commDirection = defaultDirection 
)
inlineexplicit

constructor

Parameters
[in]gridPartgrid part for the Discontinuous Galerkin space
[in]orderdynamically set maximal polynomial order between 1 and maxPolOrder
[in]commInterfacecommunication interface to use (optional)
[in]commDirectioncommunication direction to use (optional)

◆ PAdaptiveDGSpace() [2/2]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage >::PAdaptiveDGSpace ( GridPartType &  gridPart,
const InterfaceType  commInterface = defaultInterface,
const CommunicationDirection  commDirection = defaultDirection 
)
inlineexplicit

constructor

Parameters
[in]gridPartgrid part for the Lagrange space
[in]commInterfacecommunication interface to use (optional)
[in]commDirectioncommunication direction to use (optional)

Member Function Documentation

◆ adapt()

void Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::adapt ( )
inlineinherited

p adaptation

Parameters
[in]functionoialOrders vector containing polynomial orders for each cell
[in]polOrderShiftpossible shift of polynomial order (i.e. in case of Taylor-Hood put -1 for the pressure) (default = 0)

◆ auxiliarySize()

int Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::auxiliarySize ( ) const
inlineinherited

get number of auxiliary DoFs for this space

Returns
number of auxiliary DoFs (degrees of freedom that are NOT owned by this process)

◆ basisFunctionSet() [1/2]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
BasisFunctionSetType Dune::Fem::GenericDiscreteFunctionSpace< Traits >::basisFunctionSet ( const EntityType &  entity) const
inline

get basis function set for given entity

Parameters
[in]entityentity (of codim 0) for which base function is requested
Returns
BasisFunctionSet for the entity

◆ basisFunctionSet() [2/2]

BasisFunctionSetType Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::basisFunctionSet ( const EntityType entity) const
inlineinherited

get basis function set for given entity

Parameters
[in]entityentity (of codim 0) for which base function is requested
Returns
BasisFunctionSet for the entity

◆ begin()

IteratorType Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::begin ( ) const
inlineinherited

get iterator pointing to the first entity of the associated grid partition

Returns
iterator pointing to first entity
Note
The default implementation uses the codim 0 iterators of the associated grid partition.

◆ blockMapper()

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
BlockMapperType & Dune::Fem::GenericDiscreteFunctionSpace< Traits >::blockMapper ( ) const
inline

get a reference to the block mapper

Returns
refernce to the block mapper

◆ communicate() [1/2]

void Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::communicate ( DiscreteFunction &  discreteFunction) const
inlineinherited

communicate data for given discrete function using the space's default communication operation

Parameters
discreteFunctiondiscrete function to be communicated

◆ communicate() [2/2]

void Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::communicate ( DiscreteFunction &  discreteFunction,
const Operation &  op 
) const
inlineinherited

communicate data for given discrete function

Parameters
discreteFunctiondiscrete function to be communicated
[in]opcommunication operation to use (see DFCommunicationOperation)

◆ communicationDirection()

CommunicationDirection Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::communicationDirection ( ) const
inlineinherited

return the communication interface appropriate for this space

Returns
communication interface

◆ communicationInterface()

InterfaceType Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::communicationInterface ( ) const
inlineinherited

return the communication interface appropriate for this space

Returns
communication interface

◆ communicator()

const CommunicationManagerType & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::communicator ( ) const
inlineinherited

return reference to communicator (see CommunicationManager)

Returns
reference to communicator

◆ compiledLocalKey() [1/3]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
template<class EntityType >
const CompiledLocalKeyType & Dune::Fem::GenericDiscreteFunctionSpace< Traits >::compiledLocalKey ( const EntityType &  entity) const
inline

provide access to the compiled local keys for an entity

Note
This method is not part of the DiscreteFunctionSpaceInterface. It is unique to the GenericDiscreteFunctionSpace.
Parameters
[in]entityentity the Lagrange point set is requested for
Returns
CompiledLocalKey

Referenced by Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage >::lagrangePointSet().

◆ compiledLocalKey() [2/3]

const CompiledLocalKeyType & Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::compiledLocalKey ( const EntityType entity) const
inlineinherited

provide access to the compiled local keys for an entity

Note
This method is not part of the DiscreteFunctionSpaceInterface. It is unique to the GenericDiscreteFunctionSpace.
Parameters
[in]entityentity the Lagrange point set is requested for
Returns
CompiledLocalKey

◆ compiledLocalKey() [3/3]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
const CompiledLocalKeyType & Dune::Fem::GenericDiscreteFunctionSpace< Traits >::compiledLocalKey ( const GeometryType  type,
const int  order = polynomialOrder 
) const
inline

provide access to the compiled local keys for a geometry type and polynomial order

Note
This method is not part of the DiscreteFunctionSpaceInterface. It is unique to the GenericDiscreteFunctionSpace.
Parameters
[in]typetype of geometry the compiled local key is requested for
[in]orderpolynomial order for given geometry type
Returns
CompiledLocalKey

◆ continuous() [1/3]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
bool Dune::Fem::GenericDiscreteFunctionSpace< Traits >::continuous ( ) const
inline

returns true if the space contains only globally continuous functions

For example, a Lagrange space returns true while a discontiuous Galerkin space returns false.

Returns
true if the space contians only globally continous functions, false otherwise

◆ continuous() [2/3]

bool Dune::Fem::DiscreteFunctionSpaceInterface< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::continuous ( const IntersectionType intersection) const
inlineinherited

returns true if discrete functions over this space have zero jump over the given intersection.

For example, a Lagrange space returns true iff the intersection is conforming while a discontiuous Galerkin space always returns false.

Parameters
intersectionIntersection for which we want to know the continuety
Returns
true if the space contians functions which are continuous over the intersection, false otherwise

◆ continuous() [3/3]

template<class FunctionSpace , class GridPart , int polOrder, class Storage = CachingStorage>
bool Dune::Fem::PAdaptiveDGSpace< FunctionSpace, GridPart, polOrder, Storage >::continuous ( const IntersectionType &  intersection) const
inline

returns true if the space contains only globally continuous functions

For example, a Lagrange space returns true while a discontiuous Galerkin space returns false.

Returns
true if the space contians only globally continous functions, false otherwise

◆ createDataHandle()

BaseType::template CommDataHandle< DiscreteFunction, Operation >::Type Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::createDataHandle ( DiscreteFunction &  discreteFunction,
const Operation &  operation 
) const
inlineinherited

Note
The default implementation is
return CommDataHandle< DiscreteFunction, Operation > :: Type( discreteFunction );

◆ end()

IteratorType Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::end ( ) const
inlineinherited

get iterator pointing behind the last entity of the associated grid partition

Returns
iterator pointing behind last entity
Note
The default implementation uses the codim 0 iterators of the associated grid partition.

◆ forEach()

void Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::forEach ( FunctorType &  f) const
inlineinherited

apply a functor to each entity in the associated grid partition

The functor must provide an the following operator

template< class EntityType >
void operator() ( const EntityType & );
Parameters
[in]ffunctor to apply
Note
The default implementation simply does the following:
const IteratorType end = asImp().end();
for( IteratorType it = asImp().begin(); it != end; ++it )
f( *it );
IteratorType end() const
get iterator pointing behind the last entity of the associated grid partition
Definition: discretefunctionspace.hh:817
IteratorType begin() const
get iterator pointing to the first entity of the associated grid partition
Definition: discretefunctionspace.hh:807
GridPartType::template Codim< Traits::codimension >::IteratorType IteratorType
type of iterator for grid traversal
Definition: discretefunctionspace.hh:222

◆ geomTypes()

const std::vector< GeometryType > & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::geomTypes ( int  codim) const
inlineinherited

returns true if the grid has more than one geometry type

Returns
true if the underlying grid has more than one geometry type (hybrid grid), false otherwise

◆ getMark()

KeyType Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::getMark ( const EntityType entity) const
inlineinherited

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

Parameters
[in]entitygrid part entity
Returns
key

◆ grid() [1/2]

GridType & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::grid ( )
inlineinherited

get reference to grid this discrete function space belongs to

Returns
reference to grid

◆ grid() [2/2]

const GridType & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::grid ( ) const
inlineinherited

get reference to grid this discrete function space belongs to

Returns
constant reference to grid

◆ gridPart() [1/2]

GridPartType & Dune::Fem::DiscreteFunctionSpaceInterface< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::gridPart ( )
inlineinherited

get a reference to the associated grid partition

Returns
reference to the grid partition

◆ gridPart() [2/2]

GridPartType & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::gridPart ( ) const
inlineinherited

◆ indexSet()

const IndexSetType & Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::indexSet ( ) const
inlineinherited

Get a reference to the associated index set.

Returns
const reference to index set

◆ key()

KeyType Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::key ( const EntityType entity) const
inlineinherited

get identifiying basis function set key assigned to given entity

Parameters
[in]entitygrid part entity
Returns
key

◆ mark()

void Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::mark ( const KeyType &  key,
const EntityType entity 
)
inlineinherited

assign new key to given entity

Parameters
[in]keykey identifying basis function set
[in]entitygrid part entity

◆ multipleBasisFunctionSets()

bool Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::multipleBasisFunctionSets ( ) const
inlineinherited

returns true if base function sets depend on the entity

Returns
true if base function set depend on entities, false otherwise
Note
The default implementation returns false.

◆ multipleGeometryTypes()

bool Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::multipleGeometryTypes ( ) const
inlineinherited

returns true if the grid has more than one geometry type

Returns
true if the underlying grid has more than one geometry type (hybrid grid), false otherwise

◆ order() [1/3]

int Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::order ( ) const
inlineinherited

get global order of space

Returns
order of space, i.e., the maximal polynomial order of base functions

◆ order() [2/3]

int Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::order ( const EntityType entity) const
inlineinherited

default implementation of the method order

Returns
returns max polynomial order for each entity using the method order()

◆ order() [3/3]

int Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::order ( const typename BaseType::EntityType &  entity) const
inlineinherited

get global order of space

Returns
order of space, i.e., the maximal polynomial order of base functions

◆ primarySize()

int Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::primarySize ( ) const
inlineinherited

get number of primary DoFs for this space

Returns
number of primary DoFs (degrees of freedom that are owned by this process )

◆ sequence()

int Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::sequence ( ) const
inlineinherited

get index of the sequence in grid sequences

Returns
number of current sequence

◆ shapeFunctionSet() [1/2]

ShapeFunctionSetType Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::shapeFunctionSet ( const EntityType entity) const
inlineinherited

return shape function set for given entity

Parameters
[in]entityentity (of codim 0) for which shape function set is requested
Returns
ShapeFunctionSetType shape function set

◆ shapeFunctionSet() [2/2]

ShapeFunctionSetType Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::shapeFunctionSet ( const GeometryType type,
const int  order = polynomialOrder 
) const
inlineinherited

return shape unique function set for geometry type

Parameters
[in]typegeometry type (must be a cube) for which shape function set is requested
[in]orderpolynomial order
Returns
ShapeFunctionSetType shape function set

◆ size()

int Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::size ( ) const
inlineinherited

get number of DoFs for this space

Returns
number of DoFs (degrees of freedom)

◆ type()

DFSpaceIdentifier Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >::type ( ) const
inlineinherited

return type identifier of discrete function space

Returns
return type identifier of discrete function space

Friends And Related Function Documentation

◆ operator==()

bool operator== ( const DiscreteFunctionSpaceInterface< Traits > &  X,
const DiscreteFunctionSpaceInterface< Traits > &  Y 
)
related

check two spaces for equality

This is a default implemented equality operator for discrete function spaces. It assumes the mapper to be a singleton and then compares the addresses of the two mappers.

Note that this method can be specialized by implementing another version that uses the exact traits of the discrete function space.


The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)