Skip to content

Grid Local Grid

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

Overview

The local grid defines the indexing for a single part of the domain decomposition.

The figure below highlights one local domain of a total system, where indexing information is again shown in red. The ghosted information from neighboring ranks can be optionally used (right): Local grid

The local grid contains many index spaces in order to iterate in parallel. The primary index spaces for a given entity (Cell, Node, Face<Dim>, Edge<Dim>) can use either Local or Global indexing and either exclude ghosted entities (Own): Own index space or include ghosted entites (Ghost), depending on the user's physics: Ghost index space

In addition, shared index spaces define the regions within the halo width of the MPI boundary, while boundary index spaces are regions within the halo width of the global domain. Note that if the system is periodic there are no global boundaries and therfore every boundary index space is empty. Examples of shared and boundary index spaces for Own (without ghosts) are within the local system boundaries: Own shared/boundary index space

These shared or boundary index spaces can similarly be created with Ghost indexing included, which can be outside the local system boundaries: Ghost shared/boundary index space

Implementation

Cabana_Grid_LocalGrid.hpp

Examples

Usage

    auto global_grid = Cabana::Grid::createGlobalGrid( MPI_COMM_WORLD, global_mesh,
                                                       is_dim_periodic, partitioner );

    int halo_width = 2;
    auto local_grid = Cabana::Grid::createLocalGrid( global_grid, halo_width );

This is part of the Programming Guide series

Clone this wiki locally