Classes | Public Types | Public Member Functions | Protected Attributes | Friends

LibGeoDecomp::Steerer< CELL_TYPE > Class Template Reference

A steerer is an object which is allowed to modify a Simulator's (region of the) grid. More...

#include <steerer.h>

Inherited by LibGeoDecomp::MockSteerer< CELL_TYPE >.

Collaboration diagram for LibGeoDecomp::Steerer< CELL_TYPE >:
Collaboration graph
[legend]

List of all members.

Classes

class  SteererFeedback
 This class may be used by a Steerer to convey feedback to the Simulator. More...

Public Types

typedef
APITraits::SelectStaticData
< CELL_TYPE >::Value 
StaticData
typedef
APITraits::SelectTopology
< CELL_TYPE >::Value 
Topology
typedef GridBase< CELL_TYPE,
Topology::DIM
GridType
typedef Coord< Topology::DIMCoordType

Public Member Functions

 Steerer (const unsigned period)
virtual ~Steerer ()
virtual Steererclone ()
 "Virtual Copy constructor" This function may be called whenever a copy of a steerer is needed instead of a plain pointer copy.
virtual void setRegion (const Region< Topology::DIM > &newRegion)
 notifies the Steerer that the supplied region is the domain of the current process.
virtual void nextStep (GridType *grid, const Region< Topology::DIM > &validRegion, const CoordType &globalDimensions, unsigned step, SteererEvent event, std::size_t rank, bool lastCall, SteererFeedback *feedback)=0
 is a callback which gives the Steerer access to a Simulator's grid.
const unsignedgetPeriod () const

Protected Attributes

Region< Topology::DIMregion
unsigned period

Friends

class Serialization

Detailed Description

template<typename CELL_TYPE>
class LibGeoDecomp::Steerer< CELL_TYPE >

A steerer is an object which is allowed to modify a Simulator's (region of the) grid.

It is the counterpart to a ParallelWriter (there is no counterpart to the SerialWriter though. Steerers are all expected to run in parallel). Possible uses include dynamically introducing new obstacles in a LBM solver or modifying the ambient temperature in a dendrite simulation.


Member Typedef Documentation

template<typename CELL_TYPE>
typedef Coord<Topology::DIM> LibGeoDecomp::Steerer< CELL_TYPE >::CoordType
template<typename CELL_TYPE>
typedef GridBase<CELL_TYPE, Topology::DIM> LibGeoDecomp::Steerer< CELL_TYPE >::GridType
template<typename CELL_TYPE>
typedef APITraits::SelectStaticData<CELL_TYPE>::Value LibGeoDecomp::Steerer< CELL_TYPE >::StaticData
template<typename CELL_TYPE>
typedef APITraits::SelectTopology<CELL_TYPE>::Value LibGeoDecomp::Steerer< CELL_TYPE >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE>
LibGeoDecomp::Steerer< CELL_TYPE >::Steerer ( const unsigned  period  )  [inline, explicit]
template<typename CELL_TYPE>
virtual LibGeoDecomp::Steerer< CELL_TYPE >::~Steerer (  )  [inline, virtual]

Member Function Documentation

template<typename CELL_TYPE>
virtual Steerer* LibGeoDecomp::Steerer< CELL_TYPE >::clone (  )  [inline, virtual]

"Virtual Copy constructor" This function may be called whenever a copy of a steerer is needed instead of a plain pointer copy.

Must be implemented by t

template<typename CELL_TYPE>
const unsigned& LibGeoDecomp::Steerer< CELL_TYPE >::getPeriod (  )  const [inline]
template<typename CELL_TYPE>
virtual void LibGeoDecomp::Steerer< CELL_TYPE >::nextStep ( GridType grid,
const Region< Topology::DIM > &  validRegion,
const CoordType globalDimensions,
unsigned  step,
SteererEvent  event,
std::size_t  rank,
bool  lastCall,
SteererFeedback feedback 
) [pure virtual]

is a callback which gives the Steerer access to a Simulator's grid.

Returns false if the Steerer wishes to end the simulation.

The part of the simulation space which is accessible via grid is specified in validRegion. The current time step is given in step. This function may be called multiple times per step (e.g. seperately for inner ghost zones and inner set (which is equivalent to the interface of ParallelWriter).

template<typename CELL_TYPE>
virtual void LibGeoDecomp::Steerer< CELL_TYPE >::setRegion ( const Region< Topology::DIM > &  newRegion  )  [inline, virtual]

notifies the Steerer that the supplied region is the domain of the current process.

This fuction will be called once the domain decomposition has been done. Steerers can use this information to determine for instance where to forward certain steering data fragments. validRegion in nextStep() will generally be a subset of newRegion.


Friends And Related Function Documentation

template<typename CELL_TYPE>
friend class Serialization [friend]

Member Data Documentation

template<typename CELL_TYPE>
unsigned LibGeoDecomp::Steerer< CELL_TYPE >::period [protected]
template<typename CELL_TYPE>
Region<Topology::DIM> LibGeoDecomp::Steerer< CELL_TYPE >::region [protected]

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