num::cartesian_index_space_2d¶
Defined in header <core/index_space.hpp>
template <class G>
concept cartesian_index_space_2d =
square_extent_2d<G> && requires(const G &g, int i, int j) {
{ g.flat(i, j) } -> std::convertible_to<int>;
};
A square extent carrying a flattening \(\mathbb{Z}^2 \to \mathbb{Z}\).
flat(i, j) puts a site at a linear position, which is what lets a field over the grid be stored as one contiguous vector and handed to num::kernel unchanged.