4#include "../kokkos/kokkos_wrapper.hpp"
12template <
typename ScalarType >
15template <
typename ScalarType >
18template <
typename ScalarType >
21template <
typename ScalarType >
24template <
typename ScalarType >
27template <
typename ScalarType >
30template <
typename ScalarType,
int VecDim >
33template <
typename ScalarType,
int VecDim >
36template <
typename ScalarType,
int VecDim >
39template <
typename ScalarType,
int VecDim >
42template <
typename ScalarType,
int VecDim >
45template <
typename ScalarType,
int Rows,
int Cols,
int NumMatrices >
48template <
typename Gr
idDataType >
52 std::is_same_v< GridDataType, Grid0DDataScalar< typename GridDataType::value_type > > ||
53 std::is_same_v< GridDataType, Grid1DDataScalar< typename GridDataType::value_type > > ||
54 std::is_same_v< GridDataType, Grid2DDataScalar< typename GridDataType::value_type > > ||
55 std::is_same_v< GridDataType, Grid3DDataScalar< typename GridDataType::value_type > > ||
56 std::is_same_v< GridDataType, Grid4DDataScalar< typename GridDataType::value_type > > )
62 std::is_same_v< GridDataType, Grid0DDataVec< typename GridDataType::value_type, 1 > > ||
63 std::is_same_v< GridDataType, Grid1DDataVec< typename GridDataType::value_type, 1 > > ||
64 std::is_same_v< GridDataType, Grid2DDataVec< typename GridDataType::value_type, 1 > > ||
65 std::is_same_v< GridDataType, Grid3DDataVec< typename GridDataType::value_type, 1 > > ||
66 std::is_same_v< GridDataType, Grid4DDataVec< typename GridDataType::value_type, 1 > > )
72 std::is_same_v< GridDataType, Grid0DDataVec< typename GridDataType::value_type, 2 > > ||
73 std::is_same_v< GridDataType, Grid1DDataVec< typename GridDataType::value_type, 2 > > ||
74 std::is_same_v< GridDataType, Grid2DDataVec< typename GridDataType::value_type, 2 > > ||
75 std::is_same_v< GridDataType, Grid3DDataVec< typename GridDataType::value_type, 2 > > ||
76 std::is_same_v< GridDataType, Grid4DDataVec< typename GridDataType::value_type, 2 > > )
82 std::is_same_v< GridDataType, Grid0DDataVec< typename GridDataType::value_type, 3 > > ||
83 std::is_same_v< GridDataType, Grid1DDataVec< typename GridDataType::value_type, 3 > > ||
84 std::is_same_v< GridDataType, Grid2DDataVec< typename GridDataType::value_type, 3 > > ||
85 std::is_same_v< GridDataType, Grid3DDataVec< typename GridDataType::value_type, 3 > > ||
86 std::is_same_v< GridDataType, Grid4DDataVec< typename GridDataType::value_type, 3 > > )
109 return (
static_cast< int >( x ) << 4 ) | (
static_cast< int >( y ) << 2 ) | (
static_cast< int >( r ) << 0 );
189template <
typename BoundaryType >
193 std::is_same_v< BoundaryType, BoundaryVertex > || std::is_same_v< BoundaryType, BoundaryEdge > ||
194 std::is_same_v< BoundaryType, BoundaryFace > );
196 return static_cast< BoundaryPosition >( (
static_cast< int >( boundary_type ) & 0b110000 ) >> 4 );
199template <
typename BoundaryType >
203 std::is_same_v< BoundaryType, BoundaryVertex > || std::is_same_v< BoundaryType, BoundaryEdge > ||
204 std::is_same_v< BoundaryType, BoundaryFace > );
206 return static_cast< BoundaryPosition >( (
static_cast< int >( boundary_type ) & 0b001100 ) >> 2 );
209template <
typename BoundaryType >
213 std::is_same_v< BoundaryType, BoundaryVertex > || std::is_same_v< BoundaryType, BoundaryEdge > ||
214 std::is_same_v< BoundaryType, BoundaryFace > );
216 return static_cast< BoundaryPosition >( (
static_cast< int >( boundary_type ) & 0b000011 ) >> 0 );
297 return "<unknown LocalBoundaryVertex>";
330 return "<unknown LocalBoundaryEdge>";
351 return "<unknown LocalBoundaryFace>";
Definition bit_masks.hpp:8
Kokkos::View< ScalarType, Layout > Grid0DDataScalar
Definition grid_types.hpp:13
Kokkos::View< ScalarType *****, Layout > Grid5DDataScalar
Definition grid_types.hpp:28
constexpr bool is_edge_boundary_radial(const BoundaryEdge id)
Definition grid_types.hpp:219
Kokkos::View< dense::Mat< ScalarType, Rows, Cols > ****[NumMatrices], Layout > Grid4DDataMatrices
Definition grid_types.hpp:46
Kokkos::View< ScalarType ***[VecDim], Layout > Grid3DDataVec
Definition grid_types.hpp:40
BoundaryPosition
Enum for encoding the boundary type tuples (in BoundaryVertex, BoundaryEdge, BoundaryFace).
Definition grid_types.hpp:96
Kokkos::View< ScalarType ***, Layout > Grid3DDataScalar
Definition grid_types.hpp:22
BoundaryVertex
Enum for identification of the 8 boundary vertices of a subdomain.
Definition grid_types.hpp:121
constexpr std::array all_boundary_faces
Definition grid_types.hpp:266
BoundaryDirection
Enum for the iteration direction at a boundary.
Definition grid_types.hpp:184
constexpr std::array all_boundary_vertices
Definition grid_types.hpp:239
std::ostream & operator<<(std::ostream &os, BoundaryVertex v)
Definition grid_types.hpp:355
constexpr std::array all_boundary_edges
Definition grid_types.hpp:249
Kokkos::LayoutRight Layout
Definition grid_types.hpp:10
Kokkos::View< ScalarType ****[VecDim], Layout > Grid4DDataVec
Definition grid_types.hpp:43
Kokkos::View< ScalarType **[VecDim], Layout > Grid2DDataVec
Definition grid_types.hpp:37
constexpr int grid_data_vec_dim()
Definition grid_types.hpp:49
Kokkos::View< ScalarType *[VecDim], Layout > Grid1DDataVec
Definition grid_types.hpp:34
constexpr int boundary_position_encoding(const BoundaryPosition x, const BoundaryPosition y, const BoundaryPosition r)
Definition grid_types.hpp:107
constexpr BoundaryPosition boundary_position_from_boundary_type_y(const BoundaryType &boundary_type)
Definition grid_types.hpp:200
constexpr bool is_face_boundary_normal_to_radial_direction(const BoundaryFace id)
Definition grid_types.hpp:225
std::string to_string(BoundaryVertex v)
Definition grid_types.hpp:276
constexpr BoundaryPosition boundary_position_from_boundary_type_r(const BoundaryType &boundary_type)
Definition grid_types.hpp:210
Kokkos::View< ScalarType[VecDim], Layout > Grid0DDataVec
Definition grid_types.hpp:31
constexpr BoundaryVertex other_side_r(BoundaryVertex boundary_vertex)
Definition grid_types.hpp:230
BoundaryFace
Enum for identification of the 6 boundary faces of a subdomain.
Definition grid_types.hpp:170
Kokkos::View< ScalarType ****, Layout > Grid4DDataScalar
Definition grid_types.hpp:25
constexpr BoundaryPosition boundary_position_from_boundary_type_x(const BoundaryType &boundary_type)
Definition grid_types.hpp:190
Kokkos::View< ScalarType *, Layout > Grid1DDataScalar
Definition grid_types.hpp:16
Kokkos::View< ScalarType **, Layout > Grid2DDataScalar
Definition grid_types.hpp:19
BoundaryEdge
Enum for identification of the 12 boundary edges of a subdomain.
Definition grid_types.hpp:142