dune-fem  2.4.1-rc
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id > Class Template Referencefinalabstract

include a Dune::Fem::Operator into a pass More...

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

Inheritance diagram for Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >:
Inheritance graph

Public Types

typedef Operator OperatorType
 export operator type More...
 
typedef BaseType::PreviousPassType PreviousPassType
 Type of the preceding pass. More...
 
typedef BaseType::TotalArgumentType TotalArgumentType
 
typedef BaseType::DestinationType DestinationType
 
typedef Dune::PushBackTuple< typename PreviousPassType::PassIds, std::integral_constant< int, passIdImp > >::type PassIds
 pass ids up to here (tuple of integral constants) More...
 
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 PushBackTuple< LocalArgumentType, DestinationType * >::type NextArgumentType
 Tuple containing destination types of all passes up to this one. More...
 
typedef PreviousPass::GlobalArgumentType DomainFunctionType
 type of discrete function in the operator's domain More...
 
typedef __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType RangeFunctionType
 type of discrete function in the operator's range More...
 
typedef PreviousPass::GlobalArgumentType::RangeFieldType DomainFieldType
 field type of the operator's domain More...
 
typedef __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType::RangeFieldType RangeFieldType
 field type of the operator's range More...
 

Public Member Functions

int passNumber () const
 
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 operator() (const DomainFunctionType &u, RangeFunctionType &w) const =0
 application operator More...
 
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...
 
Construction
 InsertOperatorPass (const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &space, const OperatorType &op, PreviousPassType &pass)
 constructor More...
 
Public member methods
void allocateLocalMemory ()
 
void printTexInfo (std::ostream &) const
 printTex info of operator More...
 
void compute (const TotalArgumentType &arg, DestinationType &dest) const
 
Non-interface methods
const OperatorType::RangeFunctionType::DiscreteFunctionSpaceType & space () const
 return discrete function space More...
 

Static Public Attributes

static const int passNum
 position in pass tree More...
 
static const int passId
 

Protected Member Functions

void apply (const TotalArgumentType &u, DestinationType &w) const
 
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 compute (const TotalArgumentType &arg, DestinationType &dest) const =0
 
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 Operator, class PreviousPass, int id>
class Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >

include a Dune::Fem::Operator into a pass

Note
This pass stores a reference to the operator passed to the constructor. The operator will always be called on the result of PreviousPass, so the position of this pass in your pass tree is of importance!
Template Parameters
Operatora Dune::Fem::Operator
PreviousPasstype of previous pass
idunique id for this pass

Member Typedef Documentation

typedef DeleteHandler<DestinationType> Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::DeleteHandlerType
inherited

type of mem handler, which deletes destination

template<class Operator , class PreviousPass , int id>
typedef BaseType::DestinationType Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::DestinationType

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

typedef PreviousPass::GlobalArgumentType ::RangeFieldType Dune::Fem::Operator< PreviousPass::GlobalArgumentType , __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType >::DomainFieldType
inherited

field type of the operator's domain

typedef PreviousPass::GlobalArgumentType Dune::Fem::Operator< PreviousPass::GlobalArgumentType , __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType >::DomainFunctionType
inherited

type of discrete function in the operator's domain

typedef PreviousPassType::GlobalArgumentType Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::GlobalArgumentType
inherited

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

typedef PreviousPassType::NextArgumentType Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::LocalArgumentType
inherited

Tuple containing destination types of all preceding passes.

typedef PushBackTuple< LocalArgumentType, DestinationType* >::type Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::NextArgumentType
inherited

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

typedef DestinationType :: DiscreteFunctionSpaceType :: CommunicationManagerType :: NonBlockingCommunicationType Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::NonBlockingCommunicationType
inherited
template<class Operator , class PreviousPass , int id>
typedef Operator Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::OperatorType

export operator type

typedef Dune::PushBackTuple< typename PreviousPassType::PassIds, std::integral_constant< int, passIdImp > >::type Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::PassIds
inherited

pass ids up to here (tuple of integral constants)

template<class Operator , class PreviousPass , int id>
typedef BaseType::PreviousPassType Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::PreviousPassType

Type of the preceding pass.

typedef __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType ::RangeFieldType Dune::Fem::Operator< PreviousPass::GlobalArgumentType , __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType >::RangeFieldType
inherited

field type of the operator's range

typedef __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType Dune::Fem::Operator< PreviousPass::GlobalArgumentType , __InsertOperatorPass::DiscreteModel< Operator >::Traits::DestinationType >::RangeFunctionType
inherited

type of discrete function in the operator's range

template<class Operator , class PreviousPass , int id>
typedef BaseType::TotalArgumentType Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::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 Operator , class PreviousPass , int id>
Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::InsertOperatorPass ( const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &  space,
const OperatorType op,
PreviousPassType pass 
)
inline

constructor

Parameters
[in]spacerange discrete function space
[in]opan operator instance
[in]passprevious pass

Member Function Documentation

template<class Operator , class PreviousPass , int id>
void Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::allocateLocalMemory ( )
inlinevirtual

Allocates the local memory of a pass, if needed. If memory is allocated, then deleteHandler must be set for removal of memory to avoid leaks

Implements Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator >, PreviousPass, id >.

template<class Operator , class PreviousPass , int id>
void Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::apply ( const TotalArgumentType u,
DestinationType w 
) const
inlineprotected
template<class Operator , class PreviousPass , int id>
void Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::compute ( const TotalArgumentType arg,
DestinationType dest 
) const
inline

Does the actual computations. Needs to be overridden in the derived clases

virtual void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::compute ( const TotalArgumentType arg,
DestinationType dest 
) const
protectedpure virtualinherited

Does the actual computations. Needs to be overridden in the derived clases

const DestinationType& Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::destination ( ) const
inlineinherited

return reference to internal discrete function

virtual void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::finalizeComm ( ) const
inlineprotectedvirtualinherited

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

void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::finalizeCommunication ( const GlobalArgumentType arg) const
inlineinherited

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

void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::finalizeCommunication ( const TotalArgumentType totalArg) const
inlineprotectedinherited

finalizeCommunication collects possbily initiated non-blocking communications for all passes

virtual void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::initComm ( ) const
inlineprotectedvirtualinherited

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

NextArgumentType Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::localArgument ( ) const
inlineinherited

Returns a compilation of the results of the preceding passes.

virtual void Dune::Fem::Operator< PreviousPass::GlobalArgumentType , __InsertOperatorPass::DiscreteModel< Operator >::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.
void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::operator() ( const GlobalArgumentType arg,
DestinationType dest 
) const
inlineinherited

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

void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::pass ( const GlobalArgumentType arg) const
inlineinherited

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.

int Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::passNumber ( ) const
inlineinherited
template<class Operator , class PreviousPass , int id>
void Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::printTexInfo ( std::ostream &  ) const
inline

printTex info of operator

virtual void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::receiveComm ( ) const
inlineprotectedvirtualinherited

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

void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::receiveCommunication ( const GlobalArgumentType arg) const
inlineinherited

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

void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::receiveCommunication ( const TotalArgumentType totalArg) const
inlineprotectedinherited

receiveCommunication collects possbily initiated non-blocking communications for all passes

virtual bool Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::requireCommunication ( ) const
inlinevirtualinherited

requireCommunication returns true if the pass needs communication at all

Note
The default implementation returns true
void Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::setTime ( const double  t)
inlineinherited

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

template<class Operator , class PreviousPass , int id>
const OperatorType::RangeFunctionType::DiscreteFunctionSpaceType& Dune::Fem::InsertOperatorPass< Operator, PreviousPass, id >::space ( ) const
inline

return discrete function space

double Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::time ( ) const
inlineinherited

return current time of calculation

double Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::timeStepEstimate ( ) const
inlineinherited

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.

virtual double Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::timeStepEstimateImpl ( ) const
inlinevirtualinherited

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

Member Data Documentation

DeleteHandlerType* Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::deleteHandler_
protectedinherited

object to delete destination_

DestinationType* Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::destination_
protectedinherited

destination (might be set from outside)

bool Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::finalizeCommunication_
mutableprotectedinherited
const int Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::passId
staticinherited
const int Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::passNum
staticinherited

position in pass tree

PreviousPassType& Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::previousPass_
protectedinherited
double Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator > , PreviousPass , passIdImp >::time_
protectedinherited

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