12 #include <util/space/IntVector.h> 102 bool isInGrid(
int coordinate,
int i)
const;
126 int shift(
int& coordinate,
int i)
const;
157 {
return dimensions_; }
163 return dimensions_[i];
const int Dimension
Dimensionality of space.
IntVector dimensions() const
Get an IntVector of the grid dimensions.
Grid()
Default constructor.
File containing preprocessor macros for error handling.
IntVector position(int rank) const
Get the position IntVector of a grid point with a specified rank.
int dimension(int i) const
Get grid dimension along Cartesian direction i.
bool isInGrid(int coordinate, int i) const
Is this coordinate in range?
int shift(int &coordinate, int i) const
Shift a periodic coordinate into range.
int size() const
Get total number of grid points.
Utility classes for scientific computation.
int rank(const IntVector &position) const
Get the rank of a grid point with specified position.
An IntVector is an integer Cartesian vector.
A grid of points indexed by integer coordinates.
void setDimensions(const IntVector &dimensions)
Set the grid dimensions in all directions.