dune-fem 2.8.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Related Functions | List of all members
Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits > Class Template Reference

This is the interface for discrete function spaces. All methods declared here have to be implemented by the implementation class. More...

#include <dune/fem/space/common/discretefunctionspace.hh>

Inherits FunctionSpaceTraits ::FunctionSpaceType.

Inherited by Dune::Fem::DiscreteFunctionSpaceDefault< BubbleElementSpaceTraits< FunctionSpace, GridPart, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< DiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, StorageImp > >, Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, StorageImp > >, Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveLagrangeSpaceTraits< FS, GP, maxPolOrder, S > >, Dune::Fem::DiscreteFunctionSpaceDefault< LegendreDiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, StorageImp, hierarchicalOrdering > >, Dune::Fem::DiscreteFunctionSpaceDefault< LagrangeDiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, StorageImp > >, Dune::Fem::DiscreteFunctionSpaceDefault< DiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< DiscontinuousLocalFiniteElementSpaceTraits< LFEMap, FunctionSpace, Storage, FixedPolyOrder< LFEMap >::scalarBlockSize > >, Dune::Fem::DiscreteFunctionSpaceDefault< FiniteVolumeSpaceTraits< FunctionSpace, GridPart, 0, SimpleStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< FourierDiscreteFunctionSpaceTraits< FunctionSpace, GridPart, Order > >, Dune::Fem::DiscreteFunctionSpaceDefault< Traits >, Dune::Fem::DiscreteFunctionSpaceDefault< LegendreDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, polOrder, Storage, hierarchicalOrdering > >, Dune::Fem::DiscreteFunctionSpaceDefault< LagrangeDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< LagrangeDiscreteFunctionSpaceTraits< FunctionSpace, GridPart, maxPolOrder, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< LocalFiniteElementSpaceTraits< LFEMap, FunctionSpace, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< DiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, BaseFunctionStorageImp > >, Dune::Fem::DiscreteFunctionSpaceDefault< FiniteVolumeSpaceTraits< FunctionSpaceImp, GridPartImp, codim, BaseFunctionStorageImp > >, Dune::Fem::DiscreteFunctionSpaceDefault< LegendreDiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, polOrder, BaseFunctionStorageImp, hierarchicalOrdering > >, Dune::Fem::DiscreteFunctionSpaceDefault< OrthogonalDiscontinuousGalerkinSpaceTraits< FunctionSpaceImp, GridPartImp, order, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveDGSpaceTraits< FunctionSpace, GridPart, polOrder, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< PAdaptiveLagrangeSpaceTraits< FunctionSpace, GridPart, maxPolOrder, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< PowerDiscreteFunctionSpaceTraits< DiscreteFunctionSpace, N > >, Dune::Fem::DiscreteFunctionSpaceDefault< TupleDiscontinuousGalerkinSpaceTraits< DFS... > >, Dune::Fem::DiscreteFunctionSpaceDefault< TupleDiscreteFunctionSpaceTraits< CombineOp, DiscreteFunctionSpaces ... > >, Dune::Fem::DiscreteFunctionSpaceDefault< AnisotropicDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, order, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< DefaultDiscontinuousGalerkinSpaceTraits< BasisFunctionSets > >, Dune::Fem::DiscreteFunctionSpaceDefault< LegendreDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, order, true, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< LegendreDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, order, false, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< OrthogonalDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, order, Storage > >, Dune::Fem::DiscreteFunctionSpaceDefault< DiscontinuousGalerkinSpaceTraits< FunctionSpaceType, GridPartType, polOrder, CachingStorage > >, Dune::Fem::DiscreteFunctionSpaceDefault< FiniteVolumeSpaceTraits< FunctionSpaceType, GridPartType, codim, SimpleStorage > >, and Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >.

Classes

struct  CommDataHandle
 defines type of data handle for communication More...
 
struct  ToNewDimRange
 typedef struct for defining the same discrete function space with a different dimRange More...
 
struct  ToNewFunctionSpace
 typedef struct for defining the same discrete function space with a different function space More...
 

Public Types

typedef FunctionSpaceTraits Traits
 type of traits class
 
typedef Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 type of DiscretefunctionSapce implementation (Barton-Nackman)
 
typedef Traits::FunctionSpaceType FunctionSpaceType
 type of function space
 
typedef Traits::BasisFunctionSetType BasisFunctionSetType
 type of basis function set of this space
 
typedef Traits::BlockMapperType BlockMapperType
 type of block mapper of this space
 
typedef Traits::LocalBlockIndices LocalBlockIndices
 
typedef Traits::GridPartType GridPartType
 type of underlying grid part
 
typedef GridPartType::GridType GridType
 type of underlying dune grid
 
typedef GridPartType::IndexSetType IndexSetType
 type of used dune index set
 
typedef GridPartType::template Codim< Traits::codimension >::IteratorType IteratorType
 type of iterator for grid traversal
 
typedef GridPartType::template Codim< Traits::codimension >::EntityType EntityType
 type of entity of codimension 0
 
typedef GridPartType::IntersectionType IntersectionType
 type of the intersections
 
typedef AuxiliaryDofs< GridPartType, BlockMapperTypeAuxiliaryDofsType
 type of auxiliary dofs
 
typedef AuxiliaryDofsType SlaveDofsType
 deprecated type
 
typedef CommunicationManager< DiscreteFunctionSpaceTypeCommunicationManagerType
 type of communication manager
 

Public Member Functions

DFSpaceIdentifier type () const
 return type identifier of discrete function space
 
const BasisFunctionSetType basisFunctionSet (const EntityType &entity) const
 get basis function set for given entity
 
bool continuous () const
 returns true if the space contains only globally continuous functions
 
int sequence () const
 get index of the sequence in grid sequences
 
int order () const
 get global order of space
 
bool continuous (const IntersectionType &intersection) const
 returns true if discrete functions over this space have zero jump over the given intersection.
 
BlockMapperTypeblockMapper () const
 get a reference to the block mapper
 
const GridTypegrid () const
 get reference to grid this discrete function space belongs to
 
GridTypegrid ()
 get reference to grid this discrete function space belongs to
 
GridPartTypegridPart ()
 get a reference to the associated grid partition
 
const IndexSetTypeindexSet () const
 Get a reference to the associated index set.
 
int size () const
 get number of DoFs for this space
 
IteratorType begin () const
 get iterator pointing to the first entity of the associated grid partition
 
IteratorType end () const
 get iterator pointing behind the last entity of the associated grid partition
 
template<class FunctorType >
void forEach (FunctorType &f) const
 apply a functor to each entity in the associated grid partition
 
bool multipleGeometryTypes () const
 returns true if the grid has more than one geometry type
 
bool multipleBasisFunctionSets () const
 returns true if base function sets depend on the entity
 
InterfaceType communicationInterface () const
 return the communication interface appropriate for this space
 
CommunicationDirection communicationDirection () const
 return the communication direction appropriate for this space
 
const CommunicationManagerTypecommunicator () const
 return reference to communicator (see CommunicationManager)
 
template<class DiscreteFunction >
void communicate (DiscreteFunction &discreteFunction) const
 communicate data for given discrete function using the space's default communication operation
 
template<class DiscreteFunction , class Operation >
void communicate (DiscreteFunction &discreteFunction, const Operation &op) const
 communicate data for given discrete function
 
template<class DiscreteFunction , class Operation >
CommDataHandle< DiscreteFunction, Operation >::Type createDataHandle (DiscreteFunction &discreteFunction, const Operation &operation) const
 Creates DataHandle for given discrete function.
 
const AuxiliaryDofsTypeauxiliaryDofs () const
 get auxiliary dofs
 
const AuxiliaryDofsTypeslaveDofs () const
 deprecated method, use auxiliaryDofs
 

Static Public Attributes

static constexpr std::size_t localBlockSize = Hybrid::size( LocalBlockIndices() )
 size of local blocks
 

Protected Member Functions

 DiscreteFunctionSpaceInterface ()
 
const DiscreteFunctionSpaceTypeasImp () const
 
DiscreteFunctionSpaceTypeasImp ()
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

template<class FunctionSpaceTraits>
class Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >

This is the interface for discrete function spaces. All methods declared here have to be implemented by the implementation class.

The discrete function space always depends on a given grid. For all diffrent element types of the grid the function space provides a set of base functions for the different element types. Because of the knowledge of on the one hand the grid an on the other hand the base functions sets, the discrete function space provides the size of the function space and a mapping from entity and local dof number to global dof number of the level of the entity.

Note
A DiscreteFunctionSpace is defined on a certain grid part.
An interface class:

Member Typedef Documentation

◆ AuxiliaryDofsType

template<class FunctionSpaceTraits >
typedef AuxiliaryDofs< GridPartType, BlockMapperType > Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::AuxiliaryDofsType

type of auxiliary dofs

◆ BasisFunctionSetType

template<class FunctionSpaceTraits >
typedef Traits::BasisFunctionSetType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::BasisFunctionSetType

type of basis function set of this space

◆ BlockMapperType

template<class FunctionSpaceTraits >
typedef Traits::BlockMapperType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::BlockMapperType

type of block mapper of this space

◆ CommunicationManagerType

template<class FunctionSpaceTraits >
typedef CommunicationManager< DiscreteFunctionSpaceType > Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::CommunicationManagerType

type of communication manager

◆ DiscreteFunctionSpaceType

template<class FunctionSpaceTraits >
typedef Traits::DiscreteFunctionSpaceType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::DiscreteFunctionSpaceType

type of DiscretefunctionSapce implementation (Barton-Nackman)

◆ EntityType

template<class FunctionSpaceTraits >
typedef GridPartType::template Codim<Traits::codimension>::EntityType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::EntityType

type of entity of codimension 0

◆ FunctionSpaceType

template<class FunctionSpaceTraits >
typedef Traits::FunctionSpaceType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::FunctionSpaceType

type of function space

◆ GridPartType

template<class FunctionSpaceTraits >
typedef Traits::GridPartType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::GridPartType

type of underlying grid part

◆ GridType

template<class FunctionSpaceTraits >
typedef GridPartType::GridType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::GridType

type of underlying dune grid

◆ IndexSetType

template<class FunctionSpaceTraits >
typedef GridPartType::IndexSetType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::IndexSetType

type of used dune index set

◆ IntersectionType

template<class FunctionSpaceTraits >
typedef GridPartType::IntersectionType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::IntersectionType

type of the intersections

◆ IteratorType

template<class FunctionSpaceTraits >
typedef GridPartType::template Codim<Traits::codimension>::IteratorType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::IteratorType

type of iterator for grid traversal

Note
Only grid traversal for codimension 0 is currently supported.

◆ LocalBlockIndices

template<class FunctionSpaceTraits >
typedef Traits::LocalBlockIndices Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::LocalBlockIndices

◆ SlaveDofsType

template<class FunctionSpaceTraits >
typedef AuxiliaryDofsType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::SlaveDofsType

deprecated type

◆ Traits

template<class FunctionSpaceTraits >
typedef FunctionSpaceTraits Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::Traits

type of traits class

Constructor & Destructor Documentation

◆ DiscreteFunctionSpaceInterface()

template<class FunctionSpaceTraits >
Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::DiscreteFunctionSpaceInterface ( )
inlineprotected

Member Function Documentation

◆ asImp() [1/2]

template<class FunctionSpaceTraits >
DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::asImp ( )
inlineprotected

◆ asImp() [2/2]

template<class FunctionSpaceTraits >
const DiscreteFunctionSpaceType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::asImp ( ) const
inlineprotected

◆ auxiliaryDofs()

template<class FunctionSpaceTraits >
const AuxiliaryDofsType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::auxiliaryDofs ( ) const
inline

get auxiliary dofs

◆ basisFunctionSet()

template<class FunctionSpaceTraits >
const BasisFunctionSetType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::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

◆ begin()

template<class FunctionSpaceTraits >
IteratorType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::begin ( ) const
inline

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

Returns
iterator pointing to first entity

◆ blockMapper()

template<class FunctionSpaceTraits >
BlockMapperType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::blockMapper ( ) const
inline

get a reference to the block mapper

Returns
refernce to the block mapper

◆ communicate() [1/2]

template<class FunctionSpaceTraits >
template<class DiscreteFunction >
void Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::communicate ( DiscreteFunction &  discreteFunction) const
inline

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

Parameters
discreteFunctiondiscrete function to be communicated

◆ communicate() [2/2]

template<class FunctionSpaceTraits >
template<class DiscreteFunction , class Operation >
void Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::communicate ( DiscreteFunction &  discreteFunction,
const Operation &  op 
) const
inline

communicate data for given discrete function

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

◆ communicationDirection()

template<class FunctionSpaceTraits >
CommunicationDirection Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::communicationDirection ( ) const
inline

return the communication direction appropriate for this space

Returns
communication direction

◆ communicationInterface()

template<class FunctionSpaceTraits >
InterfaceType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::communicationInterface ( ) const
inline

return the communication interface appropriate for this space

Returns
communication interface

◆ communicator()

template<class FunctionSpaceTraits >
const CommunicationManagerType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::communicator ( ) const
inline

return reference to communicator (see CommunicationManager)

Returns
reference to communicator

◆ continuous() [1/2]

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::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/2]

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::continuous ( const IntersectionType intersection) const
inline

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()

template<class FunctionSpaceTraits >
template<class DiscreteFunction , class Operation >
CommDataHandle< DiscreteFunction, Operation >::Type Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::createDataHandle ( DiscreteFunction &  discreteFunction,
const Operation &  operation 
) const
inline

Creates DataHandle for given discrete function.

Parameters
[in]discreteFunctiondiscrete function to create the data handle for
[in]operationoperation to perform on scatter

◆ end()

template<class FunctionSpaceTraits >
IteratorType Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::end ( ) const
inline

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

Returns
iterator pointing behind last entity

◆ forEach()

template<class FunctionSpaceTraits >
template<class FunctorType >
void Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::forEach ( FunctorType &  f) const
inline

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 & );
GridPartType::template Codim< Traits::codimension >::EntityType EntityType
type of entity of codimension 0
Definition: discretefunctionspace.hh:223
Parameters
[in]ffunctor to apply

◆ grid() [1/2]

template<class FunctionSpaceTraits >
GridType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::grid ( )
inline

get reference to grid this discrete function space belongs to

Returns
reference to grid

◆ grid() [2/2]

template<class FunctionSpaceTraits >
const GridType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::grid ( ) const
inline

get reference to grid this discrete function space belongs to

Returns
constant reference to grid

◆ gridPart()

template<class FunctionSpaceTraits >
GridPartType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::gridPart ( )
inline

get a reference to the associated grid partition

Returns
reference to the grid partition

◆ indexSet()

template<class FunctionSpaceTraits >
const IndexSetType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::indexSet ( ) const
inline

Get a reference to the associated index set.

Returns
const reference to index set

◆ multipleBasisFunctionSets()

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::multipleBasisFunctionSets ( ) const
inline

returns true if base function sets depend on the entity

Returns
true if base function set depend on entities, false otherwise

◆ multipleGeometryTypes()

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::multipleGeometryTypes ( ) const
inline

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()

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::order ( ) const
inline

get global order of space

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

◆ sequence()

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::sequence ( ) const
inline

get index of the sequence in grid sequences

Returns
number of current sequence

◆ size()

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::size ( ) const
inline

get number of DoFs for this space

Returns
number of DoFs (degrees of freedom)

◆ slaveDofs()

template<class FunctionSpaceTraits >
const AuxiliaryDofsType & Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::slaveDofs ( ) const
inline

deprecated method, use auxiliaryDofs

◆ type()

template<class FunctionSpaceTraits >
DFSpaceIdentifier Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::type ( ) const
inline

return type identifier of discrete function space

Returns
return type identifier of discrete function space

Member Data Documentation

◆ localBlockSize

template<class FunctionSpaceTraits >
constexpr std::size_t Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::localBlockSize = Hybrid::size( LocalBlockIndices() )
staticconstexpr

size of local blocks


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