DUNE-FEM (unstable)

Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits > Class Template Reference

This is the class with default implementations for discrete function. The methods not marked with having a default in the interface class must be provided by the implementation; all other methods have a default implementation here. More...

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

Public Types

typedef DofManager< GridTypeDofManagerType
 type of DoF manager
 
typedef CommunicationManager< DiscreteFunctionSpaceTypeCommunicationManagerType
 type of communication manager
 
typedef Traits ::FunctionSpaceType FunctionSpaceType
 type of function space
 
typedef Traits ::BasisFunctionSetType BasisFunctionSetType
 type of basis function set of this space
 
typedef GridPartType ::IntersectionType IntersectionType
 type of the intersections
 
typedef AuxiliaryDofsType SlaveDofsType
 deprecated type
 

Public Member Functions

 DiscreteFunctionSpaceDefault (GridPartType &gridPart, const InterfaceType commInterface=InteriorBorder_All_Interface, const CommunicationDirection commDirection=ForwardCommunication)
 constructor
 
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...
 
GridPartType & gridPart () const
 
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...
 
template<class FunctorType >
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...
 
template<class DiscreteFunction >
void communicate (DiscreteFunction &discreteFunction) const
 communicate data for given discrete function using the space's default communication operation More...
 
template<class DiscreteFunction , class Operation >
void communicate (DiscreteFunction &discreteFunction, const Operation &op) const
 communicate data for given discrete function More...
 
template<class DiscreteFunction , class Operation >
BaseType ::template CommDataHandle< DiscreteFunction, Operation >::Type createDataHandle (DiscreteFunction &discreteFunction, const Operation &operation) const
 
const AuxiliaryDofsTypeauxiliaryDofs () const
 get auxiliary dofs
 
template<class DiscreteFunction >
void addFunction (DiscreteFunction &df) const
 default implementation of addFunction does nothing at the moment
 
template<class DiscreteFunction >
void removeFunction (DiscreteFunction &df) const
 default implementation of removeFunction does nothing at the moment
 
template<class Vector >
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...
 
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...
 
int order () const
 get global order of space More...
 
BlockMapperTypeblockMapper () const
 get a reference to the block mapper More...
 
GridPartType & gridPart ()
 get a reference to the associated grid partition More...
 
const AuxiliaryDofsTypeslaveDofs () const
 deprecated method, use auxiliaryDofs
 

Static Public Attributes

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

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 More...
 

Detailed Description

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

This is the class with default implementations for discrete function. The methods not marked with having a default in the interface class must be provided by the implementation; all other methods have a default implementation here.

Remarks
An reference to the GridPart is stored in the default implementation.

Member Function Documentation

◆ auxiliarySize()

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::auxiliarySize ( ) const
inline

get number of auxiliary DoFs for this space

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

References Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::primarySize(), and Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::size().

◆ basisFunctionSet()

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

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

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::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::forEach().

◆ blockMapper()

◆ communicate() [1/2]

template<class FunctionSpaceTraits >
template<class DiscreteFunction >
void Dune::Fem::DiscreteFunctionSpaceDefault< 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::DiscreteFunctionSpaceDefault< 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)

References Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::communicator(), Dune::Fem::DefaultCommunicationManager< Space >::exchange(), and Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::localBlockSize.

◆ communicationDirection()

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

return the communication interface appropriate for this space

Returns
communication interface

◆ communicationInterface()

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

return the communication interface appropriate for this space

Returns
communication interface

◆ communicator()

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

return reference to communicator (see CommunicationManager)

Returns
reference to communicator

Referenced by Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::communicate().

◆ continuous() [1/2]

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

◆ continuous() [2/2]

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::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()

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

Note
The default implementation is
Traits ::template CommDataHandle< DiscreteFunction, Operation >::Type Type
type of communication data handle
Definition: discretefunctionspace.hh:249

References Dune::Fem::DiscreteFunctionSpaceInterface< FunctionSpaceTraits >::localBlockSize.

◆ end()

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

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::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::forEach().

◆ forEach()

template<class FunctionSpaceTraits >
template<class FunctorType >
void Dune::Fem::DiscreteFunctionSpaceDefault< 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 & );
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

References Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::begin(), and Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::end().

◆ geomTypes()

template<class FunctionSpaceTraits >
const std::vector<GeometryType>& Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::geomTypes ( int  codim) 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

◆ grid() [1/2]

template<class FunctionSpaceTraits >
GridType& Dune::Fem::DiscreteFunctionSpaceDefault< 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::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::grid ( ) const
inline

get reference to grid this discrete function space belongs to

Returns
constant reference to grid

◆ gridPart() [1/2]

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

get a reference to the associated grid partition

Returns
reference to the grid partition

◆ gridPart() [2/2]

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

◆ indexSet()

template<class FunctionSpaceTraits >
const IndexSetType& Dune::Fem::DiscreteFunctionSpaceDefault< 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::DiscreteFunctionSpaceDefault< 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
Note
The default implementation returns false.

◆ multipleGeometryTypes()

template<class FunctionSpaceTraits >
bool Dune::Fem::DiscreteFunctionSpaceDefault< 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() [1/2]

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

get global order of space

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

◆ order() [2/2]

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::order ( const EntityType entity) const
inline

default implementation of the method order

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

◆ primarySize()

template<class FunctionSpaceTraits >
int Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::primarySize ( ) const
inline

◆ sequence()

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

get index of the sequence in grid sequences

Returns
number of current sequence

Referenced by Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::auxiliaryDofs().

◆ size()

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

◆ type()

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

return type identifier of discrete function space

Returns
return type identifier of 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.80.0 (Apr 27, 22:29, 2024)