include/pops/coupling/amr/amr_coupler_mp.hpp File ReferenceΒΆ

adc_cpp: include/pops/coupling/amr/amr_coupler_mp.hpp File 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
amr_coupler_mp.hpp File Reference

AmrCouplerMP: MULTI-PATCH E x B AMR coupler (coarse Poisson -> aux = grad phi -> fine injection -> conservative AMR step), multi-box per-level hierarchy. More...

+ Include dependency graph for amr_coupler_mp.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pops::AmrCouplerMP< Model, Elliptic >
 Multi-patch E x B AMR coupler. More...
 

Namespaces

namespace  pops
 
namespace  pops::detail
 

Functions

void pops::detail::coupler_inject_aux_mb (const MultiFab &parent, MultiFab &child, bool replicated_parent=true)
 
void pops::detail::coupler_write_coarse (MultiFab &U, const std::vector< double > &rho, int n, int ncomp, double gamma)
 
void pops::detail::coupler_write_coarse_state (MultiFab &U, const std::vector< double > &state, int n, int ncomp)
 
std::vector< double > pops::detail::coupler_read_coarse (const MultiFab &U, int n, bool replicated)
 
std::vector< double > pops::detail::coupler_read_coarse_phi (const MultiFab &aux0, int n, bool replicated)
 
void pops::detail::coupler_inject_coarse_to_fine_mb (const MultiFab &Uc, MultiFab &Uf, bool replicated)
 
std::pair< BoxArray, DistributionMappingpops::detail::coupler_make_coarse_layout (int n, bool distribute, int max_grid)
 

Detailed Description

AmrCouplerMP: MULTI-PATCH E x B AMR coupler (coarse Poisson -> aux = grad phi -> fine injection -> conservative AMR step), multi-box per-level hierarchy.

Same role as AmrCoupler but each level is multi-box (std::vector<AmrLevelMP> held by an AmrLevelStack) and integration goes through amr_step_multilevel_multipatch (coverage-aware reflux). regrid() rebuilds the fine level on the fly via Berger-Rigoutsos. Level 0 = single box for the Poisson. The class only ORDERS the operations (hierarchy stored in AmrLevelStack, regrid in amr_regrid_coupler.hpp, diagnostics in amr_diagnostics.hpp). INVARIANT: reduces BIT FOR BIT to AmrCoupler when each level has a single box (validation guard). Level-0 ownership policy via replicated_coarse (replicated vs distributed, equivalence proven bit for bit). The detail:: are the DISTRIBUTED primitives (aux injection, density write/read, layout).