Alexandria
2.16
Please provide a description of the project.
|
Go to the documentation of this file.
25 #ifndef GRIDCONTAINER_GRIDINDEXHELPER_H
26 #define GRIDCONTAINER_GRIDINDEXHELPER_H
34 namespace GridContainer {
53 template<
typename... AxesTypes>
83 size_t axisIndex(
size_t axis,
size_t array_index)
const;
106 template <
typename Coord>
110 template <
typename Coord,
typename... RestCoords>
112 Coord coord, RestCoords... rest_coords)
const;
128 template<
typename... AxesTypes>
GridIndexHelper< AxesTypes... > makeGridIndexHelper(const std::tuple< GridAxis< AxesTypes >... > &axes_tuple)
Provides information related with an axis of a GridContainer.
GridIndexHelper & operator=(GridIndexHelper< AxesTypes... > &&)=default
Helper class for converting multi-dimensional grid coordinates to the index of a long data array and ...
size_t totalIndex(decltype(std::declval< GridAxis< AxesTypes >>().size())... coords) const
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< std::string > m_axes_names
std::vector< size_t > m_axes_sizes
size_t totalIndexChecked(decltype(std::declval< GridAxis< AxesTypes >>().size())... coords) const
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.
GridIndexHelper(const std::tuple< GridAxis< AxesTypes >... > &axes_tuple)
virtual ~GridIndexHelper()=default
Default destructor.
size_t axisIndex(size_t axis, size_t array_index) const
GridIndexHelper(GridIndexHelper< AxesTypes... > &&)=default
Default move constructor and assignment operator.
std::vector< size_t > m_axes_index_factors