include/pops/coupling/single/coupler.hpp File ReferenceΒΆ

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

Coupler: single-block hyperbolic-elliptic coupler (Poisson -> aux -> advance loop). More...

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

Go to the source code of this file.

Classes

class  pops::Coupler< Model, Elliptic >
 Single-block hyperbolic-elliptic coupler. More...
 

Namespaces

namespace  pops
 
namespace  pops::detail
 

Functions

template<class Model >
void pops::detail::coupler_eval_rhs (const MultiFab &state, MultiFab &rhs, const Model &model)
 Assemble the single-model elliptic RHS: rhs = model.elliptic_rhs(U) on valid cells (delegated to SingleModelEllipticRhs).
 
void pops::detail::coupler_grad_phi (const MultiFab &phi, MultiFab &aux, Real cx, Real cy)
 Set aux = (phi, d phi/dx, d phi/dy) by centered differences (factors cx, cy = 1/(2 dx), 1/(2 dy)).
 

Detailed Description

Coupler: single-block hyperbolic-elliptic coupler (Poisson -> aux -> advance loop).

At each integrator stage (stage-by-stage coupling): (1) RHS f = elliptic_rhs(model, U); (2) solve lap(phi) = f with the elliptic backend (warm start); (3) aux = (phi, grad phi) by centered differences; (4) assemble the hyperbolic residual with this aux. For drift transport aux enters through the FLUX (E x B); for a self-gravitating fluid through the SOURCE. Three orthogonal axes, all template parameters: Limiter (reconstruction), Policy (PerStage vs OncePerStep), NumericalFlux (Rusanov by default). Compatible with a SINGLE model; multi-species goes through SystemCoupler. The detail:: helpers are at namespace scope (an POPS_HD extended lambda cannot live in a private method, an nvcc restriction).