Skip to content

Grid Array

Sam Reeve edited this page Sep 12, 2024 · 2 revisions

Overview

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: Array

Implementation

Cabana_Grid_Array.hpp

Examples

Usage

    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

Clone this wiki locally