Predefined grid implementation that represents a structured, equispaced grid.
More...
template<std::size_t dim, Concepts::Scalar CoordinateType>
class GridFormat::ImageGrid< dim, CoordinateType >
- Template Parameters
-
dim | The dimension of the grid (1 <= dim <= 3) |
CoordinateType | The type used to represent coordinates (e.g. double ) |
|
template<Concepts::StaticallySizedMDRange< 1 > Size, Concepts::StaticallySizedMDRange< 1 > Cells> |
| ImageGrid (Size &&size, Cells &&cells) |
| Constructor overload for general range types.
|
|
template<Concepts::StaticallySizedMDRange< 1 > Origin, Concepts::StaticallySizedMDRange< 1 > Size, Concepts::StaticallySizedMDRange< 1 > Cells>
requires (static_size<Origin> == dim and static_size<Size> == dim and static_size<Cells> == dim and std::integral<std::ranges::range_value_t<Cells>>) |
| ImageGrid (Origin &&origin, Size &&size, Cells &&cells) |
| Constructor overload for general range types.
|
|
| ImageGrid (std::array< CoordinateType, dim > size, std::array< std::size_t, dim > cells) |
| Construct a grid with the given size and discretization.
|
|
| ImageGrid (std::array< CoordinateType, dim > origin, std::array< CoordinateType, dim > size, std::array< std::size_t, dim > cells) |
| Construct a grid with the given size and discretization.
|
|
std::size_t | number_of_cells () const |
|
std::size_t | number_of_points () const |
|
std::size_t | number_of_cells (unsigned int direction) const |
|
std::size_t | number_of_points (unsigned int direction) const |
|
const auto & | origin () const |
|
const auto & | spacing () const |
|
auto | extents () const |
| Return an array containing the number of cells in all directions.
|
|
auto | ordinates (int direction) const |
| Return the ordinates of the grid along the given direction.
|
|
auto | position (const Point &p) const |
| Return the physical position of the given grid point.
|
|
auto | center (const Cell &c) const |
| Return the physical center position of the given grid cell.
|
|
std::size_t | id (const Point &p) const |
| Return a unique id for the given point.
|
|
std::ranges::range auto | cells () const |
| Return a range over all cells of the grid.
|
|
std::ranges::range auto | points () const |
| Return a range over all points of the grid.
|
|
std::ranges::range auto | points (const Cell &cell) const |
| Return a range over all points in the given grid cell.
|
|