Skip to content

Grid Global Mesh

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

Overview

All meshes in Cabana::Grid are logically rectilinear: each mesh cell is either cubic or rectangular. The global mesh defines the geometry of entire system prior to domain decomposition.

The figure below highlights that the global mesh holds information for the total system domain: Global mesh

Implementation

Cabana_Grid_GlobalMesh.hpp

Examples

Usage

    std::array<int, 3> global_num_cell = { 22, 19, 21 };

    std::array<double, 3> global_low_corner = { 1.2, 3.3, -2.8 };
    std::array<double, 3> global_high_corner = {
        global_low_corner[0] + cell_size * global_num_cell[0],
        global_low_corner[1] + cell_size * global_num_cell[1],
        global_low_corner[2] + cell_size * global_num_cell[2] };

    auto global_mesh_num_cell = Cabana::Grid::createUniformGlobalMesh(
        global_low_corner, global_high_corner, global_num_cell );

This is part of the Programming Guide series

Clone this wiki locally