Store the conforming indexes of each patch of a given interface. More...
Public Member Functions | |
MatchingIdxSlice (IdxRange1D_1 const &idx_range_1, IdxRange1D_2 const &idx_range_2) | |
Instantiate the class from 1D index ranges. | |
MatchingIdxSlice (IdxRange2D_1 const &idx_range_1, IdxRange2D_2 const &idx_range_2) | |
Instantiate the class from 2D index ranges. | |
template<class ParallelGrid , std::enable_if_t<(std::is_same_v< ParallelGrid, EdgeGrid1 >)||(std::is_same_v< ParallelGrid, EdgeGrid2 >), bool > = true> | |
IdxRangeSlice< ParallelGrid > | get () const |
Get the IdxRangeSlice containing the conforming indexes. | |
template<class PerpendicularGrid , std::enable_if_t<(std::is_same_v< PerpendicularGrid, PerpEdgeGrid1 >)||(std::is_same_v< PerpendicularGrid, PerpEdgeGrid2 >), bool > = true> | |
auto | get_from_perp () const |
Get the IdxRangeSlice containing the conforming indexes. | |
Store the conforming indexes of each patch of a given interface.
The conforming indexes are the indexes with an equivalent index on the parallel grid of the other edge of a given interface. The conforming indexes are stored in an IdxRangeSlice. The index step between two indexes in the IdxRangeSlice are supposed to be uniform. If they are not, the instantiation of the class fails.
If the grids are uniform, the index steps between the conforming indexes are uniform. The uniform index steps can be deduced from the greatest common divisor.
E.g. for a first grid of N cells and a second grid of M cells, gcd = gcd(M, N) idx_step on the first grid: N / gcd idx_step on the second grid: M / gcd
Interface | Interface type between two edges of patches (Interface with OutsideEdge not allowed). |
|
inline |
Instantiate the class from 1D index ranges.
To define the IdxRangeSlices containing the conforming indexes, we first check that the index steps between two conforming indexes are uniform, for the 1D grid of each edge of the interface.
If true, the index step of the patch is applied to instantiate the associated IdxRangeSlice.
If the grids are uniform, it is true and we can use the greatest common divisor between the two number of cells to compute the index steps of each IdxRangeSlice.
|
inline |
Instantiate the class from 2D index ranges.
To define the IdxRangeSlices containing the conforming indexes, we first check that the index steps between two conforming indexes are uniform, for the 1D grid of each edge of the interface.
If true, the index step of the patch is applied to instantiate the associated IdxRangeSlice.
If the grids are uniform, it is true and we can use the greatest common divisor between the two number of cells to compute the index steps of each IdxRangeSlice.
|
inline |
Get the IdxRangeSlice containing the conforming indexes.
ParallelGrid | The parallel grid to the edge. |
|
inline |
Get the IdxRangeSlice containing the conforming indexes.
PerpendicularGrid | The perpendicular grid to the edge. |