SystemDriver< System, RhsAssembler, Elliptic > Class Template ReferenceΒΆ

adc_cpp: pops::SystemDriver< System, RhsAssembler, 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::SystemDriver< System, RhsAssembler, Elliptic > Class Template Reference

ADVANCES the system: carries the schedule (per-species subcycling, adaptive multirate, implicit/IMEX delegated) and calls a TimeStepper. More...

#include <system_coupler.hpp>

+ Collaboration diagram for pops::SystemDriver< System, RhsAssembler, Elliptic >:

Public Member Functions

 SystemDriver (System system, const Geometry &geom, const BoxArray &ba, const BCRec &bcPhi, RhsAssembler rhs_assembler, std::function< bool(Real, Real)> active={}, std::function< Real(Real, Real)> bz={})
 Builds the driver (which builds the underlying assembler).
 
Systemsystem ()
 
const Systemsystem () const
 
MultiFabphi ()
 
const MultiFabaux () const
 
void solve_fields ()
 
SystemAssembler< System, RhsAssembler, Elliptic > & assembler ()
 
template<class ImplicitAdvance >
void step (Real dt, ImplicitAdvance &&implicit_advance)
 Advances the blocks by a macro-step dt per their TimePolicy: explicit ones via TimeStepper, implicit/IMEX delegated to implicit_advance (block, h, s, n).
 
template<class ImplicitAdvance >
Real step_adaptive (Real cfl, ImplicitAdvance &&implicit_advance)
 FULLY ADAPTIVE multirate: macro-step fixed by the fastest species (CFL cfl), stride of each species derived at RUNTIME from the wave-speed ratio (slow species advanced less often, larger step).
 
Real step_adaptive (Real cfl)
 
void step (Real dt)
 
Real cfl_dt (Real cfl)
 Macro-step chosen by multi-species CFL: dt = cfl * min(dx, dy) / w_max (w_max = largest wave speed over ALL species).
 
template<class ImplicitAdvance >
Real step_cfl (Real cfl, ImplicitAdvance &&implicit_advance)
 
Real step_cfl (Real cfl)
 
template<class CoupledSource >
void coupled_source_step (CoupledSource &&src, Real dt)
 Applies an inter-species COUPLING source (forward-Euler splitting): refreshes phi (aux) then calls src.apply(system, aux, dt).
 

Detailed Description

template<CoupledSystemLike System, class RhsAssembler, class Elliptic = GeometricMG>
class pops::SystemDriver< System, RhsAssembler, Elliptic >

ADVANCES the system: carries the schedule (per-species subcycling, adaptive multirate, implicit/IMEX delegated) and calls a TimeStepper.

OWNS a SystemAssembler and delegates the fields to it. Same template parameters as SystemAssembler.

Constructor & Destructor Documentation

◆ SystemDriver()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
pops::SystemDriver< System, RhsAssembler, Elliptic >::SystemDriver ( System  system,
const Geometry geom,
const BoxArray ba,
const BCRec bcPhi,
RhsAssembler  rhs_assembler,
std::function< bool(Real, Real)>  active = {},
std::function< Real(Real, Real)>  bz = {} 
)
inline

Builds the driver (which builds the underlying assembler).

active: optional wall predicate passed to the MG; bz: optional B_z(x, y) field shared by the blocks.

Member Function Documentation

◆ assembler()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
SystemAssembler< System, RhsAssembler, Elliptic > & pops::SystemDriver< System, RhsAssembler, Elliptic >::assembler ( )
inline

◆ aux()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
const MultiFab & pops::SystemDriver< System, RhsAssembler, Elliptic >::aux ( ) const
inline

◆ cfl_dt()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
Real pops::SystemDriver< System, RhsAssembler, Elliptic >::cfl_dt ( Real  cfl)
inline

Macro-step chosen by multi-species CFL: dt = cfl * min(dx, dy) / w_max (w_max = largest wave speed over ALL species).

Refreshes aux before the measurement.

+ Here is the caller graph for this function:

◆ coupled_source_step()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
template<class CoupledSource >
void pops::SystemDriver< System, RhsAssembler, Elliptic >::coupled_source_step ( CoupledSource &&  src,
Real  dt 
)
inline

Applies an inter-species COUPLING source (forward-Euler splitting): refreshes phi (aux) then calls src.apply(system, aux, dt).

Distinct from model.source (block-local).

◆ phi()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
MultiFab & pops::SystemDriver< System, RhsAssembler, Elliptic >::phi ( )
inline

◆ solve_fields()

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
void pops::SystemDriver< System, RhsAssembler, Elliptic >::solve_fields ( )
inline

◆ step() [1/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
void pops::SystemDriver< System, RhsAssembler, Elliptic >::step ( Real  dt)
inline
+ Here is the call graph for this function:

◆ step() [2/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
template<class ImplicitAdvance >
void pops::SystemDriver< System, RhsAssembler, Elliptic >::step ( Real  dt,
ImplicitAdvance &&  implicit_advance 
)
inline

Advances the blocks by a macro-step dt per their TimePolicy: explicit ones via TimeStepper, implicit/IMEX delegated to implicit_advance (block, h, s, n).

Per-block stride cadence.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step_adaptive() [1/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
Real pops::SystemDriver< System, RhsAssembler, Elliptic >::step_adaptive ( Real  cfl)
inline
+ Here is the call graph for this function:

◆ step_adaptive() [2/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
template<class ImplicitAdvance >
Real pops::SystemDriver< System, RhsAssembler, Elliptic >::step_adaptive ( Real  cfl,
ImplicitAdvance &&  implicit_advance 
)
inline

FULLY ADAPTIVE multirate: macro-step fixed by the fastest species (CFL cfl), stride of each species derived at RUNTIME from the wave-speed ratio (slow species advanced less often, larger step).

Returns the macro-step. implicit_advance handles implicit/IMEX blocks.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step_cfl() [1/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
Real pops::SystemDriver< System, RhsAssembler, Elliptic >::step_cfl ( Real  cfl)
inline
+ Here is the call graph for this function:

◆ step_cfl() [2/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
template<class ImplicitAdvance >
Real pops::SystemDriver< System, RhsAssembler, Elliptic >::step_cfl ( Real  cfl,
ImplicitAdvance &&  implicit_advance 
)
inline
+ Here is the call graph for this function:

◆ system() [1/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
System & pops::SystemDriver< System, RhsAssembler, Elliptic >::system ( )
inline

◆ system() [2/2]

template<CoupledSystemLike System, class RhsAssembler , class Elliptic = GeometricMG>
const System & pops::SystemDriver< System, RhsAssembler, Elliptic >::system ( ) const
inline

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