include/pops/numerics/time/schemes/scheduler.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
|
scheduler.hpp File Reference
Minimal scheduler for coupled systems: advance_subcycled reads each block's time policy (traits block_substeps_v / block_stride_v / block_time_treatment_v) and calls a user callable on the substeps. More...
#include <pops/core/model/coupled_system.hpp>#include <pops/core/foundation/types.hpp>#include <type_traits>#include <utility>
Include dependency graph for scheduler.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | pops |
Functions | |
| template<CoupledSystemLike System, class AdvanceBlock > | |
| void | pops::advance_subcycled (System &system, Real dt, int macro_step, AdvanceBlock &&advance_block) |
| template<CoupledSystemLike System, class AdvanceBlock > | |
| void | pops::advance_subcycled (System &system, Real dt, AdvanceBlock &&advance_block) |
Variables | |
| template<class Block > | |
| constexpr int | pops::block_substeps_v = TimePolicyTraits<typename std::decay_t<Block>::Time>::substeps |
| template<class Block > | |
| constexpr TimeTreatment | pops::block_time_treatment_v |
| template<class Block > | |
| constexpr int | pops::block_stride_v = TimePolicyTraits<typename std::decay_t<Block>::Time>::stride |
Detailed Description
Minimal scheduler for coupled systems: advance_subcycled reads each block's time policy (traits block_substeps_v / block_stride_v / block_time_treatment_v) and calls a user callable on the substeps.
Layer: include/pops/numerics/time. Role: physics-agnostic skeleton. Enables per-block cadences (e.g. electrons 10 implicit substeps, ions 1 explicit step) without hard-coding any logic in a single-model Coupler. Prescribed blocks are skipped.
Invariants:
- substeps (split: n steps of dt_eff/n) and stride (cadence: advance 1 macro-step out of stride, then by an EFFECTIVE step stride*dt) are ORTHOGONAL; over M macro-steps the total stays M*dt;
- a strided block advances only at macro-steps that are multiples of stride (otherwise return);
- the overload without macro_step forces macro_step=0 (all blocks advance, stride ignored) -> bit-identical to the old advance_subcycled; stride=1 = historical behavior.
Generated by