Loading...
Searching...
No Matches
buffer_copy_kernels.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "grid/grid_types.hpp"
4
6
7/// @brief Communication reduction modes.
9{
10 /// Sums up the node values during receive.
11 SUM,
12
13 /// Stores the min of all received values during receive.
14 MIN,
15
16 /// Stores the max of all received values during receive.
17 MAX,
18};
19
20namespace detail {
21
22/// @brief Helper function to defer to the respective Kokkos::atomic_xxx() reduction function.
23template < typename T >
24KOKKOS_INLINE_FUNCTION void reduction_function( T* ptr, const T& val, const CommunicationReduction reduction_type )
25{
26 if ( reduction_type == CommunicationReduction::SUM )
27 {
28 Kokkos::atomic_add( ptr, val );
29 }
30 else if ( reduction_type == CommunicationReduction::MIN )
31 {
32 Kokkos::atomic_min( ptr, val );
33 }
34 else if ( reduction_type == CommunicationReduction::MAX )
35 {
36 Kokkos::atomic_max( ptr, val );
37 }
38}
39
40} // namespace detail
41
42namespace detail {
43template < typename DataView, bool is_scalar >
44KOKKOS_INLINE_FUNCTION DataView::value_type
45 value( const DataView& data, int local_subdomain_id, int x, int y, int r, int d )
46{
47 if constexpr ( is_scalar )
48 {
49 return data( local_subdomain_id, x, y, r );
50 }
51 else
52 {
53 return data( local_subdomain_id, x, y, r, d );
54 }
55}
56
57template < typename DataView, bool is_scalar >
58KOKKOS_INLINE_FUNCTION DataView::value_type&
59 value_ref( const DataView& data, int local_subdomain_id, int x, int y, int r, int d )
60{
61 if constexpr ( is_scalar )
62 {
63 return data( local_subdomain_id, x, y, r );
64 }
65 else
66 {
67 return data( local_subdomain_id, x, y, r, d );
68 }
69}
70
71KOKKOS_INLINE_FUNCTION
72constexpr int
73 idx( const int loop_idx,
74 const int size,
75 const grid::BoundaryPosition position,
76 const grid::BoundaryDirection direction )
77{
78 if ( position == grid::BoundaryPosition::P0 )
79 {
80 return 0;
81 }
82 else if ( position == grid::BoundaryPosition::P1 )
83 {
84 return size - 1;
85 }
86 else
87 {
88 if ( direction == grid::BoundaryDirection::FORWARD )
89 {
90 return loop_idx;
91 }
92 else
93 {
94 return size - 1 - loop_idx;
95 }
96 }
97}
98
99} // namespace detail
100
101namespace detail_view_constraints {
102
103template < class T >
104struct is_kokkos_view : std::false_type
105{};
106
107template < class... Args >
108struct is_kokkos_view< Kokkos::View< Args... > > : std::true_type
109{};
110
111template < class V >
113
114} // namespace detail_view_constraints
115
116// ---------------------------
117// Generic 0D copy_to_buffer
118// buffer: rank-1 view of length VecDim
119// ---------------------------
120template < int VecDim, typename BufferView, typename ViewType >
121std::enable_if_t< detail_view_constraints::is_kokkos_view_v< BufferView > && ( std::decay_t< BufferView >::rank == 1 ) >
123 const BufferView& buffer,
124 const ViewType& data,
125 const int local_subdomain_id,
126 const grid::BoundaryVertex boundary_vertex )
127{
128 // Heuristic: scalar grid data is rank-4 (sd,x,y,r), vector-valued is rank-5 (sd,x,y,r,d)
129 static_assert(
130 std::decay_t< ViewType >::rank == 4 || std::decay_t< ViewType >::rank == 5,
131 "copy_to_buffer expects ViewType rank 4 (scalar) or 5 (vector-valued)." );
132
133 constexpr bool is_scalar = ( std::decay_t< ViewType >::rank == 4 );
134
135 if ( buffer.extent( 0 ) != VecDim )
136 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
137
138 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_vertex );
139 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_vertex );
140 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_vertex );
141
142 const auto size_x = data.extent( 1 );
143 const auto size_y = data.extent( 2 );
144 const auto size_r = data.extent( 3 );
145
146 Kokkos::parallel_for(
147 "copy_to_buffer_0D", Kokkos::RangePolicy( 0, buffer.extent( 0 ) ), KOKKOS_LAMBDA( const int d ) {
148 auto x = detail::idx( 0, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
149 auto y = detail::idx( 0, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
150 auto r = detail::idx( 0, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
151 buffer( d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
152 } );
153}
154
155// ---------------------------
156// Generic 1D copy_to_buffer
157// buffer: rank-2 view of shape (N, VecDim)
158// ---------------------------
159template < int VecDim, typename BufferView, typename ViewType >
160std::enable_if_t< detail_view_constraints::is_kokkos_view_v< BufferView > && ( std::decay_t< BufferView >::rank == 2 ) >
162 const BufferView& buffer,
163 const ViewType& data,
164 const int local_subdomain_id,
165 const grid::BoundaryEdge boundary_edge )
166{
167 static_assert(
168 std::decay_t< ViewType >::rank == 4 || std::decay_t< ViewType >::rank == 5,
169 "copy_to_buffer expects ViewType rank 4 (scalar) or 5 (vector-valued)." );
170
171 constexpr bool is_scalar = ( std::decay_t< ViewType >::rank == 4 );
172
173 if ( buffer.extent( 1 ) != VecDim )
174 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
175
176 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_edge );
177 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_edge );
178 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_edge );
179
180 const auto size_x = data.extent( 1 );
181 const auto size_y = data.extent( 2 );
182 const auto size_r = data.extent( 3 );
183
184 Kokkos::parallel_for(
185 "copy_to_buffer_1D",
186 Kokkos::MDRangePolicy( { 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ) } ),
187 KOKKOS_LAMBDA( const int idx, const int d ) {
188 auto x = detail::idx( idx, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
189 auto y = detail::idx( idx, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
190 auto r = detail::idx( idx, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
191 buffer( idx, d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
192 } );
193}
194
195// ---------------------------
196// Generic 2D copy_to_buffer
197// buffer: rank-3 view of shape (Ni, Nj, VecDim)
198// ---------------------------
199template < int VecDim, typename BufferView, typename ViewType >
200std::enable_if_t< detail_view_constraints::is_kokkos_view_v< BufferView > && ( std::decay_t< BufferView >::rank == 3 ) >
202 const BufferView& buffer,
203 const ViewType& data,
204 const int local_subdomain_id,
205 const grid::BoundaryFace boundary_face )
206{
207 static_assert(
208 std::decay_t< ViewType >::rank == 4 || std::decay_t< ViewType >::rank == 5,
209 "copy_to_buffer expects ViewType rank 4 (scalar) or 5 (vector-valued)." );
210
211 constexpr bool is_scalar = ( std::decay_t< ViewType >::rank == 4 );
212
213 if ( buffer.extent( 2 ) != VecDim )
214 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
215
216 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_face );
217 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_face );
218 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_face );
219
220 const auto size_x = data.extent( 1 );
221 const auto size_y = data.extent( 2 );
222 const auto size_r = data.extent( 3 );
223
224 Kokkos::parallel_for(
225 "copy_to_buffer_2D",
226 Kokkos::MDRangePolicy( { 0, 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ), buffer.extent( 2 ) } ),
227 KOKKOS_LAMBDA( const int i, const int j, const int d ) {
228 int x = 0, y = 0, r = 0;
229
230 if ( boundary_position_x != grid::BoundaryPosition::PV )
231 {
232 x = detail::idx( 0, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
233 y = detail::idx( i, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
234 r = detail::idx( j, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
235 }
236 else if ( boundary_position_y != grid::BoundaryPosition::PV )
237 {
238 x = detail::idx( i, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
239 y = detail::idx( 0, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
240 r = detail::idx( j, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
241 }
242 else
243 {
244 x = detail::idx( i, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
245 y = detail::idx( j, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
246 r = detail::idx( 0, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
247 }
248
249 buffer( i, j, d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
250 } );
251}
252
253template < typename ScalarType, int VecDim, typename ViewType >
256 const ViewType& data,
257 const int local_subdomain_id,
258 const grid::BoundaryVertex boundary_vertex )
259{
260 static_assert(
261 std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > > ||
262 std::is_same_v< ViewType, grid::Grid4DDataVec< ScalarType, VecDim > > );
263
264 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
265
266 if ( buffer.extent( 0 ) != VecDim )
267 {
268 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
269 }
270
271 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_vertex );
272 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_vertex );
273 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_vertex );
274
275 const auto size_x = data.extent( 1 );
276 const auto size_y = data.extent( 2 );
277 const auto size_r = data.extent( 3 );
278
279 Kokkos::parallel_for(
280 "copy_to_buffer_0D", Kokkos::RangePolicy( 0, buffer.extent( 0 ) ), KOKKOS_LAMBDA( const int d ) {
281 auto x = detail::idx( 0, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
282 auto y = detail::idx( 0, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
283 auto r = detail::idx( 0, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
284 buffer( d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
285 } );
286}
287
288template < typename ScalarType, int VecDim, typename ViewType >
291 const ViewType& data,
292 const int local_subdomain_id,
293 const grid::BoundaryEdge boundary_edge )
294{
295 static_assert(
296 std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > > ||
297 std::is_same_v< ViewType, grid::Grid4DDataVec< ScalarType, VecDim > > );
298
299 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
300
301 if ( buffer.extent( 1 ) != VecDim )
302 {
303 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
304 }
305
306 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_edge );
307 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_edge );
308 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_edge );
309
310 const auto size_x = data.extent( 1 );
311 const auto size_y = data.extent( 2 );
312 const auto size_r = data.extent( 3 );
313
314 Kokkos::parallel_for(
315 "copy_to_buffer_1D",
316 Kokkos::MDRangePolicy( { 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ) } ),
317 KOKKOS_LAMBDA( const int idx, const int d ) {
318 auto x = detail::idx( idx, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
319 auto y = detail::idx( idx, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
320 auto r = detail::idx( idx, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
321 buffer( idx, d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
322 } );
323}
324
325template < typename ScalarType, int VecDim, typename ViewType >
328 const ViewType& data,
329 const int local_subdomain_id,
330 const grid::BoundaryFace boundary_face )
331{
332 static_assert(
333 std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > > ||
334 std::is_same_v< ViewType, grid::Grid4DDataVec< ScalarType, VecDim > > );
335
336 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
337
338 if ( buffer.extent( 2 ) != VecDim )
339 {
340 Kokkos::abort( "The buffer VecDim should match its respective extent. This abort should not happen." );
341 }
342
343 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_face );
344 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_face );
345 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_face );
346
347 const auto size_x = data.extent( 1 );
348 const auto size_y = data.extent( 2 );
349 const auto size_r = data.extent( 3 );
350
351 Kokkos::parallel_for(
352 "copy_to_buffer_2D",
353 Kokkos::MDRangePolicy( { 0, 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ), buffer.extent( 2 ) } ),
354 KOKKOS_LAMBDA( const int i, const int j, const int d ) {
355 int x = 0;
356 int y = 0;
357 int r = 0;
358
359 if ( boundary_position_x != grid::BoundaryPosition::PV )
360 {
361 x = detail::idx(
362 0 /* can be set to anything */, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
363 y = detail::idx( i, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
364 r = detail::idx( j, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
365 }
366 else if ( boundary_position_y != grid::BoundaryPosition::PV )
367 {
368 x = detail::idx( i, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
369 y = detail::idx(
370 0 /* can be set to anything */, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
371 r = detail::idx( j, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
372 }
373 else
374 {
375 x = detail::idx( i, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
376 y = detail::idx( j, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
377 r = detail::idx(
378 0 /* can be set to anything */, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
379 }
380
381 buffer( i, j, d ) = detail::value< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d );
382 } );
383}
384
385template < typename BufferView, typename ViewType >
387 const BufferView& buffer,
388 const ViewType& data,
389 const int local_subdomain_id,
390 const grid::BoundaryVertex boundary_vertex,
391 const CommunicationReduction reduction )
392{
393 using ScalarType = typename BufferView::value_type;
394 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
395
396 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_vertex );
397 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_vertex );
398 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_vertex );
399
400 const auto size_x = data.extent( 1 );
401 const auto size_y = data.extent( 2 );
402 const auto size_r = data.extent( 3 );
403
404 Kokkos::parallel_for(
405 "copy_from_buffer_0D", Kokkos::RangePolicy( 0, buffer.extent( 0 ) ), KOKKOS_LAMBDA( const int d ) {
406 auto x = detail::idx( 0, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
407 auto y = detail::idx( 0, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
408 auto r = detail::idx( 0, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
410 &detail::value_ref< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d ),
411 buffer( d ),
412 reduction );
413 } );
414}
415
416template < typename BufferView, typename ViewType >
418 const BufferView& buffer,
419 const ViewType& data,
420 const int local_subdomain_id,
421 const grid::BoundaryEdge boundary_edge,
422 const grid::BoundaryDirection boundary_direction,
423 const CommunicationReduction reduction )
424{
425 using ScalarType = typename BufferView::value_type;
426 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
427
428 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_edge );
429 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_edge );
430 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_edge );
431
432 const auto size_x = data.extent( 1 );
433 const auto size_y = data.extent( 2 );
434 const auto size_r = data.extent( 3 );
435
436 Kokkos::parallel_for(
437 "copy_from_buffer_1D",
438 Kokkos::MDRangePolicy( { 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ) } ),
439 KOKKOS_LAMBDA( const int idx, const int d ) {
440 auto x = detail::idx( idx, size_x, boundary_position_x, boundary_direction );
441 auto y = detail::idx( idx, size_y, boundary_position_y, boundary_direction );
442 auto r = detail::idx( idx, size_r, boundary_position_r, boundary_direction );
444 &detail::value_ref< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d ),
445 buffer( idx, d ),
446 reduction );
447 } );
448}
449
450template < typename BufferView, typename ViewType >
452 const BufferView& buffer,
453 const ViewType& data,
454 const int local_subdomain_id,
455 const grid::BoundaryFace boundary_face,
456 const std::tuple< grid::BoundaryDirection, grid::BoundaryDirection > boundary_directions,
457 const CommunicationReduction reduction )
458{
459 using ScalarType = typename BufferView::value_type;
460 constexpr bool is_scalar = std::is_same_v< ViewType, grid::Grid4DDataScalar< ScalarType > >;
461
462 const auto boundary_position_x = grid::boundary_position_from_boundary_type_x( boundary_face );
463 const auto boundary_position_y = grid::boundary_position_from_boundary_type_y( boundary_face );
464 const auto boundary_position_r = grid::boundary_position_from_boundary_type_r( boundary_face );
465
466 const auto size_x = data.extent( 1 );
467 const auto size_y = data.extent( 2 );
468 const auto size_r = data.extent( 3 );
469
470 const auto boundary_direction_0 = std::get< 0 >( boundary_directions );
471 const auto boundary_direction_1 = std::get< 1 >( boundary_directions );
472
473 Kokkos::parallel_for(
474 "copy_from_buffer_2D",
475 Kokkos::MDRangePolicy( { 0, 0, 0 }, { buffer.extent( 0 ), buffer.extent( 1 ), buffer.extent( 2 ) } ),
476 KOKKOS_LAMBDA( const int i, const int j, const int d ) {
477 int x = 0;
478 int y = 0;
479 int r = 0;
480
481 if ( boundary_position_x != grid::BoundaryPosition::PV )
482 {
483 x = detail::idx( 0, size_x, boundary_position_x, grid::BoundaryDirection::FORWARD );
484 y = detail::idx( i, size_y, boundary_position_y, boundary_direction_0 );
485 r = detail::idx( j, size_r, boundary_position_r, boundary_direction_1 );
486 }
487 else if ( boundary_position_y != grid::BoundaryPosition::PV )
488 {
489 x = detail::idx( i, size_x, boundary_position_x, boundary_direction_0 );
490 y = detail::idx( 0, size_y, boundary_position_y, grid::BoundaryDirection::FORWARD );
491 r = detail::idx( j, size_r, boundary_position_r, boundary_direction_1 );
492 }
493 else
494 {
495 x = detail::idx( i, size_x, boundary_position_x, boundary_direction_0 );
496 y = detail::idx( j, size_y, boundary_position_y, boundary_direction_1 );
497 r = detail::idx( 0, size_r, boundary_position_r, grid::BoundaryDirection::FORWARD );
498 }
499
501 &detail::value_ref< ViewType, is_scalar >( data, local_subdomain_id, x, y, r, d ),
502 buffer( i, j, d ),
503 reduction );
504 } );
505}
506
507} // namespace terra::communication
constexpr bool is_kokkos_view_v
Definition buffer_copy_kernels.hpp:112
constexpr int idx(const int loop_idx, const int size, const grid::BoundaryPosition position, const grid::BoundaryDirection direction)
Definition buffer_copy_kernels.hpp:73
DataView::value_type value(const DataView &data, int local_subdomain_id, int x, int y, int r, int d)
Definition buffer_copy_kernels.hpp:45
void reduction_function(T *ptr, const T &val, const CommunicationReduction reduction_type)
Helper function to defer to the respective Kokkos::atomic_xxx() reduction function.
Definition buffer_copy_kernels.hpp:24
DataView::value_type & value_ref(const DataView &data, int local_subdomain_id, int x, int y, int r, int d)
Definition buffer_copy_kernels.hpp:59
Definition buffer_copy_kernels.hpp:5
std::enable_if_t< detail_view_constraints::is_kokkos_view_v< BufferView > &&(std::decay_t< BufferView >::rank==1) > copy_to_buffer(const BufferView &buffer, const ViewType &data, const int local_subdomain_id, const grid::BoundaryVertex boundary_vertex)
Definition buffer_copy_kernels.hpp:122
void copy_from_buffer_rotate_and_reduce(const BufferView &buffer, const ViewType &data, const int local_subdomain_id, const grid::BoundaryVertex boundary_vertex, const CommunicationReduction reduction)
Definition buffer_copy_kernels.hpp:386
CommunicationReduction
Communication reduction modes.
Definition buffer_copy_kernels.hpp:9
@ MAX
Stores the max of all received values during receive.
@ SUM
Sums up the node values during receive.
@ MIN
Stores the min of all received values during receive.
BoundaryPosition
Enum for encoding the boundary type tuples (in BoundaryVertex, BoundaryEdge, BoundaryFace).
Definition grid_types.hpp:223
BoundaryVertex
Enum for identification of the 8 boundary vertices of a subdomain.
Definition grid_types.hpp:248
BoundaryDirection
Enum for the iteration direction at a boundary.
Definition grid_types.hpp:311
Kokkos::View< ScalarType **[VecDim], Layout > Grid2DDataVec
Definition grid_types.hpp:39
Kokkos::View< ScalarType *[VecDim], Layout > Grid1DDataVec
Definition grid_types.hpp:36
constexpr BoundaryPosition boundary_position_from_boundary_type_y(const BoundaryType &boundary_type)
Definition grid_types.hpp:327
constexpr BoundaryPosition boundary_position_from_boundary_type_r(const BoundaryType &boundary_type)
Definition grid_types.hpp:337
Kokkos::View< ScalarType[VecDim], Layout > Grid0DDataVec
Definition grid_types.hpp:33
BoundaryFace
Enum for identification of the 6 boundary faces of a subdomain.
Definition grid_types.hpp:297
constexpr BoundaryPosition boundary_position_from_boundary_type_x(const BoundaryType &boundary_type)
Definition grid_types.hpp:317
BoundaryEdge
Enum for identification of the 12 boundary edges of a subdomain.
Definition grid_types.hpp:269