Template Class BaseRegularGrid

Inheritance Relationships

Base Type

  • public ciabatta::ciabatta_top< Derived >

Derived Type

Class Documentation

template<typename Derived, int NDim>
class BaseRegularGrid : public ciabatta::ciabatta_top<Derived>

Regularly spaced N dimensional grid base type.

When instantiated, it satisfies Beluga named requirements: RegularGrid.

Template Parameters:

Subclassed by beluga::BaseDenseGrid2< Derived >

Public Functions

inline Eigen::Vector<int, NDim> cell_near(const Eigen::Vector<double, NDim> &p) const

Compute nearest grid cell coordinates given plane coordinates.

Note this is a surjective function.

Parameters:

p – Plane coordinates.

Returns:

Grid cell coordinates.

inline Eigen::Vector<double, NDim> coordinates_at(const Eigen::Vector<int, NDim> &pi) const

Compute plane coordinates given grid cell coordinates.

Note this is an injective function.

Parameters:

pi – Grid cell coordinates.

Returns:

Plane coordinates of the cell centroid.

template<class Range>
inline auto coordinates_for(Range &&cells) const

Compute plane coordinates given a range of cell coordinates.

Parameters:

cells – Range of grid cell identifiers.

Returns:

Range of plane coordinates.