dune-fem  2.4.1-rc
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp > Class Template Referenceabstract

Base class for specific pass implementations. More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/pass/common/local.hh>

Inheritance diagram for Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >:
Inheritance graph

Classes

class  DeleteHandler
 

Public Types

typedef PreviousPassImp PreviousPassType
 Type of the preceding pass. More...
 
typedef Dune::PushBackTuple< typename PreviousPassType::PassIds, std::integral_constant< int, passIdImp > >::type PassIds
 pass ids up to here (tuple of integral constants) More...
 
typedef DiscreteModelImp::Traits::DestinationType DestinationType
 
typedef DeleteHandler< DestinationTypeDeleteHandlerType
 type of mem handler, which deletes destination More...
 
typedef DestinationType::DiscreteFunctionSpaceType::CommunicationManagerType::NonBlockingCommunicationType NonBlockingCommunicationType
 
typedef PreviousPassType::GlobalArgumentType GlobalArgumentType
 
typedef PreviousPassType::NextArgumentType LocalArgumentType
 Tuple containing destination types of all preceding passes. More...
 
typedef PushFrontTuple< LocalArgumentType, const GlobalArgumentType * >::type TotalArgumentType
 
typedef PushBackTuple< LocalArgumentType, DestinationType * >::type NextArgumentType
 Tuple containing destination types of all passes up to this one. More...
 
typedef PreviousPassImp::GlobalArgumentType DomainFunctionType
 type of discrete function in the operator's domain More...
 
typedef DiscreteModelImp::Traits::DestinationType RangeFunctionType
 type of discrete function in the operator's range More...
 
typedef PreviousPassImp::GlobalArgumentType::RangeFieldType DomainFieldType
 field type of the operator's domain More...
 
typedef DiscreteModelImp::Traits::DestinationType::RangeFieldType RangeFieldType
 field type of the operator's range More...
 

Public Member Functions

int passNumber () const
 
 Pass (PreviousPassType &pass)
 
virtual ~Pass ()
 Destructor. More...
 
void printTexInfo (std::ostream &out) const
 printTex info of operator More...
 
void operator() (const GlobalArgumentType &arg, DestinationType &dest) const
 Application operator. The application operator is called by the client directly. It makes only sense to call this operator directly on the last pass. More...
 
virtual void allocateLocalMemory ()=0
 
void setTime (const double t)
 Set time provider (which gives you access to the global time). More...
 
double timeStepEstimate () const
 return time step estimate for explicit Runge Kutta solver, calls recursively the method timeStepEstimateImpl of all previous passes. Make sure to overload the method timeStepEstimateImpl in your implementation if this method really does something. More...
 
double time () const
 return current time of calculation More...
 
const DestinationTypedestination () const
 return reference to internal discrete function More...
 
void pass (const GlobalArgumentType &arg) const
 
NextArgumentType localArgument () const
 Returns a compilation of the results of the preceding passes. More...
 
void finalizeCommunication (const GlobalArgumentType &arg) const
 finalizeCommunication collects possbily initiated non-blocking communications for all passes including the global argument this method will be called from the next pass More...
 
void receiveCommunication (const GlobalArgumentType &arg) const
 finalizeCommunication collects possbily initiated non-blocking communications for all passes including the global argument this method will be called from the next pass More...
 
virtual double timeStepEstimateImpl () const
 
virtual bool requireCommunication () const
 requireCommunication returns true if the pass needs communication at all More...
 
virtual void operator() (const DomainFunctionType &u, RangeFunctionType &w) const =0
 application operator More...
 

Static Public Attributes

static const int passNum = PreviousPassType::passNum + 1
 position in pass tree More...
 
static const int passId = passIdImp
 

Protected Member Functions

virtual void compute (const TotalArgumentType &arg, DestinationType &dest) const =0
 
void finalizeCommunication (const TotalArgumentType &totalArg) const
 finalizeCommunication collects possbily initiated non-blocking communications for all passes More...
 
void receiveCommunication (const TotalArgumentType &totalArg) const
 receiveCommunication collects possbily initiated non-blocking communications for all passes More...
 
virtual void initComm () const
 initializeCommunication of this pass, this will initialize the communication of destination_ and has to be overloaded in the implementation More...
 
virtual void finalizeComm () const
 finalizeCommunication of this pass, this will collect the communication of destination_ and has to be overloaded in the implementation More...
 
virtual void receiveComm () const
 receiveCommunication of this pass, which will reset changes the communication did to the destination_ and has to be overloaded in the implementation More...
 

Protected Attributes

DestinationTypedestination_
 destination (might be set from outside) More...
 
DeleteHandlerTypedeleteHandler_
 object to delete destination_ More...
 
PreviousPassTypepreviousPass_
 
double time_
 
bool finalizeCommunication_
 

Detailed Description

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
class Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >

Base class for specific pass implementations.

Pass not only provides the interface for the specialised implementations, but also organizes the calls to other passes and assembles the results of the preceding passes in a tuple of discrete functions which can be used in the computations of the pass. The computations must be implemented in the compute method of the derived classes.

Member Typedef Documentation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef DeleteHandler<DestinationType> Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::DeleteHandlerType

type of mem handler, which deletes destination

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef DiscreteModelImp::Traits::DestinationType Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::DestinationType

Type of the discrete function which stores the result of this pass' computations.

typedef PreviousPassImp::GlobalArgumentType ::RangeFieldType Dune::Fem::Operator< PreviousPassImp::GlobalArgumentType , DiscreteModelImp::Traits::DestinationType >::DomainFieldType
inherited

field type of the operator's domain

typedef PreviousPassImp::GlobalArgumentType Dune::Fem::Operator< PreviousPassImp::GlobalArgumentType , DiscreteModelImp::Traits::DestinationType >::DomainFunctionType
inherited

type of discrete function in the operator's domain

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef PreviousPassType::GlobalArgumentType Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::GlobalArgumentType

Type of the discrete function which is passed to the overall operator by the user

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef PreviousPassType::NextArgumentType Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::LocalArgumentType

Tuple containing destination types of all preceding passes.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef PushBackTuple< LocalArgumentType, DestinationType* >::type Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::NextArgumentType

Tuple containing destination types of all passes up to this one.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef DestinationType :: DiscreteFunctionSpaceType :: CommunicationManagerType :: NonBlockingCommunicationType Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::NonBlockingCommunicationType
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef Dune::PushBackTuple< typename PreviousPassType::PassIds, std::integral_constant< int, passIdImp > >::type Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::PassIds

pass ids up to here (tuple of integral constants)

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef PreviousPassImp Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::PreviousPassType

Type of the preceding pass.

typedef DiscreteModelImp::Traits::DestinationType ::RangeFieldType Dune::Fem::Operator< PreviousPassImp::GlobalArgumentType , DiscreteModelImp::Traits::DestinationType >::RangeFieldType
inherited

field type of the operator's range

typedef DiscreteModelImp::Traits::DestinationType Dune::Fem::Operator< PreviousPassImp::GlobalArgumentType , DiscreteModelImp::Traits::DestinationType >::RangeFunctionType
inherited

type of discrete function in the operator's range

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
typedef PushFrontTuple< LocalArgumentType, const GlobalArgumentType* >::type Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::TotalArgumentType

Tuple containing destination types of all preceding passes plus the global argument. This serves as the argument for this pass' computations

Constructor & Destructor Documentation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::Pass ( PreviousPassType pass)
inline

Constructor

Parameters
passPrevious pass
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::~Pass ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::allocateLocalMemory ( )
pure virtual
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::compute ( const TotalArgumentType arg,
DestinationType dest 
) const
protectedpure virtual
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
const DestinationType& Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::destination ( ) const
inline

return reference to internal discrete function

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::finalizeComm ( ) const
inlineprotectedvirtual

finalizeCommunication of this pass, this will collect the communication of destination_ and has to be overloaded in the implementation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::finalizeCommunication ( const GlobalArgumentType arg) const
inline

finalizeCommunication collects possbily initiated non-blocking communications for all passes including the global argument this method will be called from the next pass

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::finalizeCommunication ( const TotalArgumentType totalArg) const
inlineprotected

finalizeCommunication collects possbily initiated non-blocking communications for all passes

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::initComm ( ) const
inlineprotectedvirtual

initializeCommunication of this pass, this will initialize the communication of destination_ and has to be overloaded in the implementation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
NextArgumentType Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::localArgument ( ) const
inline

Returns a compilation of the results of the preceding passes.

virtual void Dune::Fem::Operator< PreviousPassImp::GlobalArgumentType , DiscreteModelImp::Traits::DestinationType >::operator() ( const DomainFunctionType u,
RangeFunctionType w 
) const
pure virtualinherited

application operator

Parameters
[in]uargument discrete function
[out]wdestination discrete function
Note
This method has to be implemented by all derived classes.
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::operator() ( const GlobalArgumentType arg,
DestinationType dest 
) const
inline

Application operator. The application operator is called by the client directly. It makes only sense to call this operator directly on the last pass.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::pass ( const GlobalArgumentType arg) const
inline

Same as application operator, but uses own memory instead of the discrete function provided by the client. This method is called on all passes except the last one.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
int Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::passNumber ( ) const
inline
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::printTexInfo ( std::ostream &  out) const
inline
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::receiveComm ( ) const
inlineprotectedvirtual

receiveCommunication of this pass, which will reset changes the communication did to the destination_ and has to be overloaded in the implementation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::receiveCommunication ( const GlobalArgumentType arg) const
inline

finalizeCommunication collects possbily initiated non-blocking communications for all passes including the global argument this method will be called from the next pass

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::receiveCommunication ( const TotalArgumentType totalArg) const
inlineprotected

receiveCommunication collects possbily initiated non-blocking communications for all passes

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual bool Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::requireCommunication ( ) const
inlinevirtual

requireCommunication returns true if the pass needs communication at all

Note
The default implementation returns true

Reimplemented in Dune::Fem::DGInverseMassPass< functionalId, PreviousPass, id >.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
void Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::setTime ( const double  t)
inline

Set time provider (which gives you access to the global time).

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
double Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::time ( ) const
inline

return current time of calculation

Referenced by Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >::prepare().

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
double Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::timeStepEstimate ( ) const
inline

return time step estimate for explicit Runge Kutta solver, calls recursively the method timeStepEstimateImpl of all previous passes. Make sure to overload the method timeStepEstimateImpl in your implementation if this method really does something.

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
virtual double Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::timeStepEstimateImpl ( ) const
inlinevirtual

derived passes have to implement this method returning the time step estimate

Reimplemented in Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp, passIdImp >, and Dune::Fem::LocalDGPass< DiscreteModelImp, PreviousPassImp >.

Member Data Documentation

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
DeleteHandlerType* Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::deleteHandler_
protected
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
DestinationType* Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::destination_
protected
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
bool Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::finalizeCommunication_
mutableprotected
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
const int Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::passId = passIdImp
static
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
const int Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::passNum = PreviousPassType::passNum + 1
static

position in pass tree

template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
PreviousPassType& Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::previousPass_
protected
template<class DiscreteModelImp, class PreviousPassImp, int passIdImp>
double Dune::Fem::Pass< DiscreteModelImp, PreviousPassImp, passIdImp >::time_
protected

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