-
Notifications
You must be signed in to change notification settings - Fork 50
Grid Array
Sam Reeve edited this page Sep 12, 2024
·
2 revisions
An Array
holds a field of data on the grid (an allocated Kokkos::View
with the total order of the grid and field dimensions). Each array carries one entity and is created using an ArrayLayout
.
The figure below again shows one local domain, where the field data is now highlighted in purple:
int halo_width = 2;
auto local_grid = Cabana::Grid::createLocalGrid( global_grid, halo_width );
int halo_width = 2;
int dofs_per_node = 4;
auto node_layout = Cabana::Grid::createArrayLayout(
global_grid, halo_width, dofs_per_node, Cabana::Grid::Node() );
auto array = Cabana::Grid::createArray<double, memory_space>( "label", node_layout );
This is part of the Programming Guide series
Cabana - A Co-Designed Library for Exascale Particle Simulations