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::GenericCombinedDiscreteFunctionSpace< Traits > Class Template Reference

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

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

Public Types

enum  { dimension = GridType::dimension }
 dimension of the grid (not the world) More...
 
enum  { polynomialOrder = Traits::polynomialOrder }
 maximum polynomial order of functions in this space More...
 
enum  { localBlockSize = Traits::localBlockSize }
 size of local blocks More...
 
template<int i>
using SubDiscreteFunctionSpace = typename Traits::template SubDiscreteFunctionSpace< i >
 
typedef Traits::GridPartType GridPartType
 
typedef Traits::GridType GridType
 
typedef GridPartType::IntersectionType IntersectionType
 
typedef Traits::IndexSetType IndexSetType
 extract informations about IndexSet and Iterators More...
 
typedef Traits::IteratorType IteratorType
 
typedef Traits::FunctionSpaceType FunctionSpaceType
 the underlaying Analytical function space More...
 
typedef Traits::BasisFunctionSetType BasisFunctionSetType
 type of the base function set(s) More...
 
typedef Traits::BlockMapperType BlockMapperType
 mapper used to for block vector function More...
 
typedef int IdentifierType
 type of identifier for this discrete function space More...
 
typedef DofManager< GridTypeDofManagerType
 type of DofManager More...
 
enum  
 size of local blocks More...
 
typedef Traits Traits
 
typedef Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 
typedef BaseType::EntityType EntityType
 
typedef CommunicationManager< DiscreteFunctionSpaceTypeCommunicationManagerType
 type of communication manager More...
 
enum  
 size of local blocks More...
 

Public Member Functions

 GenericCombinedDiscreteFunctionSpace (GridPartType &gridPart, const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
 constructor More...
 
 GenericCombinedDiscreteFunctionSpace (const ThisType &)=delete
 
ThisTypeoperator= (const ThisType &)=delete
 
 ~GenericCombinedDiscreteFunctionSpace ()
 Destructor (freeing base functions and mapper) More...
 
bool contains (const int codim) const
 
bool continuous () const
 returns true if the space contains only globally continuous functions More...
 
bool continuous (const IntersectionType &intersection) const
 returns true if the space contains only globally continuous functions More...
 
DFSpaceIdentifier type () const
 get the type of this discrete function space More...
 
int order () const
 get global order of space More...
 
template<class Entity >
int order (const Entity &entity) const
 get global order of space More...
 
template<class EntityType >
BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity More...
 
BlockMapperTypeblockMapper () const
 obtain the DoF block mapper of this space More...
 
template<int i>
const SubDiscreteFunctionSpace< i >::Type & subDiscreteFunctionSpace () const
 obtain the i-th subspace More...
 
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...
 

Static Public Attributes

static const IdentifierType id = 669
 identifier of this discrete function space More...
 
static const InterfaceType defaultInterface = InteriorBorder_All_Interface
 default communication interface More...
 
static const CommunicationDirection defaultDirection = ForwardCommunication
 default communication direction More...
 

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_
 

Member Typedef Documentation

template<class Traits>
typedef Traits::BasisFunctionSetType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::BasisFunctionSetType

type of the base function set(s)

template<class Traits>
typedef Traits::BlockMapperType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::BlockMapperType

mapper used to for block vector function

type of communication manager

type of DofManager

template<class Traits>
typedef Traits::FunctionSpaceType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::FunctionSpaceType

the underlaying Analytical function space

template<class Traits>
typedef Traits::GridPartType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::GridPartType

extract grid informations, it is assumed the both spaces are living on the same gridPart

template<class Traits>
typedef Traits::GridType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::GridType

type of identifier for this discrete function space

template<class Traits>
typedef Traits::IndexSetType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::IndexSetType

extract informations about IndexSet and Iterators

template<class Traits>
typedef GridPartType::IntersectionType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::IntersectionType
template<class Traits>
typedef Traits::IteratorType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::IteratorType
typedef StackAllocator< typename BaseType::RangeFieldType, LocalDofVectorStackType* > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::LocalDofVectorAllocatorType
protectedinherited
typedef Dune::DynamicVector< typename BaseType::RangeFieldType, LocalDofVectorAllocatorType > Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::LocalDofVectorType
protectedinherited
template<class Traits>
template<int i>
using Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::SubDiscreteFunctionSpace = typename Traits::template SubDiscreteFunctionSpace< i >

Member Enumeration Documentation

template<class Traits>
anonymous enum

dimension of the grid (not the world)

Enumerator
dimension 
template<class Traits>
anonymous enum

maximum polynomial order of functions in this space

Enumerator
polynomialOrder 
template<class Traits>
anonymous enum

size of local blocks

Enumerator
localBlockSize 
anonymous enum
inherited

size of local blocks

anonymous enum
inherited

size of local blocks

Constructor & Destructor Documentation

template<class Traits>
Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::GenericCombinedDiscreteFunctionSpace ( GridPartType gridPart,
const InterfaceType  commInterface = defaultInterface,
const CommunicationDirection  commDirection = defaultDirection 
)
inline

constructor

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

Referenced by Dune::Fem::GenericCombinedDiscreteFunctionSpace< PowerDiscreteFunctionSpaceTraits< DiscreteFunctionSpace, N > >::GenericCombinedDiscreteFunctionSpace().

Destructor (freeing base functions and mapper)

Returns

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>
template<class EntityType >
BasisFunctionSetType Dune::Fem::GenericCombinedDiscreteFunctionSpace< 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
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::GenericCombinedDiscreteFunctionSpace< Traits >::blockMapper ( ) const
inline

obtain the DoF block mapper of this space

Returns
BlockMapperType

Referenced by Dune::Fem::GenericCombinedDiscreteFunctionSpace< PowerDiscreteFunctionSpaceTraits< DiscreteFunctionSpace, N > >::contains().

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>
bool Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::contains ( const int  codim) const
inline

template<class Traits>
bool Dune::Fem::GenericCombinedDiscreteFunctionSpace< 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
template<class Traits>
bool Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::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
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
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>
ThisType& Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::operator= ( const ThisType )
delete
template<class Traits>
int Dune::Fem::GenericCombinedDiscreteFunctionSpace< 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>
template<class Entity >
int Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::order ( const Entity &  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>
template<int i>
const SubDiscreteFunctionSpace< i >::Type& Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::subDiscreteFunctionSpace ( ) const
inline

obtain the i-th subspace

template<class Traits>
DFSpaceIdentifier Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::type ( ) const
inline

get the type of this discrete function space

Returns
DFSpaceIdentifier

Member Data Documentation

const AllGeometryTypes Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::allGeomTypes_
protectedinherited
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
template<class Traits>
const CommunicationDirection Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::defaultDirection = ForwardCommunication
static

default communication direction

template<class Traits>
const InterfaceType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::defaultInterface = InteriorBorder_All_Interface
static

default communication interface

DofManagerType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::dofManager_
protectedinherited
GridPartType& Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::gridPart_
protectedinherited
template<class Traits>
const IdentifierType Dune::Fem::GenericCombinedDiscreteFunctionSpace< Traits >::id = 669
static

identifier of this discrete function space

LocalDofVectorAllocatorType Dune::Fem::DiscreteFunctionSpaceDefault< Traits >::ldvAllocator_
mutableprotectedinherited

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