This is an abstract base class for all grid classes. More...
#include <gridbase.h>
Classes | |
class | ConstIterator |
Convenice class for reading multiple cells. More... | |
class | Iterator |
Convenice class for reading/writing multiple cells. More... | |
Public Types | |
typedef CELL | CellType |
Public Member Functions | |
virtual | ~GridBase () |
virtual void | set (const Coord< DIM > &, const CELL &)=0 |
virtual void | set (const Streak< DIM > &, const CELL *)=0 |
virtual CELL | get (const Coord< DIM > &) const =0 |
virtual void | get (const Streak< DIM > &, CELL *) const =0 |
virtual void | setEdge (const CELL &)=0 |
virtual const CELL & | getEdge () const =0 |
virtual CoordBox< DIM > | boundingBox () const =0 |
ConstIterator | at (const Coord< DIM > &coord) const |
Iterator | at (const Coord< DIM > &coord) |
Coord< DIM > | dimensions () const |
bool | operator== (const GridBase< CELL, DIMENSIONS > &other) const |
bool | operator!= (const GridBase< CELL, DIMENSIONS > &other) const |
template<typename MEMBER > | |
void | saveMember (MEMBER *target, const Selector< CELL > &selector, const Region< DIM > ®ion) const |
Allows the user to extract a single member variable of all cells within the given region. | |
void | saveMemberUnchecked (char *target, const Selector< CELL > &selector, const Region< DIM > ®ion) const |
Same as saveMember(), but sans the type checking. | |
template<typename MEMBER > | |
void | loadMember (const MEMBER *source, const Selector< CELL > &selector, const Region< DIM > ®ion) |
Used for bulk-setting of single member variables. | |
Static Public Attributes | |
static const int | DIM = DIMENSIONS |
Protected Member Functions | |
virtual void | saveMemberImplementation (char *target, const Selector< CELL > &selector, const Region< DIM > ®ion) const =0 |
virtual void | loadMemberImplementation (const char *source, const Selector< CELL > &selector, const Region< DIM > ®ion)=0 |
This is an abstract base class for all grid classes.
It's generic because all methods are virtual, but not very efficient -- for the same reason.
typedef CELL LibGeoDecomp::GridBase< CELL, DIMENSIONS >::CellType |
Reimplemented in LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >.
virtual LibGeoDecomp::GridBase< CELL, DIMENSIONS >::~GridBase | ( | ) | [inline, virtual] |
ConstIterator LibGeoDecomp::GridBase< CELL, DIMENSIONS >::at | ( | const Coord< DIM > & | coord | ) | const [inline] |
Iterator LibGeoDecomp::GridBase< CELL, DIMENSIONS >::at | ( | const Coord< DIM > & | coord | ) | [inline] |
virtual CoordBox<DIM> LibGeoDecomp::GridBase< CELL, DIMENSIONS >::boundingBox | ( | ) | const [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::dimensions(), LibGeoDecomp::Grid< Color >::Grid(), LibGeoDecomp::NonPoDTestCell::Initializer::grid(), LibGeoDecomp::TestInitializer< TestCell< 2 > >::grid(), LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::grid(), LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::operator==(), LibGeoDecomp::Grid< Color >::operator==(), LibGeoDecomp::ParallelMemoryWriter< CELL_TYPE >::stepFinished(), LibGeoDecomp::MPIIOWriter< CELL_TYPE >::stepFinished(), LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished(), LibGeoDecomp::ASCIIWriter< CELL_TYPE, ATTRIBUTE_SELECTOR >::stepFinished(), and LibGeoDecomp::PPMWriter< CELL_TYPE, CELL_PLOTTER >::writePPM().
Coord<DIM> LibGeoDecomp::GridBase< CELL, DIMENSIONS >::dimensions | ( | ) | const [inline] |
Referenced by LibGeoDecomp::Plotter< CELL_TYPE, CELL_PLOTTER >::plotGrid(), LibGeoDecomp::Plotter< CELL_TYPE, CELL_PLOTTER >::plotGridInViewport(), LibGeoDecomp::TracingWriter< CELL_TYPE >::stepFinished(), LibGeoDecomp::SerialBOVWriter< CELL_TYPE >::stepFinished(), and LibGeoDecomp::MPIIOWriter< CELL_TYPE >::stepFinished().
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::get | ( | const Streak< DIM > & | , | |
CELL * | ||||
) | const [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
virtual CELL LibGeoDecomp::GridBase< CELL, DIMENSIONS >::get | ( | const Coord< DIM > & | ) | const [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::GridBase< CELL, DIMENSIONS >::ConstIterator::ConstIterator(), LibGeoDecomp::Grid< Color >::Grid(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::Iterator::Iterator(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::Iterator::operator++(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::ConstIterator::operator++(), LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::operator==(), LibGeoDecomp::Grid< Color >::operator==(), LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >::paste(), LibGeoDecomp::Plotter< CELL_TYPE, CELL_PLOTTER >::plotGridInViewport(), LibGeoDecomp::ParallelMemoryWriter< CELL_TYPE >::stepFinished(), LibGeoDecomp::HpxWriterSink< CELL_TYPE, CONVERTER >::stepFinished(), LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished(), and LibGeoDecomp::ASCIIWriter< CELL_TYPE, ATTRIBUTE_SELECTOR >::stepFinished().
virtual const CELL& LibGeoDecomp::GridBase< CELL, DIMENSIONS >::getEdge | ( | ) | const [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::operator==(), LibGeoDecomp::Grid< Color >::operator==(), LibGeoDecomp::ParallelMemoryWriter< CELL_TYPE >::stepFinished(), and LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished().
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::loadMember | ( | const MEMBER * | source, | |
const Selector< CELL > & | selector, | |||
const Region< DIM > & | region | |||
) | [inline] |
Used for bulk-setting of single member variables.
Assumes that source contains as many instances of the member as region contains coordinates.
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::loadMemberImplementation | ( | const char * | source, | |
const Selector< CELL > & | selector, | |||
const Region< DIM > & | region | |||
) | [protected, pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::loadMember().
bool LibGeoDecomp::GridBase< CELL, DIMENSIONS >::operator!= | ( | const GridBase< CELL, DIMENSIONS > & | other | ) | const [inline] |
bool LibGeoDecomp::GridBase< CELL, DIMENSIONS >::operator== | ( | const GridBase< CELL, DIMENSIONS > & | other | ) | const [inline] |
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMember | ( | MEMBER * | target, | |
const Selector< CELL > & | selector, | |||
const Region< DIM > & | region | |||
) | const [inline] |
Allows the user to extract a single member variable of all cells within the given region.
Assumes that target points to an area with sufficient space.
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMemberImplementation | ( | char * | target, | |
const Selector< CELL > & | selector, | |||
const Region< DIM > & | region | |||
) | const [protected, pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::saveMember(), and LibGeoDecomp::GridBase< ELEMENT_TYPE, 1 >::saveMemberUnchecked().
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMemberUnchecked | ( | char * | target, | |
const Selector< CELL > & | selector, | |||
const Region< DIM > & | region | |||
) | const [inline] |
Same as saveMember(), but sans the type checking.
Useful in Writers and other components that might not know about the variable's type.
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::set | ( | const Coord< DIM > & | , | |
const CELL & | ||||
) | [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::NonPoDTestCell::Initializer::grid(), LibGeoDecomp::TestInitializer< TestCell< 2 > >::grid(), and LibGeoDecomp::GridBase< CELL, DIMENSIONS >::Iterator::operator<<().
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::set | ( | const Streak< DIM > & | , | |
const CELL * | ||||
) | [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::setEdge | ( | const CELL & | ) | [pure virtual] |
Implemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.
Referenced by LibGeoDecomp::TestInitializer< TestCell< 2 > >::grid().
const int LibGeoDecomp::GridBase< CELL, DIMENSIONS >::DIM = DIMENSIONS [static] |
Reimplemented in LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >, LibGeoDecomp::SoAGrid< CELL, TOPOLOGY, TOPOLOGICALLY_CORRECT >, LibGeoDecomp::UnstructuredGrid< ELEMENT_TYPE, MATRICES, VALUE_TYPE, C, SIGMA >, LibGeoDecomp::DisplacedGrid< CELL_TYPE, Topology >, LibGeoDecomp::Grid< CELL_TYPE, Topology >, and LibGeoDecomp::Grid< Color >.