Gyselalib++
patch.hpp
1 // SPDX-License-Identifier: MIT
2 
3 #pragma once
4 #include <ddc/ddc.hpp>
5 
6 #include "ddc_aliases.hpp"
7 
13 template <class... T>
14 struct Patch;
15 
24 template <class grid1, class grid2, class bsplines_dim1, class bsplines_dim2>
25 struct Patch<grid1, grid2, bsplines_dim1, bsplines_dim2>
26 {
28  static int constexpr n_dims = 2;
29 
31  using Grid1 = grid1;
33  using Grid2 = grid2;
34 
36  using Dim1 = typename grid1::continuous_dimension_type;
38  using Dim2 = typename grid2::continuous_dimension_type;
39 
41  using BSplines1 = bsplines_dim1;
43  using BSplines2 = bsplines_dim2;
44 
46  using Coord1 = Coord<Dim1>;
48  using Coord2 = Coord<Dim2>;
50  using Coord12 = Coord<Dim1, Dim2>;
51 
53  using Idx1 = Idx<Grid1>;
55  using Idx2 = Idx<Grid2>;
57  using Idx12 = Idx<Grid1, Grid2>;
58 
60  using IdxStep1 = IdxStep<Grid1>;
62  using IdxStep2 = IdxStep<Grid2>;
64  using IdxStep12 = IdxStep<Grid1, Grid2>;
65 
67  using IdxRange1 = IdxRange<Grid1>;
69  using IdxRange2 = IdxRange<Grid2>;
71  using IdxRange12 = IdxRange<Grid1, Grid2>;
72 
74  using IdxRangeBS1 = IdxRange<BSplines1>;
76  using IdxRangeBS2 = IdxRange<BSplines2>;
78  using IdxRangeBS12 = IdxRange<BSplines1, BSplines2>;
79 };
grid2 Grid2
Grid on the second logical dimension.
Definition: patch.hpp:33
IdxRange< BSplines2 > IdxRangeBS2
Index range of a grids over the second spline dimension.
Definition: patch.hpp:76
IdxRange< BSplines1, BSplines2 > IdxRangeBS12
Index range of a grids over the first and second spline dimension.
Definition: patch.hpp:78
Idx< Grid1 > Idx1
1D index of a grid point along the first dimension.
Definition: patch.hpp:53
Idx< Grid2 > Idx2
1D index of a grid point along the second dimension.
Definition: patch.hpp:55
bsplines_dim2 BSplines2
B-splines defined along the second dimension.
Definition: patch.hpp:43
IdxStep< Grid1, Grid2 > IdxStep12
2D index step between grid points along the first and second dimensions.
Definition: patch.hpp:64
Coord< Dim1, Dim2 > Coord12
Coordinate type on the 2D continuous index range.
Definition: patch.hpp:50
typename grid2::continuous_dimension_type Dim2
Second continuous dimension.
Definition: patch.hpp:38
typename grid1::continuous_dimension_type Dim1
First continuous dimension.
Definition: patch.hpp:36
grid1 Grid1
Grid on the first logical dimension.
Definition: patch.hpp:31
IdxRange< Grid1, Grid2 > IdxRange12
Index range of a grids over the first and second dimension.
Definition: patch.hpp:71
bsplines_dim1 BSplines1
B-splines defined along the first dimension.
Definition: patch.hpp:41
IdxRange< BSplines1 > IdxRangeBS1
Index range of a grids over the first spline dimension.
Definition: patch.hpp:74
IdxRange< Grid1 > IdxRange1
Index range of a grids over the first dimension.
Definition: patch.hpp:67
IdxRange< Grid2 > IdxRange2
Index range of a grids over the second dimension.
Definition: patch.hpp:69
Coord< Dim2 > Coord2
Coordinate type on the second continuous dimension.
Definition: patch.hpp:48
Coord< Dim1 > Coord1
Coordinate type on the first continuous dimension.
Definition: patch.hpp:46
Idx< Grid1, Grid2 > Idx12
2D index of a grid point along the first and second dimensions.
Definition: patch.hpp:57
IdxStep< Grid2 > IdxStep2
1D index step between grid points along the second dimension.
Definition: patch.hpp:62
IdxStep< Grid1 > IdxStep1
1D index step between grid points along the first dimension.
Definition: patch.hpp:60
Base tag for a patch.
Definition: patch.hpp:14
A class which describes the real space in the temporal direction.
Definition: geometry.hpp:45