DUNE-FEM (unstable)

Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits > Class Template Reference

Generic implementation of a \(hp\)-adaptive discontinuous finite element space. More...

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

Public Types

using GridPartType = typename BaseType::GridPartType
 grid part type
 
using EntityType = typename BaseType::EntityType
 entity type
 
using BasisFunctionSetsType = typename Traits::BasisFunctionSetsType
 basis function sets type
 
using KeyType = typename BasisFunctionSetsType::KeyType
 key type identifying a basis function set
 
using BasisFunctionSetType = typename BaseType::BasisFunctionSetType
 basis function set type
 
using BlockMapperType = typename BaseType::BlockMapperType
 block mapper type
 
using InterpolationImplType = DiscontinuousGalerkinLocalL2Projection< GridPartType, BasisFunctionSetType >
 local interpolation type

 
using InterpolationType = LocalInterpolationWrapper< DiscreteFunctionSpaceType >
 local interpolation type

 
typedef DofManager< GridTypeDofManagerType
 type of DoF manager
 
typedef CommunicationManager< DiscreteFunctionSpaceType > CommunicationManagerType
 type of communication manager
 
typedef Traits::FunctionSpaceType FunctionSpaceType
 type of function space
 
typedef GridPartType::IntersectionType IntersectionType
 type of the intersections
 
typedef AuxiliaryDofsType SlaveDofsType
 deprecated type
 

Public Member Functions

int sequence () const
 get index of the sequence in grid sequences More...
 
int order (const EntityType &entity) const
 default implementation of the method order 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...
 
GridPartTypegridPart () const
 
GridPartTypegridPart ()
 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...
 
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 AuxiliaryDofsType & auxiliaryDofs () 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
 
void adapt (const Vector &polynomialOrders, const int polOrderShift=0) const
 default implementation of adapt does nothing, its only used in PAdaptiveLagrangeSpace
 
const std::vector< GeometryType > & geomTypes (int codim) const
 returns true if the grid has more than one geometry type More...
 
const 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...
 
const AuxiliaryDofsType & slaveDofs () const
 deprecated method, use auxiliaryDofs
 
Construction
template<class Function >
 DiscontinuousGalerkinSpace (GridPartType &gridPart, const BasisFunctionSetsType &basisFunctionSets, const KeyType &value, Function function, const Dune::InterfaceType interface=Dune::InteriorBorder_All_Interface, const Dune::CommunicationDirection direction=Dune::ForwardCommunication)
 
 DiscontinuousGalerkinSpace (GridPartType &gridPart, const BasisFunctionSetsType &basisFunctionSets, const KeyType &value, const Dune::InterfaceType interface=Dune::InteriorBorder_All_Interface, const Dune::CommunicationDirection direction=Dune::ForwardCommunication)
 
Deleted methods
 DiscontinuousGalerkinSpace (const DiscontinuousGalerkinSpace &)=delete
 copy constructor
 
const DiscontinuousGalerkinSpaceoperator= (const DiscontinuousGalerkinSpace &)=delete
 assignment operator
 
Query methods
bool continuous () const
 please doc me
 
bool continuous (const typename BaseType::IntersectionType &intersection) const
 please doc me
 
bool multipleBasisFunctionSets () const
 please doc me
 
Basis function set methods
int order () const
 return polynomial order
 
int order (const EntityType &entity) const
 return polynomial order
 
BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 return basis function set
 
Interpolation
InterpolationType interpolation () const
 return interpolation More...
 
InterpolationImplType interpolation (const EntityType &entity) const
 return interpolation More...
 
InterpolationImplType localInterpolation (const EntityType &entity) const
 return interpolation More...
 
Block mapper
BlockMapperTypeblockMapper () const
 return block mapper
 
Adaptation
const KeyTypekey (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...
 
bool adapt ()
 please doc me
 
template<class DiscreteFunctionSpace , class Implementation >
bool adapt (DataProjection< DiscreteFunctionSpace, Implementation > &projection)
 please doc me
 
Deprecated methods
DFSpaceIdentifier type () const
 
Non-interface methods
const BasisFunctionSetsTypebasisFunctionSets () const
 return basis function sets
 

Static Public Attributes

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 Traits>
class Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >

Generic implementation of a \(hp\)-adaptive discontinuous finite element space.

Template Parameters
Traitstraits class

Member Function Documentation

◆ auxiliarySize()

int Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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()

const BasisFunctionSetType Dune::Fem::DiscreteFunctionSpaceInterface< Traits >::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< Traits >::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.

◆ communicate() [1/2]

void Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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< Traits >::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< Traits >::communicationDirection ( ) const
inlineinherited

return the communication interface appropriate for this space

Returns
communication interface

◆ communicationInterface()

InterfaceType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::communicationInterface ( ) const
inlineinherited

return the communication interface appropriate for this space

Returns
communication interface

◆ communicator()

const CommunicationManagerType & Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::communicator ( ) const
inlineinherited

return reference to communicator (see CommunicationManager)

Returns
reference to communicator

◆ continuous()

bool Dune::Fem::DiscreteFunctionSpaceInterface< Traits >::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

◆ createDataHandle()

BaseType::template CommDataHandle< DiscreteFunction, Operation >::Type Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::createDataHandle ( DiscreteFunction &  discreteFunction,
const Operation &  operation 
) const
inlineinherited

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

◆ end()

IteratorType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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< Traits >::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 & );
typename BaseType::EntityType EntityType
entity type
Definition: space.hh:53
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< Traits >::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()

template<class Traits >
KeyType Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::getMark ( const EntityType entity) const
inline

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

Parameters
[in]entitygrid part entity
Returns
key

References Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::blockMapper().

◆ grid() [1/2]

get reference to grid this discrete function space belongs to

Returns
reference to grid

◆ grid() [2/2]

const GridType & Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::grid ( ) const
inlineinherited

get reference to grid this discrete function space belongs to

Returns
constant reference to grid

◆ gridPart() [1/2]

get a reference to the associated grid partition

Returns
reference to the grid partition

◆ gridPart() [2/2]

GridPartType & Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::gridPart ( ) const
inlineinherited

◆ indexSet()

const IndexSetType & Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::indexSet ( ) const
inlineinherited

Get a reference to the associated index set.

Returns
const reference to index set

◆ interpolation() [1/2]

template<class Traits >
InterpolationType Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::interpolation ( ) const
inline

return interpolation

Parameters
[in]entitya grid part entity
Returns
local interpolation

◆ interpolation() [2/2]

template<class Traits >
InterpolationImplType Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::interpolation ( const EntityType entity) const
inline

return interpolation

Parameters
[in]entitya grid part entity
Returns
local interpolation

References Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::basisFunctionSet().

◆ key()

template<class Traits >
const KeyType & Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::key ( const EntityType entity) const
inline

get identifiying basis function set key assigned to given entity

Parameters
[in]entitygrid part entity
Returns
key

References Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::blockMapper().

Referenced by Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::basisFunctionSet(), and Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::mark().

◆ localInterpolation()

template<class Traits >
InterpolationImplType Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::localInterpolation ( const EntityType entity) const
inline

return interpolation

Parameters
[in]entitya grid part entity
Returns
local interpolation

References Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::basisFunctionSet().

◆ mark()

template<class Traits >
void Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::mark ( const KeyType key,
const EntityType entity 
)
inline

assign new key to given entity

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

References Dune::Fem::hpDG::DiscontinuousGalerkinSpace< Traits >::key().

◆ multipleGeometryTypes()

bool Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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()

int Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::order ( const EntityType entity) const
inlineinherited

default implementation of the method order

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

◆ primarySize()

int Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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< Traits >::sequence ( ) const
inlineinherited

get index of the sequence in grid sequences

Returns
number of current sequence

◆ size()

int Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::size ( ) const
inlineinherited

get number of DoFs for this space

Returns
number of DoFs (degrees of freedom)

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 file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)