include/pops/coupling/system/amr_system_coupler.hpp File ReferenceΒΆ

adc_cpp: include/pops/coupling/system/amr_system_coupler.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_system_coupler.hpp File Reference

AmrSystemCoupler: multi-species SYSTEM coupler on AMR (milestone 2.3). More...

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

Go to the source code of this file.

Classes

struct  pops::AmrHierarchyLayout
 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...
 
class  pops::AmrSystemCoupler< System, RhsAssembler, Elliptic >
 Multi-species system coupler on AMR. More...
 
struct  pops::AmrImplicitSourceStepper
 Default implicit callback for AmrSystemCoupler::step: backward-Euler (Newton) on the model source, applied to EACH level of the hierarchy, followed by a fine -> coarse cascade (coverage consistency, cf. More...
 

Namespaces

namespace  pops
 
namespace  pops::detail
 

Typedefs

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
using pops::AmrSystemDriver = AmrSystemCoupler< System, RhsAssembler, Elliptic >
 

Enumerations

enum class  pops::PoissonCadence { pops::OncePerStep , pops::PerSubstep }
 Re-solve frequency of the Poisson on AMR: OncePerStep (phi solved once per macro-step, frozen during the advance; cheapest); PerSubstep (phi re-solved before each species substep, more faithful for a field-driven transport, more expensive). More...
 

Functions

bool pops::detail::same_level_layout (const BoxArray &a_ba, const DistributionMapping &a_dm, Real a_dx, Real a_dy, const BoxArray &b_ba, const DistributionMapping &b_dm, Real b_dx, Real b_dy)
 
void pops::detail::same_layout_or_throw (const std::vector< std::vector< AmrLevelMP > > &block_levels)
 

Variables

template<class >
constexpr bool pops::detail::amr_always_false_v = false
 

Detailed Description

AmrSystemCoupler: multi-species SYSTEM coupler on AMR (milestone 2.3).

Carries a CoupledSystem on an AMR hierarchy: each block has ITS OWN level hierarchy, all species SHARE the same AMR grid, the same aux field (phi, grad phi [, B_z, ...]) and the same coarse Poisson. Orchestration: sync_down (per block) -> coarse Poisson f = Sum_s q_s n_s -> coarse aux + injection to the fine levels -> each block advances via advance_amr<Disc_block> (with its scheme and its substeps; implicit/IMEX blocks delegated to a callback). STRONG INVARIANT: all blocks live on EXACTLY the same grid per level (the aux is shared); same_layout_or_throw checks this at the ctor. PoissonCadence chooses the re-solve frequency of phi (OncePerStep frozen vs PerSubstep). Single-block = bit-identical path to history (loops over the other blocks are empty).