AmrHierarchyLayout Struct ReferenceΒΆ

adc_cpp: pops::AmrHierarchyLayout Struct Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends

Single source of truth on the GRID shared by all blocks: per level the BoxArray (boxes AND order), the DistributionMapping (rank per box) and dx/dy. More...

#include <amr_system_coupler.hpp>

+ Collaboration diagram for pops::AmrHierarchyLayout:

Public Member Functions

int nlev () const
 Number of levels (= ba.size()).
 

Static Public Member Functions

static AmrHierarchyLayout from_levels (const std::vector< AmrLevelMP > &levels)
 Extracts the layout (BoxArray + DistributionMapping + dx/dy per level) from the level stack of ONE block.
 

Public Attributes

std::vector< BoxArrayba
 
std::vector< DistributionMappingdm
 
std::vector< Realdx
 
std::vector< Realdy
 

Detailed Description

Single source of truth on the GRID shared by all blocks: per level the BoxArray (boxes AND order), the DistributionMapping (rank per box) and dx/dy.

EXTRACTED only (replaces neither EquationBlock nor AmrLevelMP); used by the same_layout_or_throw guard.

Member Function Documentation

◆ from_levels()

static AmrHierarchyLayout pops::AmrHierarchyLayout::from_levels ( const std::vector< AmrLevelMP > &  levels)
inlinestatic

Extracts the layout (BoxArray + DistributionMapping + dx/dy per level) from the level stack of ONE block.

No copy of field data, only the grid.

◆ nlev()

int pops::AmrHierarchyLayout::nlev ( ) const
inline

Number of levels (= ba.size()).

Member Data Documentation

◆ ba

std::vector<BoxArray> pops::AmrHierarchyLayout::ba

◆ dm

std::vector<DistributionMapping> pops::AmrHierarchyLayout::dm

◆ dx

std::vector<Real> pops::AmrHierarchyLayout::dx

◆ dy

std::vector<Real> pops::AmrHierarchyLayout::dy

The documentation for this struct was generated from the following file: