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];
A grid of points indexed by integer coordinates.
int dimension(int i) const
Get grid dimension along Cartesian direction i.
IntVector position(int rank) const
Get the position IntVector of a grid point with a specified rank.
int rank(const IntVector &position) const
Get the rank of a grid point with specified position.
IntVector dimensions() const
Get an IntVector of the grid dimensions.
int size() const
Get total number of grid points.
void setDimensions(const IntVector &dimensions)
Set the grid dimensions in all directions.
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.
Grid()
Default constructor.
An IntVector is an integer Cartesian vector.
File containing preprocessor macros for error handling.
const int Dimension
Dimensionality of space.
Utility classes for scientific computation.