PatchBox Struct ReferenceΒΆ

adc_cpp: pops::PatchBox 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
pops::PatchBox Struct Reference

INDEX-SPACE footprint of an AMR fine patch, exposed to Python by AmrSystem::patch_boxes(). More...

#include <patch_box.hpp>

+ Collaboration diagram for pops::PatchBox:

Public Attributes

int level
 
int ilo
 
int jlo
 
int ihi
 
int jhi
 

Detailed Description

INDEX-SPACE footprint of an AMR fine patch, exposed to Python by AmrSystem::patch_boxes().

(level, ilo, jlo, ihi, jhi): the level (0 = coarse; >= 1 = fine) and the lo/hi corners of the box in the index space of the level (n << level cells per direction, ratio 2 per level). INCLUSIVE corners (Box2D / AMReX convention): the box covers (ihi - ilo + 1) x (jhi - jlo + 1) cells.

Trivial POD: a read-only view onto the boxes already stored (the same BoxArray that n_patches() reads), harvested between steps (query) -> no cost on the hot path. The conversion to physical coordinates [0, L]^2 happens on the Python side (which knows n via nx() and L): dx = L / (n << level), x0 = ilo * dx, width = (ihi - ilo + 1) * dx.

Member Data Documentation

◆ ihi

int pops::PatchBox::ihi

◆ ilo

int pops::PatchBox::ilo

◆ jhi

int pops::PatchBox::jhi

◆ jlo

int pops::PatchBox::jlo

◆ level

int pops::PatchBox::level

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