Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes

LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT > Class Template Reference

A grid whose origin has been shiftet by a certain offset. More...

#include <displacedgrid.h>

Inherits GridBase< CELL_TYPE, TOPOLOGY::DIM >.

Collaboration diagram for LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CELL_TYPE Cell
typedef TOPOLOGY Topology
typedef boost::multi_array
< CELL_TYPE, DIM >::index 
Index
typedef Grid< CELL_TYPE, TOPOLOGY > Delegate
typedef CoordMap< CELL_TYPE,
Delegate
CoordMapType

Public Member Functions

 DisplacedGrid (const CoordBox< DIM > &box=CoordBox< DIM >(), const CELL_TYPE &defaultCell=CELL_TYPE(), const CELL_TYPE &edgeCell=CELL_TYPE(), const Coord< DIM > &topologicalDimensions=Coord< DIM >())
 DisplacedGrid (const Delegate &grid, const Coord< DIM > &origin=Coord< DIM >())
const Coord< DIM > & topologicalDimensions () const
Coord< DIM > & topologicalDimensions ()
CELL_TYPE * baseAddress ()
const CELL_TYPE * baseAddress () const
const Coord< DIM > & getOrigin () const
const CELL_TYPE & getEdgeCell () const
CELL_TYPE & getEdgeCell ()
void setOrigin (const Coord< DIM > &newOrigin)
void resize (const CoordBox< DIM > &box)
CELL_TYPE & operator[] (const Coord< DIM > &absoluteCoord)
const CELL_TYPE & operator[] (const Coord< DIM > &absoluteCoord) const
virtual void set (const Coord< DIM > &coord, const CELL_TYPE &cell)
virtual void set (const Streak< DIM > &streak, const CELL_TYPE *cells)
virtual CELL_TYPE get (const Coord< DIM > &coord) const
virtual void get (const Streak< DIM > &streak, CELL_TYPE *cells) const
virtual void setEdge (const CELL_TYPE &cell)
virtual const CELL_TYPE & getEdge () const
void fill (const CoordBox< DIM > &box, const CELL_TYPE &cell)
void paste (const GridBase< CELL_TYPE, DIM > &grid, const Region< DIM > &region)
const Coord< DIM > & getDimensions () const
virtual CoordBox< DIMboundingBox () const
CoordMapType getNeighborhood (const Coord< DIM > &center) const
const DelegatevanillaGrid () const
DelegatevanillaGrid ()
std::string toString () const

Static Public Attributes

static const int DIM = TOPOLOGY::DIM

Protected Member Functions

void saveMemberImplementation (char *target, const Selector< CELL_TYPE > &selector, const Region< DIM > &region) const
void loadMemberImplementation (const char *source, const Selector< CELL_TYPE > &selector, const Region< DIM > &region)

Private Attributes

Delegate delegate
Coord< DIMorigin
Coord< DIMtopoDimensions

Detailed Description

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
class LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >

A grid whose origin has been shiftet by a certain offset.

If TOPOLOGICALLY_CORRECT is set to true, the coordinates will be normalized according to the given topology and some superordinate dimension (see topologicalDimensions()) before using them for access. Useful for writing topology agnostic code that should work an a torus, too.


Member Typedef Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef CELL_TYPE LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::Cell
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef CoordMap<CELL_TYPE, Delegate> LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::CoordMapType
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef Grid<CELL_TYPE, TOPOLOGY> LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::Delegate
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef boost::multi_array<CELL_TYPE, DIM>::index LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::Index
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
typedef TOPOLOGY LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::DisplacedGrid ( const CoordBox< DIM > &  box = CoordBox<DIM>(),
const CELL_TYPE &  defaultCell = CELL_TYPE(),
const CELL_TYPE &  edgeCell = CELL_TYPE(),
const Coord< DIM > &  topologicalDimensions = Coord<DIM>() 
) [inline, explicit]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::DisplacedGrid ( const Delegate grid,
const Coord< DIM > &  origin = Coord<DIM>() 
) [inline, explicit]

Member Function Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CELL_TYPE* LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::baseAddress (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const CELL_TYPE* LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::baseAddress (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual CoordBox<DIM> LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::boundingBox (  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::fill ( const CoordBox< DIM > &  box,
const CELL_TYPE &  cell 
) [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual CELL_TYPE LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::get ( const Coord< DIM > &  coord  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::get ( const Streak< DIM > &  streak,
CELL_TYPE *  cells 
) const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const Coord<DIM>& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getDimensions (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual const CELL_TYPE& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getEdge (  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CELL_TYPE& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getEdgeCell (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const CELL_TYPE& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getEdgeCell (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CoordMapType LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getNeighborhood ( const Coord< DIM > &  center  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const Coord<DIM>& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::getOrigin (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::loadMemberImplementation ( const char *  source,
const Selector< CELL_TYPE > &  selector,
const Region< DIM > &  region 
) [inline, protected, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
CELL_TYPE& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::operator[] ( const Coord< DIM > &  absoluteCoord  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const CELL_TYPE& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::operator[] ( const Coord< DIM > &  absoluteCoord  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::paste ( const GridBase< CELL_TYPE, DIM > &  grid,
const Region< DIM > &  region 
) [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::resize ( const CoordBox< DIM > &  box  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::saveMemberImplementation ( char *  target,
const Selector< CELL_TYPE > &  selector,
const Region< DIM > &  region 
) const [inline, protected, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::set ( const Streak< DIM > &  streak,
const CELL_TYPE *  cells 
) [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::set ( const Coord< DIM > &  coord,
const CELL_TYPE &  cell 
) [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
virtual void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::setEdge ( const CELL_TYPE &  cell  )  [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
void LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::setOrigin ( const Coord< DIM > &  newOrigin  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const Coord<DIM>& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::topologicalDimensions (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Coord<DIM>& LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::topologicalDimensions (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
std::string LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::toString (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Delegate* LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::vanillaGrid (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const Delegate* LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::vanillaGrid (  )  const [inline]

Member Data Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Delegate LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::delegate [private]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
const int LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::DIM = TOPOLOGY::DIM [static]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Coord<DIM> LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::origin [private]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology, bool TOPOLOGICALLY_CORRECT = false>
Coord<DIM> LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::topoDimensions [private]

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