include/pops/runtime/builders/block/block_seam.hpp Source FileΒΆ
|
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
|
block_seam.hpp
Go to the documentation of this file.
4#include <pops/runtime/builders/block/block_builder.hpp> // make_block + makers + BlockClosures + NewtonOptions/Report
5#include <pops/runtime/builders/block/block_builder_polar.hpp> // make_block_polar + polar makers + PolarGridContext
6#include <pops/runtime/builders/factory/model_factory.hpp> // dispatch_model_for + resolve_implicit_components + ModelSpec
110// Per-transport seam functions (defined in python/system_<transport>.cpp). The TR construction matches
115// Isothermal (3-var fluid) carries two reachable fluxes (rusanov + hll; hllc/roe need 4-var + pressure)
116// x 4 limiters x 15 models -- the post-split long pole -- so it is FLUX-SUBDIVIDED like compressible
117// (ADC-342): one .cpp per reachable flux. System dispatches on the riemann string; an unsupported flux
122// Compressible (Euler, 4-var + pressure) is the heaviest transport: all four fluxes are valid, so it is
123// FLUX-SUBDIVIDED into one .cpp per flux (ADC-335) -- each instantiates only its flux's build_block
124// leaves, so they compile in parallel. System dispatches on the riemann string to the right one (every
125// flux is valid for Euler, so no capability rejection to reproduce; an unknown flux is caught by the
132// Polar (ring) seam: VERBATIM polar visitor body (make_block_polar + polar makers). IMEX is rejected on
133// the ring by add_block before this is called. @p aux is &System::Impl::aux (the polar makers read it).
Builds the closures of a block (time advance + residual + Poisson contribution) from a COMPILED model...
POLAR counterpart of block_builder.hpp: builds a block's closures (time advance + residual + Poisson ...
Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp...
Definition multifab.hpp:33
Assemble a CompositeModel from a ModelSpec (bricks + parameters).
Definition cluster.hpp:37
BuiltBlock build_block_compressible_roe(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_isothermal_hll(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_compressible_hllc(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_for_make(TR tr, const ModelSpec &model, const BlockBuildArgs &a, MakeFn make)
VERBATIM Cartesian visitor body of the former dispatch_model lambda (system.cpp), with the transport ...
Definition block_seam.hpp:73
BuiltBlock build_block_compressible_hll(const ModelSpec &model, const BlockBuildArgs &a)
POPS_COLD_FN void dispatch_model_for(const ModelSpec &m, TR tr, Visitor &&visitor)
Same as dispatch_model but with the transport brick ALREADY chosen (tr).
Definition model_factory.hpp:196
POPS_COLD_FN std::vector< int > resolve_implicit_components(const std::string &block, const VariableSet &cons, const std::vector< std::string > &names, const std::vector< std::string > &roles)
Resolves the IMPLICIT MASK of a block (add_block: implicit_vars / implicit_roles) into a list of cons...
Definition model_factory.hpp:213
BuiltBlock build_block_exb(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_isothermal_rusanov(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_polar(const ModelSpec &model, const std::string &limiter, const std::string &riemann, const PolarGridContext &pctx, bool recon_prim, const std::string &method, Real positivity_floor, const MultiFab *aux)
BuiltBlock build_block_compressible_rusanov(const ModelSpec &model, const BlockBuildArgs &a)
BuiltBlock build_block_for(TR tr, const ModelSpec &model, const BlockBuildArgs &a)
Per-transport seam body: the full make_block dispatcher (all fluxes).
Definition block_seam.hpp:102
std::function< Real(const MultiFab &)> make_stability_dt(const Model &m, const GridContext &ctx)
Closure of the block min admissible step (bound dt <= stability_dt * substeps / stride,...
Definition block_builder.hpp:852
POPS_COLD_FN BlockClosures make_block(const Model &m, const std::string &lim, const std::string &riem, const GridContext &ctx, bool imex, bool recon_prim, const std::string &method="ssprk2", const std::vector< int > &implicit_components={}, const NewtonOptions &newton_opts={}, NewtonReport *newton_report=nullptr, Real pos_floor=Real(0), bool wave_speed_cache=false)
Definition block_builder.hpp:726
std::function< void(const MultiFab &, MultiFab &)> make_poisson_rhs(const Model &m)
Block contribution to the Poisson right-hand side: rhs += elliptic_rhs(U) (host loop).
Definition block_builder.hpp:861
std::function< Real(const MultiFab &)> make_max_speed(const Model &m, const GridContext &ctx)
Closure of the speed used by the block CFL step.
Definition block_builder.hpp:831
std::function< Real(const MultiFab &)> make_source_frequency(const Model &m, const GridContext &ctx)
Closure of the block max source frequency (bound dt <= cfl * substeps / (stride * mu)).
Definition block_builder.hpp:842
std::pair< std::function< void(const double *, double *)>, std::function< void(const double *, double *)> > make_cell_convert(const Model &m)
PER-CELL (one cell) cons <-> prim conversions of the MODEL, type-erased over arrays of Model::n_vars ...
Definition block_builder.hpp:875
Mesh + transport BC + aux shared by a block closures.
Definition grid_context.hpp:41
Options of the local Newton of the implicit source (backward-Euler).
Definition implicit_stepper.hpp:114
AGGREGATED report (whole block, all substeps of one advance) of the implicit-source Newton.
Definition implicit_stepper.hpp:165
POLAR mesh + transport BC + aux shared by a block's closures (counterpart of GridContext).
Definition block_builder_polar.hpp:49
A model's variable set: kind (cons/prim), names, size, canonical roles (optional, parallel to names; ...
Definition variables.hpp:58
The non-model inputs of a Cartesian block build (a thin bundle so the seam signature stays fixed).
Definition block_seam.hpp:50
std::vector< std::string > implicit_vars
Definition block_seam.hpp:58
std::vector< std::string > implicit_roles
Definition block_seam.hpp:59
Everything System::add_block reads back from the (former) dispatch_model visitor.
Definition block_seam.hpp:35
std::function< void(const double *, double *)> cons_to_prim
Definition block_seam.hpp:42
std::function< void(const MultiFab &, MultiFab &)> add_poisson_rhs
Definition block_seam.hpp:40
std::function< void(const double *, double *)> prim_to_cons
Definition block_seam.hpp:42
std::function< Real(const MultiFab &)> max_speed
Definition block_seam.hpp:39
std::function< Real(const MultiFab &)> src_freq
Definition block_seam.hpp:41
std::function< Real(const MultiFab &)> stab_dt
Definition block_seam.hpp:41
Descriptor of a model's variables (Vars).
Generated by