dune-pdelab  2.0.0
Classes | Typedefs | Functions | Friends
Grid Operator

Classes

class  Dune::PDELab::AssemblerInterface
 The global assembler which performs the traversing of the integration parts. More...
 
class  Dune::PDELab::LocalAssemblerEngine
 The local assembler engine which handles the integration parts as provided by the global assemblers. More...
 
class  Dune::PDELab::LocalAssemblerInterface< B, CU, CV >
 The local assembler which provides the engines that drive the global assembler. More...
 
class  Dune::PDELab::GridOperatorInterface< GFSU, GFSV, MB, DF, RF, JF >
 The grid operator represents an operator mapping which corresponds to the (possibly nonlinear) algebraic problem resulting from the discretization of a PDE. More...
 
class  Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >
 Helper class for adding up matrix entries on border. More...
 
class  Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache
 
class  Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >
 A DataHandle class to exchange matrix sparsity patterns. More...
 
class  Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator
 A DataHandle class to exchange matrix entries. More...
 
class  Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >
 
class  Dune::PDELab::OverlappingBorderDOFExchanger< GridOperator >
 
class  Dune::PDELab::LocalAssemblerEngineBase
 Base class for LocalAssemblerEngine implementations to avoid boilerplate code. More...
 

Typedefs

typedef unordered_map
< typename
GFSV::Ordering::Traits::DOFIndex,
unordered_set< GlobalDOFIndex > > 
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::BorderPattern
 Data structure for storing border-border matrix pattern entries in a communication-optimized form. More...
 
typedef IdType Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::EntityID
 
typedef
GFSU::Ordering::Traits::DOFIndex::TreeIndex 
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::ColumnTreeIndex
 
typedef std::size_t Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::size_type
 
typedef PatternMPIData Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::DataType
 Export type of data for message buffer. More...
 
typedef ValueMPIData Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::DataType
 Export type of data for message buffer. More...
 
typedef NoDataBorderDOFExchanger Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::CommunicationCache
 
typedef Empty Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::BorderPattern
 Data structure for storing border-border matrix pattern entries in a communication-optimized form. More...
 

Functions

 Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::NonOverlappingBorderDOFExchanger (const GridOperator &grid_operator)
 Constructor. Sets up the local to global relations. More...
 
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::update (const GridOperator &grid_operator)
 
 Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::CommunicationCache (const GridOperator &go)
 
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::initialized () const
 
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::finishInitialization ()
 
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::update ()
 
const BorderPattern & Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::pattern () const
 
template<typename LFSVCache , typename LFSUCache , typename LocalPattern >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::addEntries (const LFSVCache &lfsv_cache, const LFSUCache &lfsu_cache, const LocalPattern &pattern)
 
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::size (const Entity &e) const
 
template<typename Buffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::gather_pattern (Buffer &buf, const Entity &e) const
 
template<typename Buffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::gather_data (Buffer &buf, const Entity &e, const M &matrix) const
 
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::contains (int dim, int codim) const
 
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::fixedsize (int dim, int codim) const
 
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::size (Entity &e) const
 How many objects of type DataType have to be sent for a given entity. More...
 
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::gather (MessageBuffer &buff, const Entity &e) const
 Pack data from user to message buffer. More...
 
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::scatter (MessageBuffer &buff, const Entity &e, size_t n)
 Unpack data from message buffer to user. More...
 
 Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::PatternExtender (const NonOverlappingBorderDOFExchanger &dof_exchanger, const GFSU &gfsu, const GFSV &gfsv, Pattern &pattern)
 
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::contains (int dim, int codim) const
 
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::fixedsize (int dim, int codim) const
 
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::size (Entity &e) const
 
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::gather (MessageBuffer &buff, const Entity &e) const
 
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::scatter (MessageBuffer &buff, const Entity &e, size_type n)
 Unpack data from message buffer to user. More...
 
 Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::EntryAccumulator (const NonOverlappingBorderDOFExchanger &dof_exchanger, const GFSU &gfsu, const GFSV &gfsv, Matrix &matrix)
 
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::accumulateBorderEntries (const GridOperator &grid_operator, Matrix &matrix)
 Sums up the entries corresponding to border vertices. More...
 
CommunicationCache & Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCache ()
 
const CommunicationCache & Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCache () const
 
shared_ptr< CommunicationCache > Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCacheStorage ()
 
const GridView & Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::gridView () const
 
 Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::NoDataBorderDOFExchanger ()
 
 Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::NoDataBorderDOFExchanger (const GridOperator &grid_operator)
 
void Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::accumulateBorderEntries (const GridOperator &grid_operator, typename GridOperator::Traits::Jacobian &matrix)
 
CommunicationCache & Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::communicationCache ()
 
const CommunicationCache & Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::communicationCache () const
 
void Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::update (const GridOperator &grid_operator)
 
 Dune::PDELab::OverlappingBorderDOFExchanger< GridOperator >::OverlappingBorderDOFExchanger ()
 
 Dune::PDELab::OverlappingBorderDOFExchanger< GridOperator >::OverlappingBorderDOFExchanger (const GridOperator &grid_operator)
 

Friends

class Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::NonOverlappingBorderDOFExchanger
 

Detailed Description

Grid Operator

Introduction

In the PDELab concept, the continuous PDE problem is reduced to an algebraic problem:

Find $ \mathbf{u}\in\mathbf{U} $ such that $ \mathcal{R}(\mathbf{u}) = \mathbf{0} $ .

For instationary problems a corresponding algebraic problem is setup for each time step or stage of a time step.

The grid operator object represents the operator mapping $ \mathcal{R} : \mathbf{U} \to \mathbf{V} $ . It is evaluated via the Dune::PDELab::GridOperatorInterface::residual() member method and its derivatives are aquired with the Dune::PDELab::GridOperatorInterface::jacobian() method.

Evaluating the grid operator and its jacobian matrix entails integrations over the computational domain during which the corresponding algebraic objects are assembled incrementally. The assembling is performed by two objects corresponding to the Dune::PDELab::AssemblerInterface and the Dune::PDELab::LocalAssemblerInterface . The former, the global assembler, provides the geometric objects, representing parts of the computational domain to be integrated. The latter, the local assembler, calls the local operator in an appropriate way to compute the local integrals and afterwards accumulates the results into the algebra objects.

The separation of these two tasks into different objects has significant advantages to a monolithic approach. It allows different implementations of the assembler interface to be used interchangeably in common implementations of time stepping schemes. The latter may link in between the global and the local assembler and thus apply the necessary modifications to the local integrations (like multiplying with the time step with or Runge-Kutta coefficients).

Furthermore, the separation provides a junction for caching objects. Such objects would provide the interface of the local assembler, while actually wrapping the true local assembler object.

Engines

In a simple stationary PDE problem, the assembling functionality provided by Dune::PDELab::AssemblerInterface and the Dune::PDELab::LocalAssemblerInterface will be used for at least three different purposes:

As these three tasks require rather different local operations (e.g. setting up of the jacobian matrix sparsity pattern does not require any evaluations of the local function spaces), the local assembler does not directly interact with the global assembler. Instead, it provides engines which drive the global assembler for each of the different tasks. Therefore, every local assembler is required to provide the engines:

The last of the engines above allows a combined assembling of the residual and the jacobian matrix.

Instationary problems and composite grid operators

When given a instationary PDE problem which (after spatial discretization) results in an algebraic problem

\[ \partial_t \mathcal{R}_1(\mathbf{u}) + \mathcal{R}_0(\mathbf{u}) = \mathbf{0}, \]

then the PDELab approach is to define a grid operator for each $ \mathcal{R}_1 $ and $ \mathcal{R}_0 $ and then combine these grid operators in a composite grid operator which provides the additional functionality needed by the chosen time stepping method (e.g. for a Runge-Kutta scheme, the grid operator must be able to be evaluated for each of the Runge-Kutta stages). The class Dune::PDELab::OneStepGridOperator is a fairly general implementation which allows the appli cation of many different one step methods including all methods of Runge-Kutta type.

In general, such composite grid operators will apply multiple assembler engines in a combined assembling during a single grid traversion. This will usually result in both engines performing operations, which they could efficiently share or distribute. To allow such optimizations, the composite grid operator may inform his subordinate grid operators of their co-operators and the order in which they will be called during assembling. This is done via the Dune::PDELab::GridOperatorInterface::setupGridOperators method.

Typedef Documentation

template<typename GridOperator >
typedef unordered_map< typename GFSV::Ordering::Traits::DOFIndex, unordered_set<GlobalDOFIndex> > Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::BorderPattern

Data structure for storing border-border matrix pattern entries in a communication-optimized form.

template<typename GridOperator >
typedef Empty Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::BorderPattern

Data structure for storing border-border matrix pattern entries in a communication-optimized form.

template<typename GridOperator >
typedef GFSU::Ordering::Traits::DOFIndex::TreeIndex Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::ColumnTreeIndex
template<typename GridOperator >
typedef NoDataBorderDOFExchanger Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::CommunicationCache
template<typename GridOperator >
template<typename Pattern >
typedef PatternMPIData Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::DataType

Export type of data for message buffer.

template<typename GridOperator >
typedef ValueMPIData Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::DataType

Export type of data for message buffer.

template<typename GridOperator >
typedef IdType Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::EntityID
template<typename GridOperator >
typedef std::size_t Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::size_type

Function Documentation

template<typename GridOperator >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::accumulateBorderEntries ( const GridOperator grid_operator,
Matrix &  matrix 
)
inline
template<typename GridOperator >
void Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::accumulateBorderEntries ( const GridOperator grid_operator,
typename GridOperator::Traits::Jacobian matrix 
)
inline
template<typename GridOperator >
template<typename LFSVCache , typename LFSUCache , typename LocalPattern >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::addEntries ( const LFSVCache &  lfsv_cache,
const LFSUCache &  lfsu_cache,
const LocalPattern &  pattern 
)
inline
template<typename GridOperator >
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::CommunicationCache ( const GridOperator go)
inline
template<typename GridOperator >
CommunicationCache& Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCache ( )
inline
template<typename GridOperator >
const CommunicationCache& Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCache ( ) const
inline
template<typename GridOperator >
CommunicationCache& Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::communicationCache ( )
inline
template<typename GridOperator >
const CommunicationCache& Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::communicationCache ( ) const
inline
template<typename GridOperator >
shared_ptr<CommunicationCache> Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::communicationCacheStorage ( )
inline
template<typename GridOperator >
template<typename Pattern >
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::contains ( int  dim,
int  codim 
) const
inline
template<typename GridOperator >
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::contains ( int  dim,
int  codim 
) const
inline
template<typename GridOperator >
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::EntryAccumulator ( const NonOverlappingBorderDOFExchanger dof_exchanger,
const GFSU &  gfsu,
const GFSV &  gfsv,
Matrix &  matrix 
)
inline
template<typename GridOperator >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::finishInitialization ( )
inline
template<typename GridOperator >
template<typename Pattern >
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::fixedsize ( int  dim,
int  codim 
) const
inline
template<typename GridOperator >
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::fixedsize ( int  dim,
int  codim 
) const
inline
template<typename GridOperator >
template<typename Pattern >
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::gather ( MessageBuffer &  buff,
const Entity &  e 
) const
inline
template<typename GridOperator >
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::gather ( MessageBuffer &  buff,
const Entity &  e 
) const
inline
template<typename GridOperator >
template<typename Buffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::gather_data ( Buffer &  buf,
const Entity &  e,
const M &  matrix 
) const
inline
template<typename GridOperator >
template<typename Buffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::gather_pattern ( Buffer &  buf,
const Entity &  e 
) const
inline
template<typename GridOperator >
const GridView& Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::gridView ( ) const
inline
template<typename GridOperator >
bool Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::initialized ( ) const
inline
template<typename GridOperator >
Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::NoDataBorderDOFExchanger ( )
inline
template<typename GridOperator >
Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::NoDataBorderDOFExchanger ( const GridOperator grid_operator)
inline
template<typename GridOperator >
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::NonOverlappingBorderDOFExchanger ( const GridOperator grid_operator)
inline

Constructor. Sets up the local to global relations.

Parameters
[in]gridViewThe grid view to operate on.
template<typename GridOperator >
Dune::PDELab::OverlappingBorderDOFExchanger< GridOperator >::OverlappingBorderDOFExchanger ( )
inline
template<typename GridOperator >
Dune::PDELab::OverlappingBorderDOFExchanger< GridOperator >::OverlappingBorderDOFExchanger ( const GridOperator grid_operator)
inline
template<typename GridOperator >
const BorderPattern& Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::pattern ( ) const
inline
template<typename GridOperator >
template<typename Pattern >
Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::PatternExtender ( const NonOverlappingBorderDOFExchanger dof_exchanger,
const GFSU &  gfsu,
const GFSV &  gfsv,
Pattern &  pattern 
)
inline
template<typename GridOperator >
template<typename Pattern >
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::scatter ( MessageBuffer &  buff,
const Entity &  e,
size_t  n 
)
inline

Unpack data from message buffer to user.

References Dune::PDELab::BorderIndexIdCache< GFS >::findIndex().

template<typename GridOperator >
template<typename MessageBuffer , typename Entity >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::scatter ( MessageBuffer &  buff,
const Entity &  e,
size_type  n 
)
inline

Unpack data from message buffer to user.

References Dune::PDELab::BorderIndexIdCache< GFS >::findIndex().

template<typename GridOperator >
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::size ( const Entity &  e) const
inline
template<typename GridOperator >
template<typename Pattern >
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::PatternExtender< Pattern >::size ( Entity &  e) const
inline

How many objects of type DataType have to be sent for a given entity.

References Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::size().

template<typename GridOperator >
template<typename Entity >
size_type Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::EntryAccumulator::size ( Entity &  e) const
inline
template<typename GridOperator >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::update ( const GridOperator grid_operator)
inline
template<typename GridOperator >
void Dune::PDELab::NonOverlappingBorderDOFExchanger< GridOperator >::CommunicationCache::update ( )
inline
template<typename GridOperator >
void Dune::PDELab::NoDataBorderDOFExchanger< GridOperator >::update ( const GridOperator grid_operator)
inline

Friends

template<typename GridOperator >
friend class NonOverlappingBorderDOFExchanger
friend