Coupler< Model, Elliptic > Class Template ReferenceΒΆ

adc_cpp: pops::Coupler< Model, Elliptic > Class Template 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::Coupler< Model, Elliptic > Class Template Reference

Single-block hyperbolic-elliptic coupler. More...

#include <coupler.hpp>

+ Collaboration diagram for pops::Coupler< Model, Elliptic >:

Public Member Functions

 Coupler (const Model &model, const Geometry &geom, const BoxArray &ba, const BCRec &bcU, const BCRec &bcPhi, std::function< bool(Real, Real)> active={}, std::function< Real(Real, Real)> bz={})
 
template<class Limiter = NoSlope, class Policy = PerStageCoupling, class NumericalFlux = RusanovFlux>
void advance (MultiFab &U, Real dt)
 
template<class Limiter = NoSlope, class Policy = PerStageCoupling, class NumericalFlux = RusanovFlux>
void advance_ssprk3 (MultiFab &U, Real dt)
 
template<class Disc = FirstOrder, class TimeInteg = SSPRK2, class Policy = PerStageCoupling>
void step (MultiFab &U, Real dt)
 
void solve_fields (const MultiFab &U)
 Solve phi and derive aux = (phi, grad phi) for U WITHOUT advancing in time (useful to estimate the E x B velocity before fixing dt).
 
MultiFabphi ()
 
const MultiFabaux () const
 

Detailed Description

template<class Model, class Elliptic = GeometricMG>
class pops::Coupler< Model, Elliptic >

Single-block hyperbolic-elliptic coupler.

Template Parameters
ModelPhysicalModel (flux, source, elliptic_rhs, max_wave_speed, aux channel).
Ellipticelliptic backend (concept EllipticSolver, default GeometricMG). Owns the aux and the solver; advance/step close the Poisson -> aux -> residual loop at each step. PRECONDITION: U carries at least Limiter::n_ghost ghosts.

Constructor & Destructor Documentation

◆ Coupler()

template<class Model , class Elliptic = GeometricMG>
pops::Coupler< Model, Elliptic >::Coupler ( const Model &  model,
const Geometry geom,
const BoxArray ba,
const BCRec bcU,
const BCRec bcPhi,
std::function< bool(Real, Real)>  active = {},
std::function< Real(Real, Real)>  bz = {} 
)
inline

Member Function Documentation

◆ advance()

template<class Model , class Elliptic = GeometricMG>
template<class Limiter = NoSlope, class Policy = PerStageCoupling, class NumericalFlux = RusanovFlux>
void pops::Coupler< Model, Elliptic >::advance ( MultiFab U,
Real  dt 
)
inline
+ Here is the call graph for this function:

◆ advance_ssprk3()

template<class Model , class Elliptic = GeometricMG>
template<class Limiter = NoSlope, class Policy = PerStageCoupling, class NumericalFlux = RusanovFlux>
void pops::Coupler< Model, Elliptic >::advance_ssprk3 ( MultiFab U,
Real  dt 
)
inline
+ Here is the call graph for this function:

◆ aux()

template<class Model , class Elliptic = GeometricMG>
const MultiFab & pops::Coupler< Model, Elliptic >::aux ( ) const
inline
+ Here is the caller graph for this function:

◆ phi()

template<class Model , class Elliptic = GeometricMG>
MultiFab & pops::Coupler< Model, Elliptic >::phi ( )
inline

◆ solve_fields()

template<class Model , class Elliptic = GeometricMG>
void pops::Coupler< Model, Elliptic >::solve_fields ( const MultiFab U)
inline

Solve phi and derive aux = (phi, grad phi) for U WITHOUT advancing in time (useful to estimate the E x B velocity before fixing dt).

aux() is up to date on return.

◆ step()

template<class Model , class Elliptic = GeometricMG>
template<class Disc = FirstOrder, class TimeInteg = SSPRK2, class Policy = PerStageCoupling>
void pops::Coupler< Model, Elliptic >::step ( MultiFab U,
Real  dt 
)
inline

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