Beluga named requirements: RegularGrid

Regular grids divide space in evenly sized portions or cells. A coordinate system over integers can thus be defined, in addition to that of the space in which the grid is embedded.

A type G satisfies RegularGrid requirements if given g, a possibly const instance of G:

  • g.resolution() returns the side length of all grid N-dimensional cells as a double;

  • given possibly const embedding space coordinates x of type Eigen::Vector<double, NDim>, g.cell_at(x) returns grid cell coordinates as an Eigen::Vector<int, NDim1> value;

  • given possibly const embedding space coordinates p of Eigen::Vector<double, NDim> type, g.cell_at(p) returns grid cell coordinates as an Eigen::Vector<int, NDim> value;

  • given possibly const grid cell coordinates xi of type Eigen::Vector<int, NDim>, g.coordinates_at(xi) returns embedding space coordinates as an Eigen::Vector<double, NDim> value;

  • given a possibly const range r of grid cell coordinates of Eigen::Vector<int, NDim> type, g.coordinates_for(r) returns a range of embedding space coordinates as Eigen::Vector<double, NDim> values.