25#ifndef GRIDCONTAINER_GRIDINDEXHELPER_H
26#define GRIDCONTAINER_GRIDINDEXHELPER_H
34namespace GridContainer {
53template <
typename... AxesTypes>
82 size_t axisIndex(
size_t axis,
size_t array_index)
const;
105 template <
typename Coord>
109 template <
typename Coord,
typename... RestCoords>
111 RestCoords... rest_coords)
const;
127template <
typename... AxesTypes>
Provides information related with an axis of a GridContainer.
Helper class for converting multi-dimensional grid coordinates to the index of a long data array and ...
GridIndexHelper & operator=(GridIndexHelper< AxesTypes... > &&)=default
GridIndexHelper(GridIndexHelper< AxesTypes... > &&)=default
Default move constructor and assignment operator.
size_t axisIndex(size_t axis, size_t array_index) const
GridIndexHelper(const std::tuple< GridAxis< AxesTypes >... > &axes_tuple)
std::vector< std::string > m_axes_names
size_t totalIndex(decltype(std::declval< GridAxis< AxesTypes > >().size())... coords) const
std::vector< size_t > m_axes_sizes
void checkAllFixedAreZero(const std::map< size_t, size_t > &fixed_indices, Coord coord) const
Checks if any of the given coordinates is fixed and not zero.
void checkAllFixedAreZero(const std::map< size_t, size_t > &fixed_indices, Coord coord, RestCoords... rest_coords) const
Checks if any of the given coordinates is fixed and not zero.
std::vector< size_t > m_axes_index_factors
virtual ~GridIndexHelper()=default
Default destructor.
size_t totalIndexChecked(decltype(std::declval< GridAxis< AxesTypes > >().size())... coords) const
GridIndexHelper< AxesTypes... > makeGridIndexHelper(const std::tuple< GridAxis< AxesTypes >... > &axes_tuple)