include/pops/runtime/builders/block/block_builder_polar.hpp Source File

adc_cpp: include/pops/runtime/builders/block/block_builder_polar.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_builder_polar.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <pops/mesh/geometry/geometry.hpp> // PolarGeometry
7#include <pops/mesh/boundary/physical_bc.hpp> // BCRec, fill_ghosts, fill_boundary
10#include <pops/numerics/spatial/operators/polar_operator.hpp> // assemble_rhs_polar (REUSED verbatim)
11#include <pops/numerics/time/integrators/time_steppers.hpp> // SSPRK2Step / SSPRK3Step (core RK math)
12#include <pops/parallel/comm.hpp> // all_reduce_max (MPI-safe collective reduction)
13#include <pops/physics/bricks/bricks.hpp> // ExBVelocityPolar, CompositeModel, source/elliptic bricks
14#include <pops/runtime/config/dispatch_tags.hpp> // UNIQUE registry of tags (validate_limiter/riemann)
15#include <pops/runtime/context/grid_context.hpp> // BlockClosures (light header)
16#include <pops/runtime/builders/factory/model_factory.hpp> // detail::dispatch_source / dispatch_elliptic (REUSED)
17#include <pops/runtime/dynamic/model_registry.hpp> // transport_tags_csv: polar-wired transport list (ADC-331)
19
20#include <functional>
21#include <stdexcept>
22#include <string>
23#include <utility>
24#include <vector>
25
43
44namespace pops {
45
55
56namespace detail {
57
69template <class Visitor>
70void dispatch_transport_polar(const ModelSpec& m, Visitor&& v) {
71 if (m.transport == "exb")
72 return v(ExBVelocityPolar{Real(m.B0)});
73 if (m.transport == "isothermal")
75 // Wired polar transports = the registry rows with polar_ok (model_registry.hpp); the list is
76 // single-sourced via transport_tags_csv(/*polar=*/true). 'compressible' (Euler with energy) has no
77 // polar brick yet -> not polar_ok -> rejected here with the same explicit "unsupported" message.
78 throw std::runtime_error("polar transport '" + m.transport +
79 "' unsupported (wired in polar: " + transport_tags_csv(/*polar=*/true) +
80 "; 'compressible' (Euler with energy) in polar is a later phase)");
81}
82
94template <class Visitor>
95void dispatch_model_polar(const ModelSpec& m, Visitor&& visitor) {
96 dispatch_transport_polar(m, [&](auto tr) {
97 using TR = decltype(tr);
98 // AUTOMATIC resolution by roles (audit sec.5), IDENTICAL to the cartesian one (bind_variable_roles
99 // from model_factory.hpp). ExBVelocityPolar (density=0) / IsothermalFluxPolar (rho=0, m_x=1, m_y=2,
100 // inherits from IsothermalFlux) declare canonical roles -> resolved indices == defaults ->
101 // bit-identical. Resolved at construction (host); never on device.
102 const VariableSet cons = TR::conservative_vars();
103 dispatch_source<TR::n_vars>(m, [&](auto src) {
104 dispatch_elliptic(m, [&](auto ell) {
105 bind_variable_roles(src, cons);
106 bind_variable_roles(ell, cons);
107 visitor(CompositeModel<TR, decltype(src), decltype(ell)>{tr, src, ell});
108 });
109 });
110 });
111}
112
116inline void fill_ghosts_polar(MultiFab& U, const Box2D& dom, const BCRec& bc) {
117 fill_ghosts(U, dom, bc);
118}
119
124template <class Limiter, class Flux, class Model>
126 Model model;
131 void operator()(MultiFab& U, MultiFab& R) const {
133 assemble_rhs_polar<Limiter, Flux>(model, U, *ctx->aux, ctx->geom, R, recon_prim, wall_radial,
134 pos_floor);
135 }
136};
137
140template <class Limiter, class Flux, class Model, class Stepper = SSPRK2Step>
142 Model m;
147 void operator()(MultiFab& U, Real dt, int n) const {
148 const Real h = dt / static_cast<Real>(n);
150 run_explicit_substeps<Stepper>(rhs, U, h, n);
151 }
152};
153
155template <class Limiter, class Flux, class Model>
157 Model m;
162 void operator()(MultiFab& U, MultiFab& R) const {
164 assemble_rhs_polar<Limiter, Flux>(m, U, *ctx.aux, ctx.geom, R, recon_prim, wall_radial,
165 pos_floor);
166 }
167};
168
173template <class Model>
175 Model m;
176 const MultiFab* aux;
177 Real operator()(const MultiFab& U) const {
178 Real wmax = Real(0);
179 for (int li = 0; li < U.local_size(); ++li) {
180 const ConstArray4 u = U.fab(li).const_array();
181 const ConstArray4 a = aux->fab(li).const_array();
182 const Box2D v = U.box(li);
183 for (int j = v.lo[1]; j <= v.hi[1]; ++j)
184 for (int i = v.lo[0]; i <= v.hi[0]; ++i) {
185 const typename Model::State us = load_state<Model>(u, i, j);
186 const Aux ac = load_aux<aux_comps<Model>()>(a, i, j);
187 for (int dir = 0; dir < 2; ++dir) {
188 const Real w = m.max_wave_speed(us, ac, dir);
189 if (w > wmax)
190 wmax = w;
191 }
192 }
193 }
194 return static_cast<Real>(all_reduce_max(static_cast<double>(wmax)));
195 }
196};
197
202template <class Model>
204 Model m;
205 void operator()(const MultiFab& U, MultiFab& rhs) const {
206 for (int li = 0; li < rhs.local_size(); ++li) {
207 Array4 r = rhs.fab(li).array();
208 const ConstArray4 u = U.fab(li).const_array();
209 const Box2D b = rhs.box(li);
210 for (int j = b.lo[1]; j <= b.hi[1]; ++j)
211 for (int i = b.lo[0]; i <= b.hi[0]; ++i)
212 r(i, j) += m.elliptic_rhs(load_state<Model>(u, i, j));
213 }
214 }
215};
216
217} // namespace detail
218
231inline void derive_aux_polar(const MultiFab& phi, MultiFab& aux, const PolarGeometry& g) {
232 const Real dr = g.dr(), dth = g.dtheta();
233 for (int li = 0; li < aux.local_size(); ++li) {
234 const ConstArray4 p = phi.fab(li).const_array();
235 Array4 a = aux.fab(li).array();
236 const Box2D v = aux.box(li);
237 const int ilo = v.lo[0], ihi = v.hi[0], jlo = v.lo[1], jhi = v.hi[1];
238 for (int j = jlo; j <= jhi; ++j) {
239 const int jm = (j == jlo) ? jhi : j - 1; // theta periodic: index wrap (no ghost)
240 const int jp = (j == jhi) ? jlo : j + 1;
241 for (int i = ilo; i <= ihi; ++i) {
242 const Real ri = g.r_cell(i);
243 a(i, j, 0) = p(i, j);
244 Real
245 gr; // grad_r = d phi/dr: centered in the interior, one-sided second order at the walls (phi without ghost in r)
246 if (i == ilo)
247 gr = (Real(-3) * p(i, j) + Real(4) * p(i + 1, j) - p(i + 2, j)) / (Real(2) * dr);
248 else if (i == ihi)
249 gr = (Real(3) * p(i, j) - Real(4) * p(i - 1, j) + p(i - 2, j)) / (Real(2) * dr);
250 else
251 gr = (p(i + 1, j) - p(i - 1, j)) / (Real(2) * dr);
252 a(i, j, 1) = gr;
253 a(i, j, 2) = (p(i, jp) - p(i, jm)) /
254 (Real(2) * dth * ri); // grad_theta = (1/r) d phi/d theta (already /r)
255 }
256 }
257 }
258}
259
264template <class Limiter, class Flux, class Model>
265BlockClosures build_block_polar(const Model& m, const PolarGridContext& ctx, bool recon_prim,
266 const std::string& method, bool wall_radial,
267 Real pos_floor = Real(0)) {
268 BlockClosures bc;
269 if (method == "ssprk3") {
271 m, ctx, recon_prim, wall_radial, pos_floor};
272 } else if (method == "ssprk2") {
274 m, ctx, recon_prim, wall_radial, pos_floor};
275 } else {
276 throw std::runtime_error("System (polar): unknown explicit time method '" + method +
277 "' (ssprk2|ssprk3)");
278 }
279 bc.rhs_into =
280 detail::PolarRhsInto<Limiter, Flux, Model>{m, ctx, recon_prim, wall_radial, pos_floor};
281 return bc;
282}
283
297template <class Model>
298BlockClosures make_block_polar(const Model& m, const std::string& lim, const std::string& riem,
299 const PolarGridContext& ctx, bool recon_prim,
300 const std::string& method, bool wall_radial,
301 Real pos_floor = Real(0)) {
302 // CENTRALIZED VALIDATION (registry dispatch_tags.hpp) BEFORE the dispatch: in polar, rusanov AND
303 // hll are wired (hll since the rest of the audit); HLLC/Roe and unknown tags raise the polar
304 // message of the registry. The CAPABILITY GUARD (hll requires model.wave_speeds) stays an
305 // `if constexpr` PER MODEL below, with its dedicated "requires ..." message.
306 validate_riemann(riem, /*polar=*/true, "System (polar)");
307 validate_limiter(lim, "System (polar)");
308 if (riem == "rusanov") {
309 if (lim == "none")
310 return build_block_polar<NoSlope, RusanovFlux>(m, ctx, recon_prim, method, wall_radial,
311 pos_floor);
312 if (lim == "minmod")
313 return build_block_polar<Minmod, RusanovFlux>(m, ctx, recon_prim, method, wall_radial,
314 pos_floor);
315 if (lim == "vanleer")
316 return build_block_polar<VanLeer, RusanovFlux>(m, ctx, recon_prim, method, wall_radial,
317 pos_floor);
318 if (lim == "weno5")
319 return build_block_polar<Weno5, RusanovFlux>(m, ctx, recon_prim, method, wall_radial,
320 pos_floor);
321 throw_registry_dispatch_mismatch("System (polar)", "limiter", lim);
322 }
323 if (riem == "hll") {
324 // GATE IDENTICAL TO THE CARTESIAN ONE (block_builder.hpp make_block, 'hll' branch): HLL is available
325 // as soon as a model exposes its SIGNED wave speeds model.wave_speeds (the polar isothermal fluid
326 // inherits them from IsothermalFlux). No pressure required (unlike HLLC/Roe). A SCALAR transport
327 // without signed wave (ExBVelocityPolar) does NOT satisfy the requires -> CLEAR error
328 // (not a compilation failure for a scalar model). assemble_rhs_polar<Limiter, HLLFlux>
329 // is already device-clean (named functors, flux REUSED verbatim from the cartesian one).
330 if constexpr (requires(const Model mm, typename Model::State s, Aux a, Real r) {
331 mm.wave_speeds(s, a, 0, r, r);
332 }) {
333 if (lim == "none")
334 return build_block_polar<NoSlope, HLLFlux>(m, ctx, recon_prim, method, wall_radial,
335 pos_floor);
336 if (lim == "minmod")
337 return build_block_polar<Minmod, HLLFlux>(m, ctx, recon_prim, method, wall_radial,
338 pos_floor);
339 if (lim == "vanleer")
340 return build_block_polar<VanLeer, HLLFlux>(m, ctx, recon_prim, method, wall_radial,
341 pos_floor);
342 if (lim == "weno5")
343 return build_block_polar<Weno5, HLLFlux>(m, ctx, recon_prim, method, wall_radial,
344 pos_floor);
345 throw_registry_dispatch_mismatch("System (polar)", "limiter", lim);
346 } else {
347 throw std::runtime_error(
348 "System (polar): flux 'hll' requires signed wave speeds (model.wave_speeds); "
349 "the scalar ExB transport does not provide them -> 'rusanov'. The polar isothermal fluid "
350 "(transport='isothermal') declares them and accepts 'hll'.");
351 }
352 }
353 throw_registry_dispatch_mismatch("System (polar)", "Riemann flux", riem);
354}
355
358template <class Model>
359std::function<Real(const MultiFab&)> make_max_speed_polar(const Model& m, const MultiFab* aux) {
360 return detail::PolarMaxSpeed<Model>{m, aux};
361}
362
363namespace detail {
368template <class Model>
370 Model m;
371 const MultiFab* aux;
372 Real operator()(const MultiFab& U) const { return max_stability_speed_mf(m, U, *aux); }
373};
374template <class Model>
376 Model m;
377 const MultiFab* aux;
378 Real operator()(const MultiFab& U) const { return max_source_frequency_mf(m, U, *aux); }
379};
380template <class Model>
382 Model m;
383 const MultiFab* aux;
384 Real operator()(const MultiFab& U) const { return min_stability_dt_mf(m, U, *aux); }
385};
386} // namespace detail
387
391template <class Model>
392std::function<Real(const MultiFab&)> make_cfl_speed_polar(const Model& m, const MultiFab* aux) {
393 if constexpr (HasStabilitySpeed<Model>)
395 else
396 return detail::PolarMaxSpeed<Model>{m, aux};
397}
398
401template <class Model>
402std::function<Real(const MultiFab&)> make_source_frequency_polar(const Model& m,
403 const MultiFab* aux) {
404 if constexpr (HasSourceFrequency<Model>)
405 return detail::PolarSourceFreq<Model>{m, aux};
406 else
407 return {};
408}
409
411template <class Model>
412std::function<Real(const MultiFab&)> make_stability_dt_polar(const Model& m, const MultiFab* aux) {
413 if constexpr (HasStabilityDt<Model>)
414 return detail::PolarStabilityDt<Model>{m, aux};
415 else
416 return {};
417}
418
420template <class Model>
421std::function<void(const MultiFab&, MultiFab&)> make_poisson_rhs_polar(const Model& m) {
423}
424
425} // namespace pops
BoxArray: the set of boxes tiling a level (disjoint, covering).
Umbrella for composable GENERIC physics bricks (compat).
ConstArray4 const_array() const
READ handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
Definition fab2d.hpp:96
Array4 array()
WRITE handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
Definition fab2d.hpp:91
Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp...
Definition multifab.hpp:33
Fab2D & fab(int li)
Local fab at index li (0 <= li < local_size()), for writing.
Definition multifab.hpp:67
const Box2D & box(int li) const
VALID box of local fab li.
Definition multifab.hpp:71
int local_size() const
Number of fabs OWNED by this rank (bound on local indices).
Definition multifab.hpp:65
Parallel seam: minimal MPI abstraction (rank/size + collectives) with serial fallback.
OPTIONAL trait: local source frequency mu [1/s] (bound dt <= cfl / max mu, without h).
Definition physical_model.hpp:137
OPTIONAL trait: direct admissible step per cell (bound dt <= min stability_dt, without cfl).
Definition physical_model.hpp:143
OPTIONAL trait: stability speed lambda* replacing max_wave_speed in the block CFL.
Definition physical_model.hpp:131
SINGLE registry of spatial scheme tags (limiters + Riemann fluxes): shared source of truth for ALL di...
Geometry: index-space (Box2D) <-> Cartesian physical-space mapping; PolarGeometry: SIBLING for a glob...
Block grid context plus closures, shared between System (which installs them) and block_builder....
Assemble a CompositeModel from a ModelSpec (bricks + parameters).
SINGLE registry of builtin MODEL BRICK tags (transport / source / elliptic): the shared source of tru...
Flat specification of a model: chosen bricks plus their parameters.
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab).
void 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).
Definition block_builder_polar.hpp:116
void dispatch_model_polar(const ModelSpec &m, Visitor &&visitor)
Assembles the POLAR CompositeModel designated by m and calls visitor(model).
Definition block_builder_polar.hpp:95
POPS_COLD_FN void dispatch_elliptic(const ModelSpec &m, Visitor &&v)
Builds the elliptic right-hand-side brick and calls v(elliptic).
Definition model_factory.hpp:105
POPS_COLD_FN void bind_variable_roles(Brick &brk, const VariableSet &cons)
AUTOMATIC resolution by ROLES (audit sec.5): fills the component indices of a SOURCE or ELLIPTIC bric...
Definition model_factory.hpp:135
void dispatch_transport_polar(const ModelSpec &m, Visitor &&v)
Builds the POLAR transport brick and calls v(transport).
Definition block_builder_polar.hpp:70
Definition amr_hierarchy.hpp:29
std::function< Real(const MultiFab &)> make_source_frequency_polar(const Model &m, const MultiFab *aux)
Max source frequency of the POLAR block (HasSourceFrequency trait); EMPTY without the trait (the step...
Definition block_builder_polar.hpp:402
void throw_registry_dispatch_mismatch(const char *ctx, const char *kind, const std::string &tag)
DEFENSE-IN-DEPTH guard: reached only if a VALID tag (already accepted by validate_*) is routed by NO ...
Definition dispatch_tags.hpp:138
void validate_riemann(const std::string &riem, bool polar=false, const char *ctx="System")
Validates a Riemann FLUX tag against kRiemanns.
Definition dispatch_tags.hpp:111
std::function< Real(const MultiFab &)> make_stability_dt_polar(const Model &m, const MultiFab *aux)
Min admissible step of the POLAR block (HasStabilityDt trait); EMPTY without the trait.
Definition block_builder_polar.hpp:412
double Real
Definition types.hpp:30
BlockClosures 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.
Definition block_builder_polar.hpp:298
void validate_limiter(const std::string &lim, const char *ctx="System")
Validates a LIMITER tag against kLimiters.
Definition dispatch_tags.hpp:99
Real min_stability_dt_mf(const Model &model, const MultiFab &U, const MultiFab &aux)
Global min of the declared admissible step (HasStabilityDt trait), via max(1/dt) (cf.
Definition wave_speed.hpp:222
std::function< Real(const MultiFab &)> make_cfl_speed_polar(const Model &m, const MultiFab *aux)
CFL speed of the POLAR block: lambda* (HasStabilitySpeed trait) if the model declares it,...
Definition block_builder_polar.hpp:392
Real max_source_frequency_mf(const Model &model, const MultiFab &U, const MultiFab &aux)
Global max of the source frequency (HasSourceFrequency trait). 0 if the source does not constrain.
Definition wave_speed.hpp:209
double all_reduce_max(double x)
Definition comm.hpp:146
std::function< void(const MultiFab &, MultiFab &)> make_poisson_rhs_polar(const Model &m)
Block contribution to the POLAR Poisson right-hand side: rhs += elliptic_rhs(U) (host loop).
Definition block_builder_polar.hpp:421
std::string transport_tags_csv(bool polar=false)
Pipe list of transport tags ("exb|compressible|isothermal"), as used in the dispatch rejection messag...
Definition model_registry.hpp:114
Real max_stability_speed_mf(const Model &model, const MultiFab &U, const MultiFab &aux)
Global max of the STABILITY speed (HasStabilitySpeed trait) – counterpart of max_wave_speed_mf.
Definition wave_speed.hpp:197
BlockClosures 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).
Definition block_builder_polar.hpp:265
std::function< Real(const MultiFab &)> make_max_speed_polar(const Model &m, const MultiFab *aux)
Max wave-speed closure of the POLAR block (for the CFL step).
Definition block_builder_polar.hpp:359
void 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 PolarPoiss...
Definition block_builder_polar.hpp:231
void fill_ghosts(MultiFab &mf, const Box2D &domain, const BCRec &bc)
COMPLETE ghost filling: fill_boundary (interior + periodic, periodicity deduced from bc) THEN fill_ph...
Definition physical_bc.hpp:227
Single-interface numerical flux policies: Rusanov, HLL, HLLC, Roe.
PHYSICAL boundary conditions at the domain edge (BCType, BCRec, fill_physical_bc, fill_ghosts).
Additive POLAR spatial operator: R = -div_polar F + S on an annular grid (r, theta).
Interface reconstruction policies: MUSCL limiters and WENO5-Z.
WRITE POD handle (raw pointer + strides) over a Fab2D buffer, indexed by (i, j, c) IN GLOBAL INDICES ...
Definition fab2d.hpp:29
POINTWISE auxiliary fields shared with the physics: single coupling channel.
Definition state.hpp:123
Boundary conditions for the FOUR faces of the domain (type + associated Dirichlet value).
Definition physical_bc.hpp:29
Compiled block closures, frozen at add time.
Definition grid_context.hpp:61
std::function< void(MultiFab &, Real, int)> advance
(U, dt, n): n substeps of dt/n
Definition grid_context.hpp:62
std::function< void(MultiFab &, MultiFab &)> rhs_into
R <- -div F + S (Poisson frozen)
Definition grid_context.hpp:66
2D integer index space, cell-centered.
Definition box2d.hpp:37
int hi[2]
Definition box2d.hpp:39
int lo[2]
Definition box2d.hpp:38
Composite physical model: one HYPERBOLIC brick + one source + one elliptic right-hand side.
Definition composite.hpp:30
READ-only handle (const counterpart of Array4): same layout and same contract (POD device-copyable,...
Definition fab2d.hpp:44
Scalar advection by the E x B drift in POLAR coordinates (r, theta) – "annular polar grid" effort,...
Definition hyperbolic.hpp:81
ISOTHERMAL Euler flux in POLAR geometry (ring r, theta), 3 variables (rho, rho v_r,...
Definition hyperbolic.hpp:241
ISOTHERMAL Euler flux (p = cs2 rho), 3 variables (rho, rho u, rho v).
Definition hyperbolic.hpp:127
Brick composition of a block plus parameters.
Definition model_spec.hpp:27
std::string transport
REQUIRED (unset): "exb" | "compressible" | "isothermal".
Definition model_spec.hpp:28
double cs2
IsothermalFlux: sound speed squared.
Definition model_spec.hpp:35
double vacuum_floor
IsothermalFlux: quasi-vacuum density floor for u=m/max(rho,floor) (ADC-77).
Definition model_spec.hpp:36
double B0
ExBVelocity: magnetic field.
Definition model_spec.hpp:33
Definition geometry.hpp:59
POPS_HD Real r_cell(int i) const
Radius at the CENTER of radial cell i (i = 0 -> r_min + dr/2).
Definition geometry.hpp:73
POPS_HD Real dr() const
Definition geometry.hpp:70
POPS_HD Real dtheta() const
Definition geometry.hpp:71
POLAR mesh + transport BC + aux shared by a block's closures (counterpart of GridContext).
Definition block_builder_polar.hpp:49
MultiFab * aux
System's aux (phi, grad_r, grad_theta); NOT owned.
Definition block_builder_polar.hpp:53
PolarGeometry geom
ring (r_min, r_max, dr, dtheta)
Definition block_builder_polar.hpp:52
BCRec bc
BC: r (xlo/xhi) physical, theta (ylo/yhi) periodic.
Definition block_builder_polar.hpp:51
Box2D dom
index domain (without ghost): nx() = nr, ny() = ntheta
Definition block_builder_polar.hpp:50
A model's variable set: kind (cons/prim), names, size, canonical roles (optional, parallel to names; ...
Definition variables.hpp:58
EXPLICIT polar advance: n substeps of the Stepper stepper (SSPRK2 by default, SSPRK3 optional) on the...
Definition block_builder_polar.hpp:141
void operator()(MultiFab &U, Real dt, int n) const
Definition block_builder_polar.hpp:147
Model m
Definition block_builder_polar.hpp:142
PolarGridContext ctx
Definition block_builder_polar.hpp:143
bool recon_prim
Definition block_builder_polar.hpp:144
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition block_builder_polar.hpp:146
bool wall_radial
Definition block_builder_polar.hpp:145
Polar residual functor R = -div_polar F + S (fill_ghosts then assemble_rhs_polar).
Definition block_builder_polar.hpp:125
bool wall_radial
Definition block_builder_polar.hpp:129
void operator()(MultiFab &U, MultiFab &R) const
Definition block_builder_polar.hpp:131
Model model
Definition block_builder_polar.hpp:126
bool recon_prim
Definition block_builder_polar.hpp:128
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition block_builder_polar.hpp:130
const PolarGridContext * ctx
Definition block_builder_polar.hpp:127
Max wave-speed functor of the POLAR block: reduction over the valid cells of max_wave_speed(model,...
Definition block_builder_polar.hpp:174
Model m
Definition block_builder_polar.hpp:175
Real operator()(const MultiFab &U) const
Definition block_builder_polar.hpp:177
const MultiFab * aux
Definition block_builder_polar.hpp:176
POLAR Poisson contribution functor: rhs += elliptic_rhs(U) (pure HOST loop).
Definition block_builder_polar.hpp:203
void operator()(const MultiFab &U, MultiFab &rhs) const
Definition block_builder_polar.hpp:205
Model m
Definition block_builder_polar.hpp:204
Frozen polar residual (fill_ghosts + assemble_rhs_polar) installed as the block's rhs_into (eval_rhs)...
Definition block_builder_polar.hpp:156
bool wall_radial
Definition block_builder_polar.hpp:160
Model m
Definition block_builder_polar.hpp:157
bool recon_prim
Definition block_builder_polar.hpp:159
PolarGridContext ctx
Definition block_builder_polar.hpp:158
void operator()(MultiFab &U, MultiFab &R) const
Definition block_builder_polar.hpp:162
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition block_builder_polar.hpp:161
Definition block_builder_polar.hpp:375
Model m
Definition block_builder_polar.hpp:376
const MultiFab * aux
Definition block_builder_polar.hpp:377
Real operator()(const MultiFab &U) const
Definition block_builder_polar.hpp:378
Definition block_builder_polar.hpp:381
Model m
Definition block_builder_polar.hpp:382
const MultiFab * aux
Definition block_builder_polar.hpp:383
Real operator()(const MultiFab &U) const
Definition block_builder_polar.hpp:384
Optional STEP BOUND closures of the POLAR block (StabilityPolicy, audit wave 3): same device reductio...
Definition block_builder_polar.hpp:369
Real operator()(const MultiFab &U) const
Definition block_builder_polar.hpp:372
const MultiFab * aux
Definition block_builder_polar.hpp:371
Model m
Definition block_builder_polar.hpp:370
Time integrators as first-class OBJECTS with a take_step method: TimeStepper concept,...
Base scalar types and the POPS_HD macro (host+device portability).