dune-fem  2.4.1-rc
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits > Class Template Reference

generic implementation of a Discontinuous Galerkin space based on a fixed family of basis function sets More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/space/discontinuousgalerkin/generic.hh>

Inheritance diagram for Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >:
Inheritance graph

Public Types

typedef BaseType::GridPartType GridPartType
 type of underlying grid part More...
 
typedef BaseType::EntityType EntityType
 type of entity of codimension 0 More...
 
typedef BaseType::IntersectionType IntersectionType
 type of the intersections More...
 
typedef Traits::BasisFunctionSetsType BasisFunctionSetsType
 basis function sets More...
 
typedef BaseType::BasisFunctionSetType BasisFunctionSetType
 type of basis function set of this space More...
 
typedef BaseType::BlockMapperType BlockMapperType
 type of block mapper of this space More...
 
enum  
 size of local blocks More...
 
typedef Traits Traits
 
typedef Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 
typedef BaseType::GridType GridType
 
typedef BaseType::IndexSetType IndexSetType
 
typedef BaseType::IteratorType IteratorType
 
typedef DofManager< GridTypeDofManagerType
 type of DoF manager More...
 
typedef CommunicationManager< DiscreteFunctionSpaceTypeCommunicationManagerType
 type of communication manager More...
 
enum  
 size of local blocks More...
 
typedef Traits::FunctionSpaceType FunctionSpaceType
 type of function space More...
 

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...
 
LocalFunctionType localFunction (const EntityType &entity) const
 
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...
 
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
 
void addFunction (DiscreteFunction &df) const
 default implementation of addFunction does nothing at the moment More...
 
void removeFunction (DiscreteFunction &df) const
 default implementation of removeFunction does nothing at the moment More...
 
void adapt (const Vector &polynomialOrders, const int polOrderShift=0) const
 default implementation of adapt does nothing, its only used in PAdaptiveLagrangeSpace More...
 
DFSpaceIdentifier type () const
 return type identifier of discrete function space More...
 
const BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity More...
 
bool continuous () const
 returns true if the space contains only globally continuous functions More...
 
bool continuous (const IntersectionType &intersection) const
 returns true if discrete functions over this space have zero jump over the given intersection. More...
 
Construction
 GenericDiscontinuousGalerkinSpace (GridPartType &gridPart, BasisFunctionSetsType &&basisFunctionSets, const InterfaceType commInterface=InteriorBorder_All_Interface, const CommunicationDirection commDirection=ForwardCommunication)
 
Copying and assignment
 GenericDiscontinuousGalerkinSpace (const ThisType &)=delete
 
 GenericDiscontinuousGalerkinSpace (ThisType &&other)
 move constructor More...
 
GenericDiscontinuousGalerkinSpaceoperator= (const ThisType &)=default
 
Non-interface methods
template<class LocalFunction , class LocalDofVector >
void interpolate (const LocalFunction &localFunction, LocalDofVector &localDofVector) const
 local interpolation using discontinuous L2-projection More...
 

Static Public Attributes

static const int codimension = Traits::codimension
 

Protected Types

typedef ThreadSafeValue< UninitializedObjectStackLocalDofVectorStackType
 
typedef StackAllocator< typename BaseType::RangeFieldType, LocalDofVectorStackType * > LocalDofVectorAllocatorType
 
typedef Dune::DynamicVector< typename BaseType::RangeFieldType, LocalDofVectorAllocatorTypeLocalDofVectorType
 
typedef BasicTemporaryLocalFunction< ThisType, LocalDofVectorTypeLocalFunctionType
 
typedef AllGeomTypes< IndexSetType, GridTypeAllGeometryTypes
 

Protected Member Functions

const std::vector< GeometryType > & geomTypes (int codim) const
 returns true if the grid has more than one geometry type More...
 
const DiscreteFunctionSpaceTypeasImp () const
 
DiscreteFunctionSpaceTypeasImp ()
 

Protected Attributes

GridPartTypegridPart_
 
LocalDofVectorStackType ldvStack_
 
LocalDofVectorAllocatorType ldvAllocator_
 
const AllGeometryTypes allGeomTypes_
 
DofManagerTypedofManager_
 
const InterfaceType commInterface_
 
const CommunicationDirection commDirection_
 
std::unique_ptr< CommunicationManagerTypecommunicator_
 

Public member methods

BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity More...
 
int order () const
 get global order of space More...
 
int order (const EntityType &entity) const
 get global order of space More...
 
BlockMapperTypeblockMapper () const
 get a reference to the block mapper More...
 
static DFSpaceIdentifier type ()
 return type identifier of discrete function space More...
 
static DUNE_CONSTEXPR bool continuous ()
 returns true if the space contains only globally continuous functions More...
 
static DUNE_CONSTEXPR bool continuous (const IntersectionType &intersection)
 returns true if the space contains only globally continuous functions More...
 

Detailed Description

template<class Traits>
class Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >

generic implementation of a Discontinuous Galerkin space based on a fixed family of basis function sets

Template Parameters
Traitstraits class

Member Typedef Documentation

template<class Traits>
typedef Traits::BasisFunctionSetsType Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::BasisFunctionSetsType

basis function sets

type of basis function set of this space

type of block mapper of this space

type of communication manager

type of DoF manager

type of entity of codimension 0

type of function space

type of underlying grid part

type of the intersections

typedef StackAllocator< typename BaseType::RangeFieldType, LocalDofVectorStackType* > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::LocalDofVectorAllocatorType
protectedinherited
typedef ThreadSafeValue< UninitializedObjectStack > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::LocalDofVectorStackType
protectedinherited
typedef Dune::DynamicVector< typename BaseType::RangeFieldType, LocalDofVectorAllocatorType > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::LocalDofVectorType
protectedinherited

Member Enumeration Documentation

anonymous enum
inherited

size of local blocks

anonymous enum
inherited

size of local blocks

Constructor & Destructor Documentation

template<class Traits>
Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::GenericDiscontinuousGalerkinSpace ( GridPartType gridPart,
BasisFunctionSetsType &&  basisFunctionSets,
const InterfaceType  commInterface = InteriorBorder_All_Interface,
const CommunicationDirection  commDirection = ForwardCommunication 
)
inlineexplicit

move constructor

Member Function Documentation

void Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::adapt ( const Vector &  polynomialOrders,
const int  polOrderShift = 0 
) const
inlineinherited

default implementation of adapt does nothing, its only used in PAdaptiveLagrangeSpace

void Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::addFunction ( DiscreteFunction &  df) const
inlineinherited

default implementation of addFunction does nothing at the moment

const DiscreteFunctionSpaceType& Dune::Fem::DiscreteFunctionSpaceInterface< Traits >::asImp ( ) const
inlineprotectedinherited
template<class Traits>
BasisFunctionSetType Dune::Fem::GenericDiscontinuousGalerkinSpace< 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
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
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.

Referenced by Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveLagrangeSpaceTraits< FS, GP, maxPolOrder, S > >::adapt().

template<class Traits>
BlockMapperType& Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::blockMapper ( ) const
inline

get a reference to the block mapper

Returns
refernce to the block mapper
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
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 Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::communicationDirection ( ) const
inlineinherited

return the communication interface appropriate for this space

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

return the communication interface appropriate for this space

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

return reference to communicator (see CommunicationManager)

Returns
reference to communicator
template<class Traits>
static DUNE_CONSTEXPR bool Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::continuous ( )
inlinestatic

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
template<class Traits>
static DUNE_CONSTEXPR bool Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::continuous ( const IntersectionType intersection)
inlinestatic

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
bool Dune::Fem::DiscreteFunctionSpaceInterface< Traits >::continuous ( ) const
inlineinherited

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
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
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 );
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.

Referenced by Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveLagrangeSpaceTraits< FS, GP, maxPolOrder, S > >::adapt().

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 & );
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 );
const std::vector<GeometryType>& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::geomTypes ( int  codim) const
inlineprotectedinherited

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
const GridType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::grid ( ) const
inlineinherited

get reference to grid this discrete function space belongs to

Returns
constant reference to grid

Referenced by Dune::Fem::GenericDiscreteFunctionSpace< PAdaptiveLagrangeSpaceTraits< FS, GP, maxPolOrder, S > >::adapt().

get reference to grid this discrete function space belongs to

Returns
reference to grid

get a reference to the associated grid partition

Returns
reference to the grid partition
GridPartType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::gridPart ( ) const
inlineinherited
const IndexSetType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::indexSet ( ) const
inlineinherited
template<class Traits>
template<class LocalFunction , class LocalDofVector >
void Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::interpolate ( const LocalFunction localFunction,
LocalDofVector &  localDofVector 
) const
inline

local interpolation using discontinuous L2-projection

Parameters
[in]localFunctionlocal function to interpolate
[in]localDofVectorlocal degrees of freedom of the interpolation
Deprecated:
LocalFunctionType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::localFunction ( const EntityType entity) const
inlineinherited

obtain a local function for an entity (to store intermediate values)

Parameters
[in]entityentity (of codim 0) for which a local function is desired
Returns
a local function backed by a small, fast array

Referenced by Dune::Fem::GenericDiscontinuousGalerkinSpace< DiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, polOrder, Storage > >::interpolate().

bool Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::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.
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
template<class Traits>
GenericDiscontinuousGalerkinSpace& Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::operator= ( const ThisType )
default
template<class Traits>
int Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::order ( ) const
inline

get global order of space

Returns
order of space, i.e., the maximal polynomial order of base functions
template<class Traits>
int Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::order ( const EntityType entity) const
inline

get global order of space

Returns
order of space, i.e., the maximal polynomial order of base functions
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()
void Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::removeFunction ( DiscreteFunction &  df) const
inlineinherited

default implementation of removeFunction does nothing at the moment

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

get index of the sequence in grid sequences

Returns
number of current sequence
int Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::size ( ) const
inlineinherited

get number of DoFs for this space

Returns
number of DoFs (degrees of freedom)
template<class Traits>
static DFSpaceIdentifier Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::type ( )
inlinestatic

return type identifier of discrete function space

Returns
return type identifier of discrete function space

return type identifier of discrete function space

Returns
return type identifier of discrete function space

Member Data Documentation

const AllGeometryTypes Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::allGeomTypes_
protectedinherited
template<class Traits>
const int Dune::Fem::GenericDiscontinuousGalerkinSpace< Traits >::codimension = Traits::codimension
static

const CommunicationDirection Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::commDirection_
protectedinherited
const InterfaceType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::commInterface_
protectedinherited
std::unique_ptr< CommunicationManagerType > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::communicator_
mutableprotectedinherited
DofManagerType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::dofManager_
protectedinherited
GridPartType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::gridPart_
protectedinherited
LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::ldvAllocator_
mutableprotectedinherited

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