Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Grid_SparseLocalGrid_impl.hpp
1/****************************************************************************
2 * Copyright (c) 2018-2023 by the Cabana authors *
3 * All rights reserved. *
4 * *
5 * This file is part of the Cabana library. Cabana is distributed under a *
6 * BSD 3-clause license. For the licensing terms see the LICENSE file in *
7 * the top-level directory. *
8 * *
9 * SPDX-License-Identifier: BSD-3-Clause *
10 ****************************************************************************/
11
12#ifndef CABANA_GRID_LOCALGRID_SPARSE_IMPL_HPP
13#define CABANA_GRID_LOCALGRID_SPARSE_IMPL_HPP
14
15#include <type_traits>
16namespace Cabana
17{
18namespace Grid
19{
20namespace Experimental
21{
22//---------------------------------------------------------------------------//
23// Constructor
24template <class Scalar, std::size_t NumSpaceDim>
26 const std::shared_ptr<GlobalGrid<mesh_type>>& global_grid,
27 const int halo_cell_width, const long cell_num_per_tile_dim )
28 : _global_grid( global_grid )
29 , _cell_num_per_tile_dim( cell_num_per_tile_dim )
30{
31 static_assert( 3 == num_space_dim, "SparseMesh supports only 3D" );
32 // ensure integer number of halo tiles
33 _halo_cell_width =
34 static_cast<int>( ( halo_cell_width + cell_num_per_tile_dim - 1 ) /
35 cell_num_per_tile_dim ) *
36 cell_num_per_tile_dim;
37}
38
39//---------------------------------------------------------------------------//
40// Get the global grid that owns the local grid.
41template <class Scalar, std::size_t NumSpaceDim>
44{
45 return *_global_grid;
46}
47
48//---------------------------------------------------------------------------//
49// Get a mutable version of the global grid that own the local grid.
50template <class Scalar, std::size_t NumSpaceDim>
56
57//---------------------------------------------------------------------------//
58// Get the halo size. (unit in cell)
59template <class Scalar, std::size_t NumSpaceDim>
61{
62 return _halo_cell_width;
63}
64
65//---------------------------------------------------------------------------//
66// Get the halo size. (unit in tile)
67template <class Scalar, std::size_t NumSpaceDim>
69{
70 return _halo_cell_width / _cell_num_per_tile_dim;
71}
72
73//---------------------------------------------------------------------------//
74// Get the total number of local cells in a given dimension (owned + halo).
75template <class Scalar, std::size_t NumSpaceDim>
77 const int d ) const
78{
79 return _global_grid->ownedNumCell( d ) + 2 * _halo_cell_width;
80}
81
82//---------------------------------------------------------------------------//
83// Get the total number of local cells in current rank (owned + halo).
84template <class Scalar, std::size_t NumSpaceDim>
86{
87 int total_num_cell = 1;
88 for ( std::size_t d = 0; d < num_space_dim; ++d )
89 total_num_cell *= totalNumCell( static_cast<int>( d ) );
90
91 return total_num_cell;
92}
93
94//---------------------------------------------------------------------------//
95// Given the relative offsets of a neighbor rank relative to this local grid's
96// indices get the of the neighbor.
97template <class Scalar, std::size_t NumSpaceDim>
99 const std::array<int, num_space_dim>& off_ijk ) const
100{
101 std::array<int, num_space_dim> nijk;
102 for ( std::size_t d = 0; d < num_space_dim; ++d )
103 nijk[d] = _global_grid->dimBlockId( d ) + off_ijk[d];
104 return _global_grid->blockRank( nijk );
105}
106
107template <class Scalar, std::size_t NumSpaceDim>
109 const int off_i, const int off_j, const int off_k ) const
110{
111 std::array<int, num_space_dim> off_ijk = { off_i, off_j, off_k };
112 return neighborRank( off_ijk );
113}
114
116//---------------------------------------------------------------------------//
117// Get the index space for a given combination of decomposition, entity, and
118// index types.
119template <class Scalar, std::size_t NumSpaceDim>
120template <class DecompositionTag, class EntityType, class IndexType>
122 DecompositionTag t1, EntityType t2, IndexType t3 ) const
124{
125 return indexSpaceImpl( t1, t2, t3 );
126}
127
128//---------------------------------------------------------------------------//
129// Given the relative offsets of a neighbor rank relative to this local
130// grid's indices get the set of local entity indices shared with that
131// neighbor in the given decomposition. Optionally provide a halo width
132// for the shared space. This halo width must be less than or equal to the
133// halo width of the local grid. The default behavior is to use the halo
134// width of the local grid.
135template <class Scalar, std::size_t NumSpaceDim>
136template <unsigned long long cellBitsPerTileDim, class DecompositionTag,
137 class EntityType>
138auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpace(
139 DecompositionTag t1, EntityType t2,
140 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
142{
143 static constexpr unsigned long long cell_num_per_tile_dim =
144 1 << cellBitsPerTileDim;
145
146 int hw = ( -1 == halo_width ) ? _halo_cell_width : halo_width;
147 hw = static_cast<int>( ( hw + cell_num_per_tile_dim - 1 ) /
148 cell_num_per_tile_dim ) *
149 cell_num_per_tile_dim;
150
151 // Check that the offsets are valid.
152 for ( std::size_t d = 0; d < num_space_dim; ++d )
153 if ( off_ijk[d] < -1 || 1 < off_ijk[d] )
154 throw std::logic_error( "Neighbor indices out of bounds" );
155
156 // Check that the requested halo width is valid.
157 if ( hw > _halo_cell_width )
158 throw std::logic_error(
159 "Requested halo width larger than local grid halo" );
160
161 // Check to see if this is a valid neighbor. If not, return a shared space
162 // of size 0.
163 if ( neighborRank( off_ijk ) < 0 )
164 {
165 std::array<long, num_space_dim> zero_size;
166 for ( std::size_t d = 0; d < num_space_dim; ++d )
167 zero_size[d] = 0;
169 zero_size );
170 }
171
172 // Call the underlying implementation.
173 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, t2, off_ijk, hw );
174}
175
176//---------------------------------------------------------------------------//
177// Get the global shared tile index space according to input tags
178template <class Scalar, std::size_t NumSpaceDim>
179template <unsigned long long cellBitsPerTileDim, class DecompositionTag,
180 class EntityType, std::size_t NSD>
181std::enable_if_t<3 == NSD, TileIndexSpace<3, cellBitsPerTileDim>>
182LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpace(
183 DecompositionTag t1, EntityType t2, const int off_i, const int off_j,
184 const int off_k, const int halo_width ) const
185{
186 std::array<int, 3> off_ijk = { off_i, off_j, off_k };
187 return sharedTileIndexSpace<cellBitsPerTileDim>( t1, t2, off_ijk,
188 halo_width );
189}
190
191//---------------------------------------------------------------------------//
192//----------------------------- Node/Cell -----------------------------------//
193//---------------------------------------------------------------------------//
194// Get the local index space of the owned nodes or cell centers (unit in cell)
195template <class Scalar, std::size_t NumSpaceDim>
196auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::indexSpaceImpl( Own,
197 Local ) const
198 -> IndexSpace<num_space_dim>
199{
200 // Compute the lower bound.
201 std::array<long, num_space_dim> min;
202 for ( std::size_t d = 0; d < num_space_dim; ++d )
203 min[d] = _halo_cell_width;
204
205 // Compute the upper bound.
206 std::array<long, num_space_dim> max;
207 for ( std::size_t d = 0; d < num_space_dim; ++d )
208 max[d] = min[d] + _global_grid->ownedNumCell( d );
209
210 return IndexSpace<num_space_dim>( min, max );
211}
212
213//---------------------------------------------------------------------------//
214// Get the local index space of the owned and ghosted nodes or cell centers
215// (unit in cell)
216template <class Scalar, std::size_t NumSpaceDim>
217auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::indexSpaceImpl( Ghost,
218 Local ) const
219 -> IndexSpace<num_space_dim>
220{
221 // Compute the size.
222 std::array<long, num_space_dim> size;
223 for ( std::size_t d = 0; d < num_space_dim; ++d )
224 {
225 size[d] = totalNumCell( d );
226 }
227
228 return IndexSpace<num_space_dim>( size );
229}
230
231//---------------------------------------------------------------------------//
232// Get the local index space of the owned nodes or cell centers (unit in cell)
233template <class Scalar, std::size_t NumSpaceDim>
234auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::indexSpaceImpl( Own,
235 Global ) const
236 -> IndexSpace<num_space_dim>
237{
238 // Compute the lower bound.
239 std::array<long, num_space_dim> min;
240 for ( std::size_t d = 0; d < num_space_dim; ++d )
241 min[d] = _global_grid->globalOffset( d );
242
243 // Compute the upper bound.
244 std::array<long, num_space_dim> max;
245 for ( std::size_t d = 0; d < num_space_dim; ++d )
246 max[d] = min[d] + _global_grid->ownedNumCell( d );
247
248 return IndexSpace<num_space_dim>( min, max );
249}
250
251//---------------------------------------------------------------------------//
252// Given a relative set of indices of a neighbor, get the set of global
253// tile indices we own that we share with that neighbor to use as ghosts.
254template <class Scalar, std::size_t NumSpaceDim>
255template <unsigned long long cellBitsPerTileDim>
256auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
257 Own, const std::array<int, num_space_dim>& off_ijk,
258 const int halo_width ) const
259 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
260{
261 auto owned_cell_space = indexSpaceImpl( Own(), Node(), Global() );
262 // Compute the lower bound.
263 std::array<long, num_space_dim> min;
264 for ( std::size_t d = 0; d < num_space_dim; ++d )
265 {
266 // Lower neighbor.
267 if ( -1 == off_ijk[d] )
268 min[d] = owned_cell_space.min( d ) >> cellBitsPerTileDim;
269
270 // Middle neighbor.
271 else if ( 0 == off_ijk[d] )
272 min[d] = owned_cell_space.min( d ) >> cellBitsPerTileDim;
273
274 // Upper neighbor.
275 else if ( 1 == off_ijk[d] )
276 min[d] = ( owned_cell_space.max( d ) - halo_width ) >>
277 cellBitsPerTileDim;
278 else
279 throw std::runtime_error( "Neighbor offset must be 1, 0, or -1" );
280 }
281
282 // Compute the upper bound.
283 std::array<long, num_space_dim> max;
284 for ( std::size_t d = 0; d < num_space_dim; ++d )
285 {
286 // Lower neighbor.
287 if ( -1 == off_ijk[d] )
288 max[d] = ( owned_cell_space.min( d ) + halo_width ) >>
289 cellBitsPerTileDim;
290
291 // Middle neighbor.
292 else if ( 0 == off_ijk[d] )
293 max[d] = owned_cell_space.max( d ) >> cellBitsPerTileDim;
294
295 // Upper neighbor.
296 else if ( 1 == off_ijk[d] )
297 max[d] = owned_cell_space.max( d ) >> cellBitsPerTileDim;
298 else
299 throw std::runtime_error( "Neighbor offset must be 1, 0, or -1" );
300 }
301
302 return TileIndexSpace<num_space_dim, cellBitsPerTileDim>( min, max );
303}
304
305//---------------------------------------------------------------------------//
306// Given a relative set of indices of a neighbor, get set of global tile
307// indices owned by that neighbor that are shared with us to use as ghosts.
308template <class Scalar, std::size_t NumSpaceDim>
309template <unsigned long long cellBitsPerTileDim>
310auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
311 Ghost, const std::array<int, num_space_dim>& off_ijk,
312 const int halo_width ) const
313 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
314{
315 // Get the owned local index space.
316 auto owned_cell_space = indexSpaceImpl( Own(), Node(), Global() );
317
318 // Compute the lower bound.
319 std::array<long, num_space_dim> min;
320 for ( std::size_t d = 0; d < num_space_dim; ++d )
321 {
322 // Lower neighbor.
323 if ( -1 == off_ijk[d] )
324 min[d] = ( owned_cell_space.min( d ) - halo_width ) >>
325 cellBitsPerTileDim;
326
327 // Middle neighbor
328 else if ( 0 == off_ijk[d] )
329 min[d] = owned_cell_space.min( d ) >> cellBitsPerTileDim;
330
331 // Upper neighbor.
332 else if ( 1 == off_ijk[d] )
333 min[d] = owned_cell_space.max( d ) >> cellBitsPerTileDim;
334 else
335 throw std::runtime_error( "Neighbor offset must be 1, 0, or -1" );
336 }
337
338 // Compute the upper bound.
339 std::array<long, num_space_dim> max;
340 for ( std::size_t d = 0; d < num_space_dim; ++d )
341 {
342 // Lower neighbor.
343 if ( -1 == off_ijk[d] )
344 max[d] = owned_cell_space.min( d ) >> cellBitsPerTileDim;
345
346 // Middle neighbor
347 else if ( 0 == off_ijk[d] )
348 max[d] = owned_cell_space.max( d ) >> cellBitsPerTileDim;
349
350 // Upper neighbor.
351 else if ( 1 == off_ijk[d] )
352 max[d] = ( owned_cell_space.max( d ) + halo_width ) >>
353 cellBitsPerTileDim;
354 else
355 throw std::runtime_error( "Neighbor offset must be 1, 0, or -1" );
356 }
357
358 return TileIndexSpace<num_space_dim, cellBitsPerTileDim>( min, max );
359}
360
361//---------------------------------------------------------------------------//
362//-------------------------------- Node -------------------------------------//
363//---------------------------------------------------------------------------//
364// Implementations for node indices
365template <class Scalar, std::size_t NumSpaceDim>
366template <class DecompositionTag, class IndexType>
368 DecompositionTag t1, Node, IndexType t3 ) const -> IndexSpace<num_space_dim>
369{
370 return indexSpaceImpl( t1, t3 );
371}
372
373// Implementation for node-related shared index space
374template <class Scalar, std::size_t NumSpaceDim>
375template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
376auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
377 DecompositionTag t1, Node, const std::array<int, num_space_dim>& off_ijk,
378 const int halo_width ) const
379 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
380{
381 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
382 halo_width );
383}
384
385//---------------------------------------------------------------------------//
386//-------------------------------- Cell -------------------------------------//
387//---------------------------------------------------------------------------//
388// Implementations for cell indices
389template <class Scalar, std::size_t NumSpaceDim>
390template <class DecompositionTag, class IndexType>
392 DecompositionTag t1, Cell, IndexType t3 ) const -> IndexSpace<num_space_dim>
393{
394 return indexSpaceImpl( t1, t3 );
395}
396
397// Implementation for cell-related shared index space
398template <class Scalar, std::size_t NumSpaceDim>
399template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
400auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
401 DecompositionTag t1, Cell, const std::array<int, num_space_dim>& off_ijk,
402 const int halo_width ) const
403 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
404{
405 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
406 halo_width );
407}
408
409//---------------------------------------------------------------------------//
410//-------------------------------- Face -------------------------------------//
411//---------------------------------------------------------------------------//
412// Implementations for Face<Dim::I> indices
413template <class Scalar, std::size_t NumSpaceDim>
414template <class DecompositionTag, class IndexType>
416 DecompositionTag t1, Face<Dim::I>, IndexType t3 ) const
417 -> IndexSpace<num_space_dim>
418{
419 std::runtime_error(
420 "Sparse grid implementation doesn't support Face entities so far" );
421 return indexSpaceImpl( t1, t3 );
422}
423
424// Implementations for Face<Dim::J> indices
425template <class Scalar, std::size_t NumSpaceDim>
426template <class DecompositionTag, class IndexType>
428 DecompositionTag t1, Face<Dim::J>, IndexType t3 ) const
429 -> IndexSpace<num_space_dim>
430{
431 std::runtime_error(
432 "Sparse grid implementation doesn't support Face entities so far" );
433 return indexSpaceImpl( t1, t3 );
434}
435
436// Implementations for Face<Dim::K> indices
437template <class Scalar, std::size_t NumSpaceDim>
438template <class DecompositionTag, class IndexType>
440 DecompositionTag t1, Face<Dim::K>, IndexType t3 ) const
441 -> IndexSpace<num_space_dim>
442{
443 std::runtime_error(
444 "Sparse grid implementation doesn't support Face entities so far" );
445 return indexSpaceImpl( t1, t3 );
446}
447
448// Implementation for face<Dim::I>-related shared index space
449template <class Scalar, std::size_t NumSpaceDim>
450template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
451auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
452 DecompositionTag t1, Face<Dim::I>,
453 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
454 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
455{
456 std::runtime_error(
457 "Sparse grid implementation doesn't support Face entities so far" );
458 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
459 halo_width );
460}
461
462// Implementation for face<Dim::J>-related shared index space
463template <class Scalar, std::size_t NumSpaceDim>
464template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
465auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
466 DecompositionTag t1, Face<Dim::J>,
467 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
468 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
469{
470 std::runtime_error(
471 "Sparse grid implementation doesn't support Face entities so far" );
472 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
473 halo_width );
474}
475// Implementation for face<Dim::K>-related shared index space
476template <class Scalar, std::size_t NumSpaceDim>
477template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
478auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
479 DecompositionTag t1, Face<Dim::K>,
480 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
481 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
482{
483 std::runtime_error(
484 "Sparse grid implementation doesn't support Face entities so far" );
485 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
486 halo_width );
487}
488
489//---------------------------------------------------------------------------//
490//-------------------------------- Edge -------------------------------------//
491//---------------------------------------------------------------------------//
492// Implementations for edge<Dim::I> indices
493template <class Scalar, std::size_t NumSpaceDim>
494template <class DecompositionTag, class IndexType>
496 DecompositionTag t1, Edge<Dim::I>, IndexType t3 ) const
497 -> IndexSpace<num_space_dim>
498{
499 std::runtime_error(
500 "Sparse grid implementation doesn't support Edge entities so far" );
501 return indexSpaceImpl( t1, t3 );
502}
503
504// Implementations for edge<Dim::J> indices
505template <class Scalar, std::size_t NumSpaceDim>
506template <class DecompositionTag, class IndexType>
508 DecompositionTag t1, Edge<Dim::J>, IndexType t3 ) const
509 -> IndexSpace<num_space_dim>
510{
511 std::runtime_error(
512 "Sparse grid implementation doesn't support Edge entities so far" );
513 return indexSpaceImpl( t1, t3 );
514}
515
516// Implementations for edge<Dim::K> indices
517template <class Scalar, std::size_t NumSpaceDim>
518template <class DecompositionTag, class IndexType>
520 DecompositionTag t1, Edge<Dim::K>, IndexType t3 ) const
521 -> IndexSpace<num_space_dim>
522{
523 std::runtime_error(
524 "Sparse grid implementation doesn't support Edge entities so far" );
525 return indexSpaceImpl( t1, t3 );
526}
527
528// Implementation for Edge<Dim::I>-related shared index space
529template <class Scalar, std::size_t NumSpaceDim>
530template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
531auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
532 DecompositionTag t1, Edge<Dim::I>,
533 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
534 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
535{
536 std::runtime_error(
537 "Sparse grid implementation doesn't support Edge entities so far" );
538 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
539 halo_width );
540}
541
542// Implementation for Edge<Dim::I>-related shared index space
543template <class Scalar, std::size_t NumSpaceDim>
544template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
545auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
546 DecompositionTag t1, Edge<Dim::J>,
547 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
548 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
549{
550 std::runtime_error(
551 "Sparse grid implementation doesn't support Edge entities so far" );
552 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
553 halo_width );
554}
555
556// Implementation for Edge<Dim::I>-related shared index space
557template <class Scalar, std::size_t NumSpaceDim>
558template <unsigned long long cellBitsPerTileDim, class DecompositionTag>
559auto LocalGrid<SparseMesh<Scalar, NumSpaceDim>>::sharedTileIndexSpaceImpl(
560 DecompositionTag t1, Edge<Dim::K>,
561 const std::array<int, num_space_dim>& off_ijk, const int halo_width ) const
562 -> TileIndexSpace<num_space_dim, cellBitsPerTileDim>
563{
564 std::runtime_error(
565 "Sparse grid implementation doesn't support Edge entities so far" );
566 return sharedTileIndexSpaceImpl<cellBitsPerTileDim>( t1, off_ijk,
567 halo_width );
568}
570
571//---------------------------------------------------------------------------//
572} // namespace Experimental
573} // namespace Grid
574} // namespace Cabana
575
576#endif // end CABANA_GRID_LOCALGRID_SPARSE_IMPL_HPP
LocalGrid(const std::shared_ptr< GlobalGrid< mesh_type > > &global_grid, const int halo_cell_width, const long cell_num_per_tile_dim)
Constructor.
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:25
int neighborRank(const std::array< int, num_space_dim > &off_ijk) const
Get the global index of a neighbor given neighbor rank offsets relative to this local grid.
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:98
const GlobalGrid< mesh_type > & globalGrid() const
Get the global grid that owns the local grid.
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:43
int totalNumCell(const int d) const
Get the total number of local cells per dimension (owned + halo).
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:76
int haloCellWidth() const
Get the number of cells in the halo.
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:60
int haloTileWidth() const
Get the number of tiles in the halo.
Definition Cabana_Grid_SparseLocalGrid_impl.hpp:68
static constexpr std::size_t num_space_dim
Spatial dimension.
Definition Cabana_Grid_SparseLocalGrid.hpp:51
Definition Cabana_Grid_SparseLocalGrid.hpp:35
Global logical grid.
Definition Cabana_Grid_GlobalGrid.hpp:39
Structured index space.
Definition Cabana_Grid_IndexSpace.hpp:37
Local logical grid.
Definition Cabana_Grid_LocalGrid.hpp:39
Index space with tile as unit; _min and _max forms the tile range. Note this is for sparse grid only,...
Definition Cabana_Grid_SparseIndexSpace.hpp:1137
Core: particle data structures and algorithms.
Definition Cabana_AoSoA.hpp:36
auto size(SliceType slice, typename std::enable_if< is_slice< SliceType >::value, int >::type *=0)
Check slice size (differs from Kokkos View).
Definition Cabana_Slice.hpp:1012