include/pops/runtime/builders/block/block_builder_polar.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
|
POLAR counterpart of block_builder.hpp: builds a block's closures (time advance + residual + Poisson contribution + wave speed) on an ANNULAR grid (PolarGeometry), by REUSING assemble_rhs_polar (include/pops/numerics/spatial_operator_polar.hpp). More...
#include <pops/core/foundation/types.hpp>#include <pops/mesh/layout/box_array.hpp>#include <pops/mesh/geometry/geometry.hpp>#include <pops/mesh/storage/multifab.hpp>#include <pops/mesh/boundary/physical_bc.hpp>#include <pops/numerics/fv/numerical_flux.hpp>#include <pops/numerics/fv/reconstruction.hpp>#include <pops/numerics/spatial/operators/polar_operator.hpp>#include <pops/numerics/time/integrators/time_steppers.hpp>#include <pops/parallel/comm.hpp>#include <pops/physics/bricks/bricks.hpp>#include <pops/runtime/config/dispatch_tags.hpp>#include <pops/runtime/context/grid_context.hpp>#include <pops/runtime/builders/factory/model_factory.hpp>#include <pops/runtime/dynamic/model_registry.hpp>#include <pops/runtime/config/model_spec.hpp>#include <functional>#include <stdexcept>#include <string>#include <utility>#include <vector>
Include dependency graph for block_builder_polar.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | pops::PolarGridContext |
| POLAR mesh + transport BC + aux shared by a block's closures (counterpart of GridContext). More... | |
| struct | pops::detail::PolarBlockRhsEval< Limiter, Flux, Model > |
| Polar residual functor R = -div_polar F + S (fill_ghosts then assemble_rhs_polar). More... | |
| struct | pops::detail::PolarAdvanceExplicit< Limiter, Flux, Model, Stepper > |
EXPLICIT polar advance: n substeps of the Stepper stepper (SSPRK2 by default, SSPRK3 optional) on the polar transport residual. More... | |
| struct | pops::detail::PolarRhsInto< Limiter, Flux, Model > |
| Frozen polar residual (fill_ghosts + assemble_rhs_polar) installed as the block's rhs_into (eval_rhs). More... | |
| struct | pops::detail::PolarMaxSpeed< Model > |
| Max wave-speed functor of the POLAR block: reduction over the valid cells of max_wave_speed(model, U, aux) in both directions (r, theta). More... | |
| struct | pops::detail::PolarPoissonRhs< Model > |
| POLAR Poisson contribution functor: rhs += elliptic_rhs(U) (pure HOST loop). More... | |
| struct | pops::detail::PolarStabilitySpeed< Model > |
| Optional STEP BOUND closures of the POLAR block (StabilityPolicy, audit wave 3): same device reductions as the cartesian ones (POINTWISE kernels with no geometry assumption – the geometry enters only through the physical step h of the stepper, min(dr, r_min*dtheta)). More... | |
| struct | pops::detail::PolarSourceFreq< Model > |
| struct | pops::detail::PolarStabilityDt< Model > |
Namespaces | |
| namespace | pops |
| namespace | pops::detail |
Functions | |
| template<class Visitor > | |
| void | pops::detail::dispatch_transport_polar (const ModelSpec &m, Visitor &&v) |
| Builds the POLAR transport brick and calls v(transport). | |
| template<class Visitor > | |
| void | pops::detail::dispatch_model_polar (const ModelSpec &m, Visitor &&visitor) |
Assembles the POLAR CompositeModel designated by m and calls visitor(model). | |
| void | pops::detail::fill_ghosts_polar (MultiFab &U, const Box2D &dom, const BCRec &bc) |
| Fills the ghosts of a MultiFab on the polar grid (theta periodic + r physical). | |
| void | pops::derive_aux_polar (const MultiFab &phi, MultiFab &aux, const PolarGeometry &g) |
Derives the POLAR aux in the local basis (e_r, e_theta) from the potential phi resolved by PolarPoissonSolver: aux[0] = phi; aux[1] = grad_r = d phi/dr; aux[2] = grad_theta = (1/r) d phi/d theta. | |
| template<class Limiter , class Flux , class Model > | |
| BlockClosures | pops::build_block_polar (const Model &m, const PolarGridContext &ctx, bool recon_prim, const std::string &method, bool wall_radial, Real pos_floor=Real(0)) |
| Closures (advance + residual) of a POLAR block for a frozen spatial scheme (Limiter x Flux). | |
| template<class Model > | |
| BlockClosures | pops::make_block_polar (const Model &m, const std::string &lim, const std::string &riem, const PolarGridContext &ctx, bool recon_prim, const std::string &method, bool wall_radial, Real pos_floor=Real(0)) |
| Dispatch of the spatial scheme (frozen limiter, Riemann flux) -> compiled polar closures. | |
| template<class Model > | |
| std::function< Real(const MultiFab &)> | pops::make_max_speed_polar (const Model &m, const MultiFab *aux) |
| Max wave-speed closure of the POLAR block (for the CFL step). | |
| template<class Model > | |
| std::function< Real(const MultiFab &)> | pops::make_cfl_speed_polar (const Model &m, const MultiFab *aux) |
| CFL speed of the POLAR block: lambda* (HasStabilitySpeed trait) if the model declares it, otherwise max_wave_speed (historical PolarMaxSpeed, bit-identical) – SAME policy as cartesian make_max_speed. | |
| template<class Model > | |
| std::function< Real(const MultiFab &)> | pops::make_source_frequency_polar (const Model &m, const MultiFab *aux) |
| Max source frequency of the POLAR block (HasSourceFrequency trait); EMPTY without the trait (the stepper does not query it, historical step policy). | |
| template<class Model > | |
| std::function< Real(const MultiFab &)> | pops::make_stability_dt_polar (const Model &m, const MultiFab *aux) |
| Min admissible step of the POLAR block (HasStabilityDt trait); EMPTY without the trait. | |
| template<class Model > | |
| std::function< void(const MultiFab &, MultiFab &)> | pops::make_poisson_rhs_polar (const Model &m) |
| Block contribution to the POLAR Poisson right-hand side: rhs += elliptic_rhs(U) (host loop). | |
Detailed Description
POLAR counterpart of block_builder.hpp: builds a block's closures (time advance + residual + Poisson contribution + wave speed) on an ANNULAR grid (PolarGeometry), by REUSING assemble_rhs_polar (include/pops/numerics/spatial_operator_polar.hpp).
This is the Polar Phase 2b path: polar transport THROUGH System.step.
STRICT SEPARATION from the cartesian path: block_builder.hpp (cartesian assemble_rhs, Geometry) stays UNTOUCHED -> a cartesian System is bit-identical. The polar path is PURELY ADDITIVE, opt-in (enabled when cfg.geometry == "polar", see system.cpp). We reuse the SAME source / elliptic bricks (dispatch_source / dispatch_elliptic from model_factory.hpp: they carry no geometry) and the SAME ExB transport, but carried by the ExBVelocityPolar brick (physical components in the local basis (e_r, e_theta)).
NAMED FUNCTORS (and not extended lambdas), like block_builder.hpp (#64/#97/#133): robust device emission if the Model-template kernel is first-instantiated cross-TU. assemble_rhs_polar and its kernels are already device-clean (all validated on a CUDA device, e.g. GH200); these closures merely chain them.
Generated by