detail Namespace 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
|
Classes | |
| struct | AddScaledComponentKernel |
| NAMED functor (not an POPS_HD lambda) of the accumulation: r(i,j,0) += a * u(i,j,c). More... | |
| struct | AdvanceExplicit |
EXPLICIT advance: n substeps of the Stepper stepper (SSPRK2 by default, SSPRK3 optional) on the transport+source residual. More... | |
| struct | AdvanceExplicitEb |
CUT-CELL / EB EXPLICIT advance: n substeps of the Stepper stepper on the EB transport residual. More... | |
| struct | AdvanceExplicitMasked |
MASKED EXPLICIT advance: n substeps of the Stepper stepper on the MASKED transport residual. More... | |
| struct | AdvanceFab1cKernel |
| Explicit Euler, 1 component: U -= dt div(F) on cell (i,j). More... | |
| struct | AdvanceImex |
| IMEX advance: per substep, EXPLICIT half-step (source-free transport) + stiff IMPLICIT source. More... | |
| struct | AdvanceImexEb |
| CUT-CELL / EB IMEX advance: EB EXPLICIT half-step (source-free transport) + stiff IMPLICIT source. More... | |
| struct | AdvanceImexMasked |
| MASKED IMEX advance: MASKED EXPLICIT half-step (source-free transport) + stiff IMPLICIT source. More... | |
| struct | AdvanceImexRkArs222 |
| IMEX-RK ARS(2,2,2) advance (Ascher, Ruuth, Spiteri 1997; "Implicit-explicit Runge-Kutta methods
for time-dependent partial differential equations", Appl. More... | |
| struct | AmrBlockBuildArgs |
| Non-model inputs of a MULTI-block AMR build (the fields the build_multi visitor read off the BlockSpec). More... | |
| struct | AmrLevelMF |
| struct | ApplyLaplacianKernel |
| struct | AssembleRhsHllCachedKernel |
AssembleRhsHllCachedKernel: kernel of the residual R = -div Fhat + S for the HLL flux with wave speeds PRE-COMPUTED per cell (scratch ws, 4 components). More... | |
| struct | AssembleRhsKernel |
| AssembleRhsKernel<Limiter,NumericalFlux,Model>: device kernel of the central residual of assemble_rhs. More... | |
| struct | AssembleRhsMaskedKernel |
| AssembleRhsMaskedKernel: variant of AssembleRhsKernel AWARE of a domain mask. More... | |
| struct | AverageDownKernel |
| CONSERVATIVE average of an r x r block: C(I, J, c) = (sum of the r^2 fine cells) * inv. More... | |
| struct | AvgDownMultiKernel |
| struct | BackwardEulerSourceKernel |
| struct | BackwardEulerSourceStatKernel |
| struct | BCFaceXHiKernel |
| struct | BCFaceXLoKernel |
| struct | BCFaceYHiKernel |
| struct | BCFaceYLoKernel |
| struct | BlockBuildArgs |
| The non-model inputs of a Cartesian block build (a thin bundle so the seam signature stays fixed). More... | |
| struct | BlockRhsEval |
| Residual functor -div F + S (fill_ghosts then assemble_rhs), passed TO THE TimeStepper as RhsEval. More... | |
| struct | BlockRhsEvalEb |
CUT-CELL / EB transport residual (CutCell mode): fill_ghosts then assemble_rhs_eb on the level set of the System embedded boundary (read via eb_domain, pointer to Impl::eb_domain_, stable address). More... | |
| struct | BlockRhsEvalMasked |
MASKED transport residual (Staircase mode): fill_ghosts then assemble_rhs_masked on the cell-centered 0/1 mask of the System (read via mask, pointer to Impl::domain_mask_, stable address). More... | |
| struct | BuiltBlock |
| Everything System::add_block reads back from the (former) dispatch_model visitor. More... | |
| struct | CopyBzKernel |
| Copies the B_z field (aux channel) into an internal scalar MultiFab (0 ghost is enough, read at (i,j)). More... | |
| struct | CopyComp0Kernel |
| struct | CopyShiftedKernel |
| struct | CutFraction |
| Geometric result of crossing a cut cell: 4 cut distances per face, the 4 apertures alpha_f normalized in [0, 1] (alpha_f = face_distance / h), and the volume fraction kappa of the cell (share of the cell in the active domain). More... | |
| struct | DiscDomain |
| CIRCLE / DISC level-set domain: the canonical instance of the contract and the SINGLE SOURCE of truth for the active circular domain (a disc of radius R; see docs/HOFFART_FIDELITY.md for the reference scenario it was validated against). More... | |
| struct | DiscLevelSet |
| Device-safe adapter wrapping a DiscDomain as the Real(Real, Real) callable expected by cut_fraction and the EB operator. More... | |
| struct | DivergenceKernel |
| struct | DotKernel |
| struct | EbAssembleRhsKernel |
| Kernel assembling the EB residual at cell (i, j): INACTIVE cell -> residual 0 (not advanced, like T2); ACTIVE cell -> R = S - (1/kappa_eff) [ (fx_{i+1} - fx_i)/dx + (fy_{j+1} - fy_i)/dy ] - wall_term. More... | |
| struct | EbFaceFluxXKernel |
| FACE FLUX kernel for x (dir 0) of the EB transport: numerical flux at the face between (i-1, j) and (i, j), WEIGHTED by the aperture alpha_x of that face. More... | |
| struct | EbFaceFluxYKernel |
| FACE FLUX kernel for y (dir 1) of the EB transport: analogue of EbFaceFluxXKernel in j. More... | |
| struct | ExtractVelocityKernel |
| Extracts the velocity v = (mx, my) / rho from the state (Density / MomentumX / MomentumY roles) into two scalar fields vx, vy. More... | |
| struct | FaceFluxXKernel |
| FaceFluxXKernel: device kernel for the flux at the radial x face (between i-1 and i). More... | |
| struct | FaceFluxYKernel |
| FaceFluxYKernel: device kernel for the flux at the y face (between j-1 and j). More... | |
| struct | FieldPostprocessKernel |
| struct | ForEachBlockProbe |
| NAMED no-op probe for the CoupledSystemLike concept. A generic lambda in the. More... | |
| struct | GsColorKernel |
| struct | HalfPlaneDomain |
| HALF-PLANE level-set domain: ls(x, y) = a*x + b*y - c, ACTIVE on the side a*x + b*y < c. More... | |
| struct | HotspotFn |
| Frozen residual (fill_ghosts + assemble_rhs) installed as the block's rhs_into. More... | |
| struct | InterpolateKernel |
| Piecewise-CONSTANT injection: F(i, j, c) receives the value of its covering coarse cell. More... | |
| struct | InvStabilityDtKernel |
| InvStabilityDtKernel: max over cells of 1/model.stability_dt. More... | |
| struct | LincombKernel |
| struct | MaxKernel |
| struct | MaxSourceFreq |
| Block max source frequency functor (HasSourceFrequency trait, bound dt <= cfl/mu without h). More... | |
| struct | MaxSpeed |
| Block max wave speed functor (max_wave_speed_mf, reduction over the seam). More... | |
| struct | MaxStabilitySpeed |
| Block max STABILITY speed functor (HasStabilitySpeed trait): replaces MaxSpeed in the CFL when the model declares stability_speed (the Riemann solvers keep max_wave_speed). More... | |
| struct | MaxWaveSpeedKernel |
| MaxWaveSpeedKernel<Model>: device reduction functor for max_wave_speed_mf. More... | |
| struct | MinKernel |
| struct | MinStabilityDt |
| Block min admissible step functor (HasStabilityDt trait; 0 = no cell constrains it). More... | |
| struct | NegateKernel |
| neg(i,j) = -src(i,j) (negation of component 0). Device-clean NAMED functor. More... | |
| struct | NewtonStatMaxKernel |
| REDUCTION kernels of the diagnostics scratch (max / sum of one component). More... | |
| struct | NewtonStatSumKernel |
| struct | NormInfKernel |
| struct | PackKernel |
| struct | PointwiseProject |
| Foncteur HOTE de la projection ponctuelle : for_each_cell du kernel sur les cellules VALIDES de chaque fab local. More... | |
| struct | PoissonResidualKernel |
| struct | PoissonRhs |
| Poisson contribution functor: rhs += elliptic_rhs(U) (pure HOST loop, no device kernel). More... | |
| struct | PolarAdvanceExplicit |
EXPLICIT polar advance: n substeps of the Stepper stepper (SSPRK2 by default, SSPRK3 optional) on the polar transport residual. More... | |
| struct | PolarApplyKernel |
| L_int(phi) = div(A grad phi) in polar (apply). More... | |
| struct | PolarAssembleRhsKernel |
| PolarAssembleRhsKernel: device kernel of the polar residual in cell (i,j). More... | |
| struct | PolarBlockRhsEval |
| Polar residual functor R = -div_polar F + S (fill_ghosts then assemble_rhs_polar). More... | |
| struct | PolarCopyKernel |
| Copy component 0 (dst <- src). More... | |
| struct | PolarFaceFluxRKernel |
| struct | PolarFaceFluxThetaKernel |
| PolarFaceFluxThetaKernel: device kernel of the flux at the azimuthal face j. More... | |
| struct | PolarInvDiagKernel |
| Computes idiag = 1 / diag of the diagonal polar stencil (for Jacobi). diag = polar_diag (< 0). More... | |
| struct | PolarJacobiApplyKernel |
| out = (f - L0 phi) / |diag| – one Jacobi iteration (point-by-point relaxation) on the DIAGONAL polar stencil (cross terms excluded from the Jacobi splitting: they stay on the right-hand side via the residual). More... | |
| struct | PolarMaxSpeed |
| 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 | PolarPoissonRhs |
| POLAR Poisson contribution functor: rhs += elliptic_rhs(U) (pure HOST loop). More... | |
| struct | PolarRhsInto |
| Frozen polar residual (fill_ghosts + assemble_rhs_polar) installed as the block's rhs_into (eval_rhs). More... | |
| struct | PolarSchurCopyComp0Kernel |
| dst <- src (component 0). More... | |
| struct | PolarSchurExplicitFluxKernel |
| EXPLICIT flux F = rho B^{-1} v^n = B^{-1}(mr, mtheta) at the center (physical components (e_r, e_theta)). More... | |
| struct | PolarSchurOperatorCoeffKernel |
| POLAR condensed tensor coefficients A = I + c rho B^{-1} at cell centers. More... | |
| struct | PolarSchurReconstructKernel |
| Reconstructs v^{n+theta} = B^{-1}(v^n - theta dt grad_polar phi^{n+theta}) and writes mom = rho^n v^{n+theta}. More... | |
| struct | PolarSchurRhsAssembleKernel |
| rhs_polar(i,j) = lap_polar(i,j) (= Lap_polar phi^n) + g * div_polar F, second-order centered POLAR divergence of a vector field F = (F_r, F_theta) at the center (ghosts filled). More... | |
| struct | PolarSourceFreq |
| struct | PolarStabilityDt |
| struct | PolarStabilitySpeed |
| 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 | ProjectCellKernel |
| Kernel device de la PROJECTION PONCTUELLE post-pas (ADC-177) : U(i, j) <- m.project(U(i, j), aux(i, j)). More... | |
| struct | RhsInto |
| struct | RusanovFaceXKernel |
| Rusanov flux at the left face (x axis) of cell (i,j). More... | |
| struct | RusanovFaceYKernel |
| Rusanov flux at the bottom face (y axis) of cell (i,j). More... | |
| struct | SaxpyKernel |
| struct | SchurEnergyKernel |
| Energy update: E^{n+1} = E^n + (1/2) rho^n (|v^{n+1}|^2 - |v^n|^2). More... | |
| struct | SchurExplicitFluxKernel |
| EXPLICIT flux F = rho B^{-1} v^n (v = (mx,my)/rho) ASSEMBLED per cell, WRITTEN at the center into fx/fy. More... | |
| struct | SchurExtrapolateScalarKernel |
| Linear extrapolation of a SCALAR field from the theta-stage to the full step: f^{n+1} = f^n + (1/theta) (f^{n+theta} - f^n). More... | |
| struct | SchurExtrapolateVelocityKernel |
| Linear extrapolation of the VELOCITY (vx, vy) from the theta-stage to the full step, then recompose mom = rho^n v^{n+1} into the state. More... | |
| struct | SchurOperatorCoeffKernel |
| Coefficients of the tensor operator A_op = I + c rho B^{-1} ASSEMBLED per cell from the fluid state and the B_z field. More... | |
| struct | SchurReconstructKernel |
| Reconstructs v^{n+theta} = B^{-1}(v^n - theta dt grad phi^{n+theta}) and writes mom = rho^n v^{n+theta} into the state. More... | |
| struct | SchurRhsAssembleKernel |
| rhs(i,j) = lap(i,j) (= -Lap phi^n, already negated by the caller) - g * div F, second-order centered divergence of a flux F at the center (fx, fy, ghosts filled). More... | |
| struct | ScopedBlockState |
| struct | SharedAmrLayout |
| SHARED layout of a multi-block AMR hierarchy (PR1 capstone), frozen at construction. More... | |
| struct | ShortleyWellerWeights |
| Shortley-Weller weights (5-point cut-cell stencil) from the 4 cut distances. More... | |
| struct | SingleModelEllipticRhsKernel |
| NAMED functor (not an POPS_HD lambda) of the single-model RHS: f(i,j,0) = model.elliptic_rhs(U). More... | |
| struct | SourceFrequencyKernel |
| SourceFrequencyKernel: max over cells of model.source_frequency (mu >= 0, 1/s). More... | |
| struct | SourceInto |
| SOURCE-ONLY residual R <- S(U, aux) installed as the block's source_only closure (ADC-430). More... | |
| struct | SourceOnlyKernel |
| SOURCE-ONLY residual kernel R(i,j) <- m.source(U(i,j), aux(i,j)): the EXACT source term of AssembleRhsKernel (cf. More... | |
| struct | StabilitySpeedKernel |
| StabilitySpeedKernel: max over cells/directions of model.stability_speed (replaces MaxWaveSpeedKernel when the trait is declared). More... | |
| struct | SumKernel |
| struct | TwoFieldChargeDensityRhsKernel |
| NAMED functor (not an POPS_HD lambda) of the two-field RHS: r(i,j,0) = a0 u0 + a1 u1. More... | |
| struct | UnpackKernel |
| struct | WaveSpeedCacheKernel |
| WaveSpeedCacheKernel: evaluates model.wave_speeds per cell in both directions and stores (lo_x, hi_x, lo_y, hi_y) in a 4-component scratch. More... | |
| struct | WaveSpeedMatchKernel |
| Locates the cell DOMINATING the CFL (dt_hotspot diagnostic, ADC-182): EQUALITY scan of the recomputed w – same functor and same data as MaxWaveSpeedKernel, hence bit-equal to the max returned by max_wave_speed_mf – which encodes the GLOBAL index j*nx + i as Real (exact as long as nx*ny < 2^53) and reduces to the MIN (first cell in lexicographic order: deterministic). More... | |
| struct | ZeroConductorKernel |
Concepts | |
| concept | PolarHasSource |
| PolarHasSource<M>: internal concept – true if M exposes source(U, aux) -> State. | |
| concept | PolarHasGeomSource |
| PolarHasGeomSource<M>: internal concept – true if M exposes polar_geom_source(u, r) -> State. | |
Functions | |
| Box2D | tag_bbox (const TagBox &tb, const Box2D ®ion) |
| Bounding box of the tagged cells in region; empty box (hi < lo) if none is tagged. | |
| long | count_in (const TagBox &tb, const Box2D &r) |
| Number of tagged cells in box r. | |
| std::vector< long > | signature (const TagBox &tb, const Box2D &r, int axis) |
| Signature of r along axis: number of tagged cells per column (axis 0) or per row (axis 1). | |
| int | best_hole (const std::vector< long > &s, int mb) |
| Interior hole (zero signature) closest to the center, in [mb, len-mb]; -1 if none. | |
| int | best_inflection (const std::vector< long > &s, int mb, long &score) |
| Inflection: index of the max |D[k] - D[k-1]| with D the discrete Laplacian of the signature, in the valid range; -1 if none. | |
| void | cluster_rec (const TagBox &tb, Box2D region, const ClusterParams &p, std::vector< Box2D > &out) |
| Berger-Rigoutsos recursive core: trim, accept if efficient/not splittable, otherwise cut and recurse. | |
| void | coupler_inject_aux_mb (const MultiFab &parent, MultiFab &child, bool replicated_parent=true) |
| void | coupler_write_coarse (MultiFab &U, const std::vector< double > &rho, int n, int ncomp, double gamma) |
| void | coupler_write_coarse_state (MultiFab &U, const std::vector< double > &state, int n, int ncomp) |
| std::vector< double > | coupler_read_coarse (const MultiFab &U, int n, bool replicated) |
| std::vector< double > | coupler_read_coarse_phi (const MultiFab &aux0, int n, bool replicated) |
| void | coupler_inject_coarse_to_fine_mb (const MultiFab &Uc, MultiFab &Uf, bool replicated) |
| std::pair< BoxArray, DistributionMapping > | coupler_make_coarse_layout (int n, bool distribute, int max_grid) |
| BCRec | derive_aux_bc (const BCRec &b) |
| Aux-channel BC derived from the potential phi BC: a periodic BC stays periodic, any other becomes Foextrap (order-0 extrapolation). | |
| template<class Bz > | |
| void | fill_bz_box (Fab2D &f, const Box2D &box, const Geometry &g, const Bz &bz) |
Writes B_z(x, y) at component kAuxBaseComps on box box of fab f, sampling bz at the cell centers of geometry g. | |
| void | validate_krylov_params (Real tol, int max_iters, const char *who) |
| Validates the Krylov tolerance / iteration budget shared by the Schur source steppers (historical constants made configurable by the audit 2026-06). | |
| template<class Model > | |
| void | coupler_eval_rhs (const MultiFab &state, MultiFab &rhs, const Model &model) |
| Assemble the single-model elliptic RHS: rhs = model.elliptic_rhs(U) on valid cells (delegated to SingleModelEllipticRhs). | |
| void | coupler_grad_phi (const MultiFab &phi, MultiFab &aux, Real cx, Real cy) |
| Set aux = (phi, d phi/dx, d phi/dy) by centered differences (factors cx, cy = 1/(2 dx), 1/(2 dy)). | |
| bool | same_level_layout (const BoxArray &a_ba, const DistributionMapping &a_dm, Real a_dx, Real a_dy, const BoxArray &b_ba, const DistributionMapping &b_dm, Real b_dx, Real b_dy) |
| void | same_layout_or_throw (const std::vector< std::vector< AmrLevelMP > > &block_levels) |
| void | copy_shifted (Fab2D &dst, const Fab2D &src, const Box2D ®ion, int sx, int sy, int ncomp) |
| void | build_halo_schedule (const MultiFab &mf, const Box2D &domain, Periodicity per, HaloSchedule &sched) |
| std::shared_ptr< const HaloSchedule > | get_halo_schedule (const MultiFab &mf, const Box2D &domain, Periodicity per) |
| std::int64_t | foreach_serial_threshold () |
| POPS_HD Real | cut_distance (Real lc, Real ln, Real h) |
| Cut distance of ONE face along a direction, starting from the active center (ls < 0). | |
| template<class LevelSet > | |
| POPS_HD CutFraction | cut_fraction (const LevelSet &ls, Real xc, Real yc, Real dx, Real dy) |
Computes the cut geometry of an ACTIVE cell (center (xc, yc) with ls < 0) from a level-set ls evaluated at the center and at the 4 cardinal neighbors at distance dx / dy. | |
| POPS_HD ShortleyWellerWeights | shortley_weller (const CutFraction &cf) |
| Real | krylov_dot (const MultiFab &x, const MultiFab &y) |
| Krylov inner product x.y, COLLECTIVE (all_reduce_sum). | |
| Real | krylov_l2_norm (const MultiFab &x) |
| GLOBAL L2 norm sqrt(sum x.x), collective (all_reduce_sum). | |
| void | require_max_iter (int max_iters) |
| Guards a dynamic solver loop: a non-positive iteration budget is a configuration error. | |
| POPS_HD Real | fac_bilerp_coarse (const ConstArray4 &C, int i, int j, int r) |
BILINEAR interpolation of the coarse potential (cell-centered, C with ghosts) at the CENTER of the fine cell (i, j). | |
| void | mg_trace_mark (const char *w) |
| POPS_HD void | face_weights (const ConstArray4 &ep, const ConstArray4 &ey, int i, int j, Real idx2, Real idy2, bool hc, const ConstArray4 &cf, Real &wxm, Real &wxp, Real &wym, Real &wyp) |
| POPS_HD Real | cross_div (const ConstArray4 &p, bool hxy, const ConstArray4 &axy, bool hyx, const ConstArray4 &ayx, int i, int j, Real idx, Real idy) |
| void | gs_color (MultiFab &phi, const MultiFab &f, const Geometry &geom, int color, const MultiFab *mask, const MultiFab *coef, const MultiFab *eps, const MultiFab *kappa=nullptr, const MultiFab *eps_y=nullptr) |
| POPS_HD Real | polar_radial_div (const ConstArray4 &p, const ConstArray4 &arr, bool hrt, const ConstArray4 &art, int i, int j, Real ri, Real rfm, Real rfp, Real idr, Real idth) |
| RADIAL FACE contribution to the diagonal + cross stencil, at (i, j). | |
| POPS_HD Real | polar_azimuthal_div (const ConstArray4 &p, const ConstArray4 &att, bool htr, const ConstArray4 &atr, int i, int j, Real ri, Real idr, Real idth) |
| AZIMUTHAL FACE contribution to the diagonal + cross stencil, at (i, j). | |
| POPS_HD Real | polar_diag (const ConstArray4 &arr, const ConstArray4 &att, int i, int j, Real ri, Real rfm, Real rfp, Real idr, Real idth) |
| Diagonal (coefficient of phi_{i,j}) of the diagonal POLAR stencil (radial + azimuthal), for the Jacobi preconditioner. | |
| template<int N> | |
| POPS_HD void | gershgorin_bounds (const Real(&A)[N][N], Real &lo, Real &hi) |
| Gershgorin bound on the REAL PARTS: every lambda of the spectrum satisfies lo <= Re(lambda) <= hi (disks centered at a_ii of radius the sum of the |off-diagonal| terms of the row). | |
| template<int N> | |
| POPS_HD void | hessenberg_reduce (Real(&H)[N][N]) |
| Upper Hessenberg reduction by Householder reflections, IN PLACE, without accumulating the transformations (eigenvalues only). | |
| POPS_HD Real | hqr_copysign (Real mag, Real sgn) |
| POPS_HD void | record_eig (Real re, Real im, Real &lmin, Real &lmax, Real &max_im, bool &first) |
| Accumulate an eigenvalue (re, im) into the current extremes. | |
| template<int N> | |
| POPS_HD bool | hqr_minmax (Real(&H)[N][N], Real &lmin, Real &lmax, Real &max_im, int max_iter_per_eig) |
| QR iteration with implicit Francis double shift on a Hessenberg matrix (EISPACK/hqr formulation, eigenvalues only, blocks processed bottom-up with deflation). | |
| template<int N> | |
| POPS_HD bool | mat_inverse (const Real(&A)[N][N], Real(&inv)[N][N], Real pivot_tol=Real(1e-300)) |
Inverse of a dense N x N matrix by Gauss-Jordan elimination with partial pivoting, into inv. | |
| template<int N> | |
| POPS_HD Real | mat_norm_inf (const Real(&A)[N][N]) |
| Max absolute row sum (infinity norm) of a dense N x N matrix. | |
| POPS_HD DiscLevelSet | disc_level_set (const DiscDomain &d) |
| Builds the disc level set callable from a DiscDomain (sugar: disc_level_set(d)). | |
| template<class LevelSet > | |
| POPS_HD bool | eb_cell_active (const LevelSet &ls, Real xc, Real yc) |
| Activity indicator (center in the disc, ls < 0) from a callable level set. POPS_HD. | |
| POPS_HD Real | eb_face_aperture (Real lc, Real ln, Real h) |
| POPS_HD bool | mask_active (const ConstArray4 &mask, int i, int j) |
| Activity indicator of a cell from a 0/1 cell-centered mask (>= 0.5 -> active). | |
| template<class Model > | |
| POPS_HD Model::State | polar_source (const Model &m, const typename Model::State &u, const Aux &a) |
| polar_source<Model>: returns m.source(u, a) if PolarHasSource<Model>, otherwise the zero state. | |
| template<class Model > | |
| POPS_HD Model::State | polar_geom_source (const Model &m, const typename Model::State &u, Real r) |
| polar_geom_source<Model>: returns m.polar_geom_source(u, r) if PolarHasGeomSource<Model>, otherwise the zero state. | |
| template<class Limiter > | |
| void | require_reconstruction_ghosts (const MultiFab &U) |
| require_reconstruction_ghosts<Limiter>: STRUCTURAL ENTRY GUARD of the FV spatial operators. | |
| template<class Model > | |
| int | positivity_comp (Real pos_floor) |
| Component of the Density role for the positivity limiter (HOST, resolved once per spatial operator call, never per cell). | |
| void | ssprk3_refill_level_ghosts (MultiFab &U, int lev, const Box2D &base_dom, Periodicity base_per, const MultiFab *pOld, const MultiFab *pNew, Real frac, bool coarse_replicated, Real pos_floor=Real(0), int pos_comp=0) |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | ssprk3_advance_level (const Model &m, AmrLevelMP &lv, Real dt, MultiFab &fx, MultiFab &fy, bool recon_prim, int lev, const Box2D &base_dom, Periodicity base_per, const MultiFab *pOld, const MultiFab *pNew, Real frac, bool coarse_replicated, Real pos_floor=Real(0)) |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | subcycle_level_mp (const Model &m, std::vector< AmrLevelMP > &L, int lev, Real dt, const Box2D &base_dom, Periodicity base_per, const MultiFab *pOld, const MultiFab *pNew, Real frac, std::vector< RegMP > *parentRegs, bool coarse_replicated=true, bool recon_prim=false, bool imex=false, const NewtonOptions &nopts={}, AmrTimeMethod tmethod=AmrTimeMethod::kEuler, Real pos_floor=Real(0)) |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | amr_step_multilevel_multipatch (const Model &m, std::vector< AmrLevelMP > &L, const Box2D &dom, Real dt, Periodicity per=Periodicity{true, true}, bool coarse_replicated=true, bool recon_prim=false, bool imex=false, const NewtonOptions &nopts={}, AmrTimeMethod tmethod=AmrTimeMethod::kEuler, Real pos_floor=Real(0)) |
| template<int N> | |
| POPS_HD bool | solve_dense (Real J[N][N], Real b[N], Real x[N], int n) |
| template<class Model , int N> | |
| POPS_HD void | assemble_newton_jacobian (const Model &m, const typename Model::State &W, const Aux &a, Real dt, const NewtonOptions &opts, const int impl[N], int m_impl, const typename Model::State &S0, Real J[N][N]) |
| template<class Model > | |
| POPS_HD Model::State | newton_source_solve (const Model &m, const typename Model::State &Un, const Aux &a, Real dt, const NewtonOptions &opts, const ImplicitMask< Model::n_vars > &mask={}, NewtonCellStat *stat=nullptr) |
| template<class Model > | |
| POPS_HD Model::State | newton_source_solve (const Model &m, const typename Model::State &Un, const Aux &a, Real dt, int iters, const ImplicitMask< Model::n_vars > &mask={}) |
| COMPATIBILITY: old signature with a bare iteration budget (iters). | |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | amr_step_2level_mf (const Model &m, MultiFab &Uc, const Box2D &dom, Real dxc, Real dyc, MultiFab &Uf, int CI0, int CI1, int CJ0, int CJ1, const MultiFab &auxc, const MultiFab &auxf, Real dt) |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | subcycle_level_mf (const Model &m, std::vector< AmrLevelMF > &L, int lev, Real dt, const Box2D &dom, const MultiFab *pOld, const MultiFab *pNew, Real frac, std::vector< Real > *pregL, std::vector< Real > *pregR, std::vector< Real > *pregB, std::vector< Real > *pregT) |
| template<class Limiter = NoSlope, class NumericalFlux = RusanovFlux, class Model > | |
| void | amr_step_multilevel_mf (const Model &m, std::vector< AmrLevelMF > &L, const Box2D &dom, Real dt) |
| std::vector< int > | resolve_implicit_components_amr (const std::string &block, const VariableSet &cons, const std::vector< std::string > &names, const std::vector< std::string > &roles) |
| AMR partial-IMEX-mask resolution, moved out of amr_system.cpp's anonymous namespace (ADC-335) so the per-transport seam TUs share one definition. | |
| template<class TR > | |
| AmrRuntimeBlock | build_amr_block_for (TR tr, const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| VERBATIM build_multi visitor body with the transport pinned: resolve the partial IMEX mask against the concrete model, map the temporal method, and produce the type-erased AmrRuntimeBlock via dispatch_amr_block. | |
| template<class TR > | |
| AmrCompiledHooks | build_amr_compiled_for (TR tr, const ModelSpec &spec, const std::string &limiter, const std::string &riemann, const AmrBuildParams &bp) |
| VERBATIM single-block visitor body with the transport pinned: produce the type-erased AmrCompiledHooks via dispatch_amr_compiled. | |
| template<class TR , class DispatchFn > | |
| AmrRuntimeBlock | build_amr_block_for_flux (TR tr, const AmrBlockBuildArgs &a, const SharedAmrLayout &S, DispatchFn dispatch) |
ADC-359 flux subdivision (compressible only): like build_amr_block_for, but the riemann dispatch is supplied by dispatch (a flux-pinned detail::dispatch_amr_block_<flux>), so each per-flux compressible seam TU instantiates ONE flux's build_amr_block leaves and they compile in parallel. | |
| template<class TR , class DispatchFn > | |
| AmrCompiledHooks | build_amr_compiled_for_flux (TR tr, const ModelSpec &spec, const std::string &limiter, const AmrBuildParams &bp, DispatchFn dispatch) |
ADC-359 flux subdivision: like build_amr_compiled_for, with the riemann dispatch supplied by dispatch (a flux-pinned detail::dispatch_amr_compiled_<flux>). | |
| AmrRuntimeBlock | build_amr_block_exb (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrRuntimeBlock | build_amr_block_isothermal (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrRuntimeBlock | build_amr_block_compressible (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrCompiledHooks | build_amr_compiled_exb (const ModelSpec &spec, const std::string &limiter, const std::string &riemann, const AmrBuildParams &bp) |
| AmrCompiledHooks | build_amr_compiled_isothermal (const ModelSpec &spec, const std::string &limiter, const std::string &riemann, const AmrBuildParams &bp) |
| AmrCompiledHooks | build_amr_compiled_compressible (const ModelSpec &spec, const std::string &limiter, const std::string &riemann, const AmrBuildParams &bp) |
| AmrRuntimeBlock | build_amr_block_compressible_rusanov (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrRuntimeBlock | build_amr_block_compressible_hll (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrRuntimeBlock | build_amr_block_compressible_hllc (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrRuntimeBlock | build_amr_block_compressible_roe (const AmrBlockBuildArgs &a, const SharedAmrLayout &S) |
| AmrCompiledHooks | build_amr_compiled_compressible_rusanov (const ModelSpec &spec, const std::string &limiter, const AmrBuildParams &bp) |
| AmrCompiledHooks | build_amr_compiled_compressible_hll (const ModelSpec &spec, const std::string &limiter, const AmrBuildParams &bp) |
| AmrCompiledHooks | build_amr_compiled_compressible_hllc (const ModelSpec &spec, const std::string &limiter, const AmrBuildParams &bp) |
| AmrCompiledHooks | build_amr_compiled_compressible_roe (const ModelSpec &spec, const std::string &limiter, const AmrBuildParams &bp) |
| template<class Visitor > | |
| void | dispatch_transport_polar (const ModelSpec &m, Visitor &&v) |
| Builds the POLAR transport brick and calls v(transport). | |
| template<class Visitor > | |
| void | dispatch_model_polar (const ModelSpec &m, Visitor &&visitor) |
Assembles the POLAR CompositeModel designated by m and calls visitor(model). | |
| 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). | |
| template<class TR , class MakeFn > | |
| 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 brick tr already chosen, and the per-leaf BlockClosures produced by make. | |
| template<class TR > | |
| BuiltBlock | build_block_for (TR tr, const ModelSpec &model, const BlockBuildArgs &a) |
| Per-transport seam body: the full make_block dispatcher (all fluxes). | |
| BuiltBlock | build_block_exb (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_isothermal_rusanov (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_isothermal_hll (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_compressible_rusanov (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_compressible_hll (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_compressible_hllc (const ModelSpec &model, const BlockBuildArgs &a) |
| BuiltBlock | build_block_compressible_roe (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) |
| template<class Model > | |
| void | apply_pointwise_project_amr (const Model &m, std::vector< AmrLevelMP > &levels) |
| void | amr_write_coarse_bz (MultiFab &bz, const std::vector< double > &field, int n) |
Fills the COARSE B_z field (component 0, n*n row-major in GLOBAL indices) from field. | |
| template<class Coupler > | |
| void | amr_schur_source (Coupler &cpl, AmrCondensedSchurSourceStepper &schur, MultiFab &bz_coarse, MultiFab &phi_coarse, double theta, double dt) |
| A GLOBAL condensed source STAGE on the mono-block coupler hierarchy. | |
| template<class Model , class Limiter , class Flux > | |
| AmrCompiledHooks | build_amr_compiled (const Model &model, const AmrBuildParams &bp) |
| Builds the AMR coupler for a composite Model + concrete (Limiter, Flux) and fills the type-erased hooks. | |
| SharedAmrLayout | make_shared_amr_layout (const AmrBuildParams &bp) |
| Builds the SHARED layout (PR1): coarse (per the ownership policy) + ONE central FIXED fine patch (the seed of build_amr_compiled, BEFORE its regrid). | |
| template<class Model , class Limiter , class Flux > | |
| AmrRuntimeBlock | build_amr_block (const Model &model, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride=1, const std::vector< int > &implicit_components={}, const NewtonOptions &nopts={}, const std::vector< double > *state=nullptr, bool newton_diagnostics=false, AmrTimeMethod time_method=AmrTimeMethod::kEuler, double pos_floor=0.0) |
Builds ONE type-erased AMR block (AmrRuntimeBlock) on the SHARED layout S, for a composite Model + concrete (Limiter, Flux). | |
| template<class Model > | |
| AmrRuntimeBlock | dispatch_amr_block_rusanov (const Model &m, const std::string &lim, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride, const std::vector< int > &implicit_components, const NewtonOptions &nopts, const std::vector< double > *state, bool newton_diagnostics, AmrTimeMethod time_method, double pos_floor) |
| template<class Model > | |
| AmrRuntimeBlock | dispatch_amr_block_hll (const Model &m, const std::string &lim, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride, const std::vector< int > &implicit_components, const NewtonOptions &nopts, const std::vector< double > *state, bool newton_diagnostics, AmrTimeMethod time_method, double pos_floor) |
| template<class Model > | |
| AmrRuntimeBlock | dispatch_amr_block_hllc (const Model &m, const std::string &lim, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride, const std::vector< int > &implicit_components, const NewtonOptions &nopts, const std::vector< double > *state, bool newton_diagnostics, AmrTimeMethod time_method, double pos_floor) |
| template<class Model > | |
| AmrRuntimeBlock | dispatch_amr_block_roe (const Model &m, const std::string &lim, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride, const std::vector< int > &implicit_components, const NewtonOptions &nopts, const std::vector< double > *state, bool newton_diagnostics, AmrTimeMethod time_method, double pos_floor) |
| template<class Model > | |
| AmrRuntimeBlock | dispatch_amr_block (const Model &m, const std::string &lim, const std::string &riem, const SharedAmrLayout &S, const std::string &name, const std::vector< double > &density, bool has_density, double gamma, int substeps, bool recon_prim, bool imex, int stride=1, const std::vector< int > &implicit_components={}, const NewtonOptions &nopts={}, const std::vector< double > *state=nullptr, bool newton_diagnostics=false, AmrTimeMethod time_method=AmrTimeMethod::kEuler, double pos_floor=0.0) |
| Dispatch of the spatial scheme (limiter x Riemann flux) -> build_amr_block. | |
| template<class Model > | |
| AmrCompiledHooks | dispatch_amr_compiled_rusanov (const Model &m, const std::string &lim, const AmrBuildParams &bp) |
| template<class Model > | |
| AmrCompiledHooks | dispatch_amr_compiled_hll (const Model &m, const std::string &lim, const AmrBuildParams &bp) |
| template<class Model > | |
| AmrCompiledHooks | dispatch_amr_compiled_hllc (const Model &m, const std::string &lim, const AmrBuildParams &bp) |
| template<class Model > | |
| AmrCompiledHooks | dispatch_amr_compiled_roe (const Model &m, const std::string &lim, const AmrBuildParams &bp) |
| template<class Model > | |
| AmrCompiledHooks | dispatch_amr_compiled (const Model &m, const std::string &lim, const std::string &riem, const AmrBuildParams &bp) |
| Dispatch of the spatial scheme (limiter x Riemann flux) -> build_amr_compiled. | |
| void | validate_model_spec (const ModelSpec &m) |
Completeness contract of a ModelSpec (ADC-290): transport and elliptic MUST be chosen explicitly. | |
| template<class Visitor > | |
| POPS_COLD_FN void | dispatch_transport (const ModelSpec &m, Visitor &&v) |
| Non-drift guard (ADC-331): the registry's n_vars column (model_registry.hpp, a LIGHT header with no brick types) MUST agree with the real brick types' ::n_vars. | |
| template<int NV, class Visitor > | |
| POPS_COLD_FN void | dispatch_source (const ModelSpec &m, Visitor &&v) |
| Builds the source brick and calls v(source). | |
| template<class Visitor > | |
| POPS_COLD_FN void | dispatch_elliptic (const ModelSpec &m, Visitor &&v) |
| Builds the elliptic right-hand-side brick and calls v(elliptic). | |
| template<class Brick > | |
| 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 brick (c_rho / c_mx / c_my / c_E) from the conservative descriptor cons of the TRANSPORT. | |
| template<class Visitor > | |
| POPS_COLD_FN void | dispatch_model (const ModelSpec &m, Visitor &&visitor) |
Assembles the CompositeModel designated by m and calls visitor(model). | |
| template<class TR , class Visitor > | |
| 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). | |
| 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 conserved-component indices, against the block descriptor cons. | |
| POPS_COLD_FN int | resolve_selected_component (const std::string &origin, const std::string &block, const VariableSet &cons, const std::string &name, const std::string &role) |
Resolves a SINGLE selector variable of block (the AMR regrid variable, ADC-296) into its conserved-component index, by NAME (name) XOR by physical ROLE (role), against cons. | |
| constexpr bool | ct_str_eq (const char *a, const char *b) |
| COMPILE-TIME C string equality (no constexpr <cstring> guaranteed everywhere). | |
| std::function< bool(Real, Real)> | wall_predicate (const std::string &wall, double wall_radius, double L, const std::string &err_context) |
Builds the "inside the conductor" predicate (embedded wall for the Poisson solver) from the wall mode wall, the radius wall_radius and the domain size L. | |
| std::string | abi_key_string () |
| ABI key of the current TU (cf. | |
| template<class TagT , std::size_t N> | |
| std::string | join_tag_names (const TagT(&tbl)[N], const char *sep, bool quote) |
Joins the name field of a tag table into "a<sep>b<sep>..." (optionally each name single-quoted). | |
Variables | |
| template<class > | |
| constexpr bool | amr_always_false_v = false |
| template<class > | |
| constexpr bool | always_false_v = false |
| constexpr Real | kKrylovTiny = Real(1e-300) |
| Tiny breakdown guard for the BiCGStab scalar recurrences (division by ~0). | |
| constexpr Real | kEbFaceOpenEps = Real(1e-6) |
| Default aperture below which a face is treated as CLOSED (immersed wall). | |
| constexpr Real | kEbKappaMin = Real(1e-2) |
| constexpr bool | kHasGpuBackend |
| True iff this translation unit is compiled for a real GPU device backend. | |
| constexpr bool | kHasMpi |
Function Documentation
◆ abi_key_string()
|
inline |
ABI key of the current TU (cf.
POPS_ABI_KEY_LITERAL). Kept for the MODULE side (out-of-line abi_key() in system.cpp); a generated LOADER must return POPS_ABI_KEY_LITERAL directly (literal local to its TU, insensitive to ELF interposition – cf. above).
◆ amr_schur_source()
| void pops::detail::amr_schur_source | ( | Coupler & | cpl, |
| AmrCondensedSchurSourceStepper & | schur, | ||
| MultiFab & | bz_coarse, | ||
| MultiFab & | phi_coarse, | ||
| double | theta, | ||
| double | dt | ||
| ) |
A GLOBAL condensed source STAGE on the mono-block coupler hierarchy.
Seeds the warm-start phi^n (= aux0 component 0, i.e. the coarse Poisson solve of the last update()), then runs the condensed stage (AmrCondensedSchurSourceStepper) which assembles/solves its OWN condensed operator on the coarse grid and reconstructs the velocity (rho frozen, mom/E updated). In mono-level (no fine patch) this is bit-for-bit the uniform stage #126.
Here is the call graph for this function:
Here is the caller graph for this function:◆ amr_step_2level_mf()
| void pops::detail::amr_step_2level_mf | ( | const Model & | m, |
| MultiFab & | Uc, | ||
| const Box2D & | dom, | ||
| Real | dxc, | ||
| Real | dyc, | ||
| MultiFab & | Uf, | ||
| int | CI0, | ||
| int | CI1, | ||
| int | CJ0, | ||
| int | CJ1, | ||
| const MultiFab & | auxc, | ||
| const MultiFab & | auxf, | ||
| Real | dt | ||
| ) |
Here is the call graph for this function:◆ amr_step_multilevel_mf()
| void pops::detail::amr_step_multilevel_mf | ( | const Model & | m, |
| std::vector< AmrLevelMF > & | L, | ||
| const Box2D & | dom, | ||
| Real | dt | ||
| ) |
◆ amr_step_multilevel_multipatch()
| void pops::detail::amr_step_multilevel_multipatch | ( | const Model & | m, |
| std::vector< AmrLevelMP > & | L, | ||
| const Box2D & | dom, | ||
| Real | dt, | ||
| Periodicity | per = Periodicity{true, true}, |
||
| bool | coarse_replicated = true, |
||
| bool | recon_prim = false, |
||
| bool | imex = false, |
||
| const NewtonOptions & | nopts = {}, |
||
| AmrTimeMethod | tmethod = AmrTimeMethod::kEuler, |
||
| Real | pos_floor = Real(0) |
||
| ) |
◆ amr_write_coarse_bz()
|
inline |
Fills the COARSE B_z field (component 0, n*n row-major in GLOBAL indices) from field.
Scalar counterpart of coupler_write_coarse (identical box traversal, replicated mono-box AND distributed multi-box): B_z is required by the Schur-condensed source stage (Lorentz term).
Here is the call graph for this function:
Here is the caller graph for this function:◆ apply_pointwise_project_amr()
| void pops::detail::apply_pointwise_project_amr | ( | const Model & | m, |
| std::vector< AmrLevelMP > & | levels | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ assemble_newton_jacobian()
|
inline |
◆ best_hole()
|
inline |
Interior hole (zero signature) closest to the center, in [mb, len-mb]; -1 if none.
Here is the caller graph for this function:◆ best_inflection()
|
inline |
Inflection: index of the max |D[k] - D[k-1]| with D the discrete Laplacian of the signature, in the valid range; -1 if none.
- Parameters
-
score receives the score of the retained max (output).
Here is the caller graph for this function:◆ bind_variable_roles()
| POPS_COLD_FN void pops::detail::bind_variable_roles | ( | Brick & | brk, |
| const VariableSet & | cons | ||
| ) |
AUTOMATIC resolution by ROLES (audit sec.5): fills the component indices of a SOURCE or ELLIPTIC brick (c_rho / c_mx / c_my / c_E) from the conservative descriptor cons of the TRANSPORT.
This is a TRANSPARENT resolution, with no new user parameter: the native bricks adapt to the transport layout (density/momentum/energy located by their ROLE and not by a hard-coded index). An index is only WRITTEN if the role exists in cons; otherwise the brick KEEPS its canonical default (historical behavior for a transport without roles).
Member detection via requires (if constexpr): the bricks have HETEROGENEOUS index sets (PotentialForce/GravityForce: rho/mx/my/E; MagneticLorentzForce: mx/my only; ChargeDensity/Background/GravityCoupling: rho; NoSource: none); only the EXISTING members are touched. CompositeSource<A,B> has no indices of its own: we recurse into its two sub-bricks.
BIT-IDENTICAL for the NATIVE transports: Euler (rho=0, m_x=1, m_y=2, E=3), Isothermal (rho=0, m_x=1, m_y=2) and ExB (density=0) declare CANONICAL roles -> the resolved indices == the brick defaults -> no value changes. Resolved AT CONSTRUCTION (host, std::string); never on device.
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block()
| AmrRuntimeBlock pops::detail::build_amr_block | ( | const Model & | model, |
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride = 1, |
||
| const std::vector< int > & | implicit_components = {}, |
||
| const NewtonOptions & | nopts = {}, |
||
| const std::vector< double > * | state = nullptr, |
||
| bool | newton_diagnostics = false, |
||
| AmrTimeMethod | time_method = AmrTimeMethod::kEuler, |
||
| double | pos_floor = 0.0 |
||
| ) |
Builds ONE type-erased AMR block (AmrRuntimeBlock) on the SHARED layout S, for a composite Model + concrete (Limiter, Flux).
Multi-block counterpart of build_amr_compiled: allocates the level stack of the block on the SAME BoxArray/dmap as all the others (guarantees same_layout_or_throw), sets the initial density (component 0) + coarse->fine injection, and CAPTURES the concrete scheme in the closures (advance via advance_amr<Limiter, Flux>, add_elliptic_rhs via PoissonRhs). The kernel stays COMPILED; only the block list is type-erased (AMR analog of make_block / PoissonRhs on the flat System side). density (empty = coarse at zero), substeps sub-steps of the block, stride hold-then-catch-up cadence of the block (1 = each macro-step). substeps and stride are carried by AmrRuntime::step (the advance closure does just ONE advance_amr): they thus do NOT touch the scheme capture, only the substeps/stride fields of the AmrRuntimeBlock.
TIME TREATMENT (capstone vii): imex selects the SOURCE treatment. We populate TWO distinct closures set on the AmrRuntimeBlock and AmrRuntime::step chooses (b.imex):
- advance: AMR transport + EXPLICIT source (forward Euler) – historical path unchanged;
- imex_advance: SOURCE-FREE AMR transport + stiff IMPLICIT source backward_euler_source per level (mask
implicit_componentsfor partial IMEX) + cascade. The SEMANTICS of the splitting mirror the IMEX branch of AmrSystemCoupler::step (SourceFreeModel + AmrImplicitSourceStepper), and AT substeps=1 is IDENTICAL to it. This closure does ONE Lie step; AmrRuntime::step calls it substeps times (on the effective step / substeps), so for substeps>1 the runtime SUB-CYCLES the IMEX splitting where compile-time applies it once on the effective step. ASSUMED divergence and sound (cf. IMEX SEMANTICS UNDER substeps in amr_runtime.hpp).implicit_components:indices of the components treated IMPLICITLY (partial IMEX, carried by the BLOCK, takes priority over the model default); EMPTY (default) -> inactive mask -> full backward-Euler (all components implicit), bit-identical behavior to IMEX without a mask. Ignored if imex==false.
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_compressible()
| AmrRuntimeBlock pops::detail::build_amr_block_compressible | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_compressible_hll()
| AmrRuntimeBlock pops::detail::build_amr_block_compressible_hll | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_compressible_hllc()
| AmrRuntimeBlock pops::detail::build_amr_block_compressible_hllc | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_compressible_roe()
| AmrRuntimeBlock pops::detail::build_amr_block_compressible_roe | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_compressible_rusanov()
| AmrRuntimeBlock pops::detail::build_amr_block_compressible_rusanov | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_exb()
| AmrRuntimeBlock pops::detail::build_amr_block_exb | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_for()
| AmrRuntimeBlock pops::detail::build_amr_block_for | ( | TR | tr, |
| const AmrBlockBuildArgs & | a, | ||
| const SharedAmrLayout & | S | ||
| ) |
VERBATIM build_multi visitor body with the transport pinned: resolve the partial IMEX mask against the concrete model, map the temporal method, and produce the type-erased AmrRuntimeBlock via dispatch_amr_block.
Here is the call graph for this function:◆ build_amr_block_for_flux()
| AmrRuntimeBlock pops::detail::build_amr_block_for_flux | ( | TR | tr, |
| const AmrBlockBuildArgs & | a, | ||
| const SharedAmrLayout & | S, | ||
| DispatchFn | dispatch | ||
| ) |
ADC-359 flux subdivision (compressible only): like build_amr_block_for, but the riemann dispatch is supplied by dispatch (a flux-pinned detail::dispatch_amr_block_<flux>), so each per-flux compressible seam TU instantiates ONE flux's build_amr_block leaves and they compile in parallel.
The impl_components / tmethod resolution is IDENTICAL to build_amr_block_for; validate_riemann/limiter run once in the thin dispatcher (python/amr_block_compressible.cpp), so the reachable leaf set stays the same.
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_block_isothermal()
| AmrRuntimeBlock pops::detail::build_amr_block_isothermal | ( | const AmrBlockBuildArgs & | a, |
| const SharedAmrLayout & | S | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled()
| AmrCompiledHooks pops::detail::build_amr_compiled | ( | const Model & | model, |
| const AmrBuildParams & | bp | ||
| ) |
Builds the AMR coupler for a composite Model + concrete (Limiter, Flux) and fills the type-erased hooks.
Two levels: coarse + one central seed fine patch, reshaped by the regrid. This is the header counterpart of AmrSystem::Impl::build, instantiated from the calling TU on the Model type. The coarse helpers (layout, write/read/inject) are SHARED with the native path via amr_coupler_mp.hpp (detail::coupler_*), so replicated and distributed follow exactly the same logic.
Here is the call graph for this function:◆ build_amr_compiled_compressible()
| AmrCompiledHooks pops::detail::build_amr_compiled_compressible | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const std::string & | riemann, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_compressible_hll()
| AmrCompiledHooks pops::detail::build_amr_compiled_compressible_hll | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_compressible_hllc()
| AmrCompiledHooks pops::detail::build_amr_compiled_compressible_hllc | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_compressible_roe()
| AmrCompiledHooks pops::detail::build_amr_compiled_compressible_roe | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_compressible_rusanov()
| AmrCompiledHooks pops::detail::build_amr_compiled_compressible_rusanov | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_exb()
| AmrCompiledHooks pops::detail::build_amr_compiled_exb | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const std::string & | riemann, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_for()
| AmrCompiledHooks pops::detail::build_amr_compiled_for | ( | TR | tr, |
| const ModelSpec & | spec, | ||
| const std::string & | limiter, | ||
| const std::string & | riemann, | ||
| const AmrBuildParams & | bp | ||
| ) |
VERBATIM single-block visitor body with the transport pinned: produce the type-erased AmrCompiledHooks via dispatch_amr_compiled.
bp (AmrBuildParams) already bundles every single-block parameter.
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_for_flux()
| AmrCompiledHooks pops::detail::build_amr_compiled_for_flux | ( | TR | tr, |
| const ModelSpec & | spec, | ||
| const std::string & | limiter, | ||
| const AmrBuildParams & | bp, | ||
| DispatchFn | dispatch | ||
| ) |
ADC-359 flux subdivision: like build_amr_compiled_for, with the riemann dispatch supplied by dispatch (a flux-pinned detail::dispatch_amr_compiled_<flux>).
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_amr_compiled_isothermal()
| AmrCompiledHooks pops::detail::build_amr_compiled_isothermal | ( | const ModelSpec & | spec, |
| const std::string & | limiter, | ||
| const std::string & | riemann, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_block_compressible_hll()
| BuiltBlock pops::detail::build_block_compressible_hll | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_compressible_hllc()
| BuiltBlock pops::detail::build_block_compressible_hllc | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_compressible_roe()
| BuiltBlock pops::detail::build_block_compressible_roe | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_compressible_rusanov()
| BuiltBlock pops::detail::build_block_compressible_rusanov | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_exb()
| BuiltBlock pops::detail::build_block_exb | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_for()
| BuiltBlock pops::detail::build_block_for | ( | TR | tr, |
| const ModelSpec & | model, | ||
| const BlockBuildArgs & | a | ||
| ) |
Per-transport seam body: the full make_block dispatcher (all fluxes).
Used by transports that are NOT flux-subdivided (exb – only rusanov reachable via the capability guards; isothermal – rusanov+hll).
Here is the call graph for this function:◆ build_block_for_make()
| BuiltBlock pops::detail::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 brick tr already chosen, and the per-leaf BlockClosures produced by make.
make is (auto m, const std::vector<int>& impl, const BlockBuildArgs& a) -> BlockClosures: a per-(transport) seam (build_block_for) passes the full make_block dispatcher, while a per-(transport,flux) seam (system_compressible_<flux>.cpp) passes make_block_<flux> so ONLY that flux's build_block leaves are instantiated in its TU (ADC-335 flux subdivision). Instantiated only in the seam TU that calls it.
Here is the call graph for this function:
Here is the caller graph for this function:◆ build_block_isothermal_hll()
| BuiltBlock pops::detail::build_block_isothermal_hll | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_isothermal_rusanov()
| BuiltBlock pops::detail::build_block_isothermal_rusanov | ( | const ModelSpec & | model, |
| const BlockBuildArgs & | a | ||
| ) |
◆ build_block_polar()
| BuiltBlock pops::detail::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 | ||
| ) |
◆ build_halo_schedule()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ cluster_rec()
|
inline |
Berger-Rigoutsos recursive core: trim, accept if efficient/not splittable, otherwise cut and recurse.
- Parameters
-
region current region (trimmed in place to the bounding box of the tags). out receives the accepted boxes (before final chop by max_box_size).
Here is the call graph for this function:
Here is the caller graph for this function:◆ copy_shifted()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ count_in()
Number of tagged cells in box r.
Here is the caller graph for this function:◆ coupler_eval_rhs()
|
inline |
Assemble the single-model elliptic RHS: rhs = model.elliptic_rhs(U) on valid cells (delegated to SingleModelEllipticRhs).
Shared by Coupler and AmrCouplerMP.
Here is the caller graph for this function:◆ coupler_grad_phi()
|
inline |
Set aux = (phi, d phi/dx, d phi/dy) by centered differences (factors cx, cy = 1/(2 dx), 1/(2 dy)).
Stores +grad phi (the physical sign E = -grad phi is carried by the drift velocity).
Here is the call graph for this function:◆ coupler_inject_aux_mb()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ coupler_inject_coarse_to_fine_mb()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ coupler_make_coarse_layout()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ coupler_read_coarse()
|
inline |
Here is the call graph for this function:◆ coupler_read_coarse_phi()
|
inline |
Here is the call graph for this function:◆ coupler_write_coarse()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ coupler_write_coarse_state()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ cross_div()
|
inline |
Here is the caller graph for this function:◆ ct_str_eq()
|
constexpr |
COMPILE-TIME C string equality (no constexpr <cstring> guaranteed everywhere).
Here is the caller graph for this function:◆ cut_distance()
Cut distance of ONE face along a direction, starting from the active center (ls < 0).
HISTORICAL GeometricMG convention (geometric_mg.hpp, 'cut' lambda) reused IDENTICALLY to guarantee bit-identical Shortley-Weller weights:
- INTERIOR neighbor (ln < 0): no cut, the face is full -> distance = h;
- the level-set changes sign (ln >= 0): linear fraction theta = lc / (lc - ln) (linear crossing between the center lc < 0 and the neighbor ln >= 0), distance = theta * h;
- anti division-by-zero guard: theta is clamped to [1e-3, 1] (theta -> 0 would make the weight diverge). lc is assumed < 0 (active cell); the clamp bounds are the original ones.
Here is the caller graph for this function:◆ cut_fraction()
|
inline |
Computes the cut geometry of an ACTIVE cell (center (xc, yc) with ls < 0) from a level-set ls evaluated at the center and at the 4 cardinal neighbors at distance dx / dy.
- Template Parameters
-
LevelSet callable Real(Real, Real) device-safe (e.g. DiscDomain::level_set capture).
The cell is assumed ACTIVE (the caller has already tested ls(xc, yc) < 0, as GeometricMG skips conductor cells). The 4 face distances reuse cut_distance (so strictly the original logic). The apertures normalize by the step. kappa is a volume fraction DERIVED from the same apertures (average of the two half-faces per direction, product of the two directions): far from the boundary (all apertures = 1) kappa = 1; near the boundary kappa < 1. kappa does NOT alter the elliptic (which only uses axm/axp/aym/ayp); it is provided for the upcoming EB transport.
Here is the call graph for this function:
Here is the caller graph for this function:◆ derive_aux_bc()
Aux-channel BC derived from the potential phi BC: a periodic BC stays periodic, any other becomes Foextrap (order-0 extrapolation).
Body taken verbatim from the three couplers.
◆ disc_level_set()
|
inline |
Builds the disc level set callable from a DiscDomain (sugar: disc_level_set(d)).
Here is the caller graph for this function:◆ dispatch_amr_block()
| AmrRuntimeBlock pops::detail::dispatch_amr_block | ( | const Model & | m, |
| const std::string & | lim, | ||
| const std::string & | riem, | ||
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride = 1, |
||
| const std::vector< int > & | implicit_components = {}, |
||
| const NewtonOptions & | nopts = {}, |
||
| const std::vector< double > * | state = nullptr, |
||
| bool | newton_diagnostics = false, |
||
| AmrTimeMethod | time_method = AmrTimeMethod::kEuler, |
||
| double | pos_floor = 0.0 |
||
| ) |
Dispatch of the spatial scheme (limiter x Riemann flux) -> build_amr_block.
SAME guards as dispatch_amr_compiled (hllc/roe require the model's Riemann capability HasHLLCStructure / HasRoeDissipation, OR the canonical Euler 2D layout: 4 variables + pressure). Multi-block counterpart of dispatch_amr_compiled. implicit_components: partial IMEX mask carried by the block (indices of the implicit components; empty = full backward-Euler), threaded to build_amr_block.
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_block_hll()
| AmrRuntimeBlock pops::detail::dispatch_amr_block_hll | ( | const Model & | m, |
| const std::string & | lim, | ||
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride, | ||
| const std::vector< int > & | implicit_components, | ||
| const NewtonOptions & | nopts, | ||
| const std::vector< double > * | state, | ||
| bool | newton_diagnostics, | ||
| AmrTimeMethod | time_method, | ||
| double | pos_floor | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_block_hllc()
| AmrRuntimeBlock pops::detail::dispatch_amr_block_hllc | ( | const Model & | m, |
| const std::string & | lim, | ||
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride, | ||
| const std::vector< int > & | implicit_components, | ||
| const NewtonOptions & | nopts, | ||
| const std::vector< double > * | state, | ||
| bool | newton_diagnostics, | ||
| AmrTimeMethod | time_method, | ||
| double | pos_floor | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_block_roe()
| AmrRuntimeBlock pops::detail::dispatch_amr_block_roe | ( | const Model & | m, |
| const std::string & | lim, | ||
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride, | ||
| const std::vector< int > & | implicit_components, | ||
| const NewtonOptions & | nopts, | ||
| const std::vector< double > * | state, | ||
| bool | newton_diagnostics, | ||
| AmrTimeMethod | time_method, | ||
| double | pos_floor | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_block_rusanov()
| AmrRuntimeBlock pops::detail::dispatch_amr_block_rusanov | ( | const Model & | m, |
| const std::string & | lim, | ||
| const SharedAmrLayout & | S, | ||
| const std::string & | name, | ||
| const std::vector< double > & | density, | ||
| bool | has_density, | ||
| double | gamma, | ||
| int | substeps, | ||
| bool | recon_prim, | ||
| bool | imex, | ||
| int | stride, | ||
| const std::vector< int > & | implicit_components, | ||
| const NewtonOptions & | nopts, | ||
| const std::vector< double > * | state, | ||
| bool | newton_diagnostics, | ||
| AmrTimeMethod | time_method, | ||
| double | pos_floor | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_compiled()
| AmrCompiledHooks pops::detail::dispatch_amr_compiled | ( | const Model & | m, |
| const std::string & | lim, | ||
| const std::string & | riem, | ||
| const AmrBuildParams & | bp | ||
| ) |
Dispatch of the spatial scheme (limiter x Riemann flux) -> build_amr_compiled.
Same guards as AmrSystem::add_block (hllc/roe require the model's Riemann capability HasHLLCStructure / HasRoeDissipation, OR the canonical Euler 2D layout: 4 variables + pressure).
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_compiled_hll()
| AmrCompiledHooks pops::detail::dispatch_amr_compiled_hll | ( | const Model & | m, |
| const std::string & | lim, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_compiled_hllc()
| AmrCompiledHooks pops::detail::dispatch_amr_compiled_hllc | ( | const Model & | m, |
| const std::string & | lim, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_compiled_roe()
| AmrCompiledHooks pops::detail::dispatch_amr_compiled_roe | ( | const Model & | m, |
| const std::string & | lim, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_amr_compiled_rusanov()
| AmrCompiledHooks pops::detail::dispatch_amr_compiled_rusanov | ( | const Model & | m, |
| const std::string & | lim, | ||
| const AmrBuildParams & | bp | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_elliptic()
| POPS_COLD_FN void pops::detail::dispatch_elliptic | ( | const ModelSpec & | m, |
| Visitor && | v | ||
| ) |
Builds the elliptic right-hand-side brick and calls v(elliptic).
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_model()
| POPS_COLD_FN void pops::detail::dispatch_model | ( | const ModelSpec & | m, |
| Visitor && | visitor | ||
| ) |
Assembles the CompositeModel designated by m and calls visitor(model).
- Exceptions
-
std::runtime_error on unknown tag or invalid combination.
Here is the call graph for this function:◆ dispatch_model_for()
| POPS_COLD_FN void pops::detail::dispatch_model_for | ( | const ModelSpec & | m, |
| TR | tr, | ||
| Visitor && | visitor | ||
| ) |
Same as dispatch_model but with the transport brick ALREADY chosen (tr).
Runs ONLY the source/elliptic dispatch for that fixed transport TR and calls visitor(CompositeModel<...>). This is the seam that lets the per-transport translation units (system_{exb,isothermal, compressible}.cpp, ADC-335) each instantiate ONLY their own transport's leaves: a TU calling dispatch_model_for<CompressibleFlux> never sees the exb/isothermal branches of dispatch_transport, so the ~1700-leaf combinatorial product splits cleanly across files for -j. The body is the inner part of dispatch_model VERBATIM (same role binding, same CompositeModel<TR,...> synthesis), so the reachable instantiation set is unchanged: dispatch_model itself is UNTOUCHED (still used by the .so / add_compiled_model loader path), and the union over the three transports is byte-identical.
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_model_polar()
| void pops::detail::dispatch_model_polar | ( | const ModelSpec & | m, |
| Visitor && | visitor | ||
| ) |
Assembles the POLAR CompositeModel designated by m and calls visitor(model).
REUSES dispatch_source / dispatch_elliptic from model_factory.hpp (source / elliptic right-hand-side bricks IDENTICAL to the cartesian ones: they carry no geometry). Only the transport brick changes (ExBVelocityPolar or IsothermalFluxPolar). dispatch_source<TR::n_vars> filters automatically: scalar ExB transport (1 var) -> only source 'none'; isothermal fluid transport (3 var) -> 'none' | 'potential' (-rho grad phi) | 'gravity' | 'magnetic'/'lorentz' (q v x B_z, B_z read from the aux, EXPLICIT regime) | 'potential_magnetic'/'potential_lorentz' (electrostatic + Lorentz sum = full magnetized-plasma force in polar geometry) also valid. The Lorentz force is ALGEBRAIC and INVARIANT under orientation of the local orthonormal frame: the SAME MagneticLorentzForce brick serves both geometries (cartesian and polar), like PotentialForce / GravityForce. The 1/r metric and the curvature stay carried by the transport.
Here is the call graph for this function:◆ dispatch_source()
| POPS_COLD_FN void pops::detail::dispatch_source | ( | const ModelSpec & | m, |
| Visitor && | v | ||
| ) |
Builds the source brick and calls v(source).
Fluid sources (force) require >= 3 variables: on a scalar transport (exb), only "none" is valid.
- "none": NoSource (neutral);
- "potential": PotentialForce (q/m) rho E (electrostatic);
- "gravity": GravityForce rho g;
- "magnetic" | "lorentz": MagneticLorentzForce q v x B_z (B_z read from aux, EXPLICIT regime; the stiff regime goes through the condensed Schur);
- "potential_magnetic" | "potential_lorentz": CompositeSource<PotentialForce, MagneticLorentz> = electrostatic + Lorentz summed (the full magnetized force in a polar setup, with no centrifugal workaround needed). qom (q/m, sign included) is shared by the two charged forces (same species). The magnetized bricks declare n_aux = 4 -> CompositeModel propagates the aux width up to the system (B_z channel).
◆ dispatch_transport()
| POPS_COLD_FN void pops::detail::dispatch_transport | ( | const ModelSpec & | m, |
| Visitor && | v | ||
| ) |
Non-drift guard (ADC-331): the registry's n_vars column (model_registry.hpp, a LIGHT header with no brick types) MUST agree with the real brick types' ::n_vars.
This TU sees BOTH, so we lock it at compile time – a registry row that disagrees with its brick fails the build here. Builds the transport brick and calls v(transport).
Here is the call graph for this function:
Here is the caller graph for this function:◆ dispatch_transport_polar()
| void pops::detail::dispatch_transport_polar | ( | const ModelSpec & | m, |
| Visitor && | v | ||
| ) |
Builds the POLAR transport brick and calls v(transport).
Two wired transports:
- "exb": ExBVelocityPolar, scalar ExB advection in the local basis (e_r, e_theta);
- "isothermal": IsothermalFluxPolar (Path A step 1), isothermal fluid 3 var (rho, rho v_r, rho v_theta) in polar metric. The PHYSICAL flux is that of IsothermalFlux cartesian (reused verbatim); the 1/r metric (divergence (1/r) d_r(r F_r) + (1/r) d_theta(F_theta)) AND the GEOMETRIC curvature term (centrifugal -rho v_theta^2/r + cross curvature) are carried by assemble_rhs_polar / IsothermalFluxPolar::polar_geom_source. Electrostatic coupling = existing SCALAR polar Poisson + LOCAL source (PotentialForce), explicit regime. "compressible" transport (Euler 4 var with energy) in polar stays out of scope: its energy flux and curvature term do not yet have a polar brick -> EXPLICIT error.
Here is the call graph for this function:
Here is the caller graph for this function:◆ eb_cell_active()
|
inline |
Activity indicator (center in the disc, ls < 0) from a callable level set. POPS_HD.
Here is the caller graph for this function:◆ eb_face_aperture()
Here is the call graph for this function:
Here is the caller graph for this function:◆ fac_bilerp_coarse()
|
inline |
BILINEAR interpolation of the coarse potential (cell-centered, C with ghosts) at the CENTER of the fine cell (i, j).
Ratio r. The fine center has abscissa (i+0.5)/r in coarse-step units, i.e. the coarse center-index fx = (i+0.5)/r - 0.5; we interpolate the 4 surrounding coarse centers. INTERIOR patch -> Ic, Ic+1, Jc, Jc+1 are in the coarse domain (ghosts included).
◆ face_weights()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ fill_bz_box()
|
inline |
Writes B_z(x, y) at component kAuxBaseComps on box box of fab f, sampling bz at the cell centers of geometry g.
Kernel common to the three couplers: only the traversed box (valid or grown) and the geometry (global or per-level) differ on the caller side; the loop body is bit-identical.
Here is the call graph for this function:◆ fill_ghosts_polar()
Fills the ghosts of a MultiFab on the polar grid (theta periodic + r physical).
fill_ghosts already routes periodic vs physical by BCRec (xlo/xhi physical, ylo/yhi periodic): we call it VERBATIM. This is the analogue of the cartesian fill_ghosts(U, dom, bc) of BlockRhsEval.
Here is the call graph for this function:
Here is the caller graph for this function:◆ foreach_serial_threshold()
|
inline |
Here is the caller graph for this function:◆ gershgorin_bounds()
|
inline |
Gershgorin bound on the REAL PARTS: every lambda of the spectrum satisfies lo <= Re(lambda) <= hi (disks centered at a_ii of radius the sum of the |off-diagonal| terms of the row).
Safe external bound for HLL, attained only if the matrix is diagonal.
Here is the caller graph for this function:◆ get_halo_schedule()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ gs_color()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ hessenberg_reduce()
Upper Hessenberg reduction by Householder reflections, IN PLACE, without accumulating the transformations (eigenvalues only).
Unconditionally stable.
Here is the caller graph for this function:◆ hqr_copysign()
Here is the caller graph for this function:◆ hqr_minmax()
|
inline |
QR iteration with implicit Francis double shift on a Hessenberg matrix (EISPACK/hqr formulation, eigenvalues only, blocks processed bottom-up with deflation).
Accumulates min/max of the real parts and max|Im| directly.
- Returns
- true if the WHOLE spectrum is extracted under the cap (
max_iter_per_eigiterations per active block), false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:◆ join_tag_names()
| std::string pops::detail::join_tag_names | ( | const TagT(&) | tbl[N], |
| const char * | sep, | ||
| bool | quote | ||
| ) |
Joins the name field of a tag table into "a<sep>b<sep>..." (optionally each name single-quoted).
Used to build the rejection-message tag lists from the SINGLE table (no inline duplication).
Here is the caller graph for this function:◆ krylov_dot()
Krylov inner product x.y, COLLECTIVE (all_reduce_sum).
For a MULTI-component (vector / state) operator it reduces over ALL components (pops::dot_all) so the residual / search-direction norms and the CG / BiCGStab scalar recurrences cover every component – a component-0-only dot would converge on component 0 alone and leave the others unsolved. For a single-component field it is exactly pops::dot(x, y) (component 0), so the scalar path stays BIT-IDENTICAL. Must run on every rank.
Here is the call graph for this function:
Here is the caller graph for this function:◆ krylov_l2_norm()
GLOBAL L2 norm sqrt(sum x.x), collective (all_reduce_sum).
Full-component for a vector / state field, component-0 (bit-identical) for a scalar field. Identical on all ranks; wraps krylov_dot.
Here is the call graph for this function:
Here is the caller graph for this function:◆ make_shared_amr_layout()
|
inline |
Builds the SHARED layout (PR1): coarse (per the ownership policy) + ONE central FIXED fine patch (the seed of build_amr_compiled, BEFORE its regrid).
Identical to the geometry of the mono-block path, but WITHOUT the initial regrid (multi-block PR1 = frozen hierarchy). All blocks then settle onto it via build_amr_block.
Here is the call graph for this function:
Here is the caller graph for this function:◆ mask_active()
|
inline |
Activity indicator of a cell from a 0/1 cell-centered mask (>= 0.5 -> active).
Here is the caller graph for this function:◆ mat_inverse()
|
inline |
Inverse of a dense N x N matrix by Gauss-Jordan elimination with partial pivoting, into inv.
Returns false (inv untouched-meaningful) if a pivot falls below pivot_tol (singular). Device clean: fixed stack buffers, bounded loops, no allocation.
Here is the caller graph for this function:◆ mat_norm_inf()
Max absolute row sum (infinity norm) of a dense N x N matrix.
Here is the caller graph for this function:◆ mg_trace_mark()
|
inline |
Here is the caller graph for this function:◆ newton_source_solve() [1/2]
|
inline |
◆ newton_source_solve() [2/2]
|
inline |
COMPATIBILITY: old signature with a bare iteration budget (iters).
Equivalent to NewtonOptions {max_iters = iters} (tolerances inactive, historical fd_eps) -> path (2a), bit-identical.
◆ polar_azimuthal_div()
|
inline |
AZIMUTHAL FACE contribution to the diagonal + cross stencil, at (i, j).
Returns the local L_int of the azimuthal term. Face a_tt coefficients (arithmetic); metric 1/(r_i^2); cross term a_tr d_r phi at face j+-1/2 (d_r averaged over 4 corners).
Here is the caller graph for this function:◆ polar_diag()
|
inline |
Diagonal (coefficient of phi_{i,j}) of the diagonal POLAR stencil (radial + azimuthal), for the Jacobi preconditioner.
Cross terms EXCLUDED from the diagonal (they do not touch phi_{i,j}: the corners i+-1, j+-1 are off-diagonal). Returns the (NEGATIVE) value of the diagonal coefficient of L_int (sum of -face weights), like the scalar stencil (diag < 0).
Here is the caller graph for this function:◆ polar_geom_source()
|
inline |
polar_geom_source<Model>: returns m.polar_geom_source(u, r) if PolarHasGeomSource<Model>, otherwise the zero state.
if constexpr guard: zero extra codegen for scalar bricks (the polar ExB path stays strictly bit-identical). POPS_HD. r > 0 (annulus) enforced upstream.
◆ polar_radial_div()
|
inline |
RADIAL FACE contribution to the diagonal + cross stencil, at (i, j).
Returns the local L_int WITHOUT the azimuthal term (computed separately). Free device-clean functor (POPS_HD). Face coefficients = arithmetic mean; metric r_face/r_i; cross term a_rt (1/r_face) (d_theta phi)_face. Cross terms absent (hrt=false) -> only the diagonal radial term contributes, bit-identical to the scalar polar stencil with a_rr=1.
Here is the caller graph for this function:◆ polar_source()
|
inline |
polar_source<Model>: returns m.source(u, a) if PolarHasSource<Model>, otherwise the zero state.
if constexpr guard: zero extra codegen for bricks without a source. POPS_HD.
◆ positivity_comp()
|
inline |
Component of the Density role for the positivity limiter (HOST, resolved once per spatial operator call, never per cell).
pos_floor <= 0 -> 0 (never read, the scaling is short-circuited in zhang_shu_scale). A model without VariableSet introspection or without a Density role cannot request positivity: clear error rather than a silent scaling of an arbitrary component.
◆ record_eig()
|
inline |
Accumulate an eigenvalue (re, im) into the current extremes.
A named function rather than a local lambda: device caution (nvcc and lambdas inside host device code).
Here is the caller graph for this function:◆ require_max_iter()
|
inline |
Guards a dynamic solver loop: a non-positive iteration budget is a configuration error.
Here is the caller graph for this function:◆ require_reconstruction_ghosts()
|
inline |
require_reconstruction_ghosts<Limiter>: STRUCTURAL ENTRY GUARD of the FV spatial operators.
A limiter's reconstruction stencil reads up to Limiter::n_ghost cells BEYOND the valid box: we reconstruct the NEIGHBOR cells i+-1 of each valid cell, which reads i+-2 for a 2-ghost MUSCL (Minmod / VanLeer) and i+-3 for WENO5. If the state does not carry this ghost width, the read runs off the Fab buffer (heap-buffer-overflow, silent UB: negative linear index). We REQUIRE the contract at entry – CLEAR error rather than an out-of-bounds read – exactly the rule already applied to ALLOCATION (Limiter::n_ghost) on the AMR side and block_builder (cf. python/system.cpp and PR #22). aux / mask are only read at i+-1 (1 ghost), strictly smaller width: it is the STATE ghosts that size the stencil.
Here is the call graph for this function:◆ resolve_implicit_components()
|
inline |
Resolves the IMPLICIT MASK of a block (add_block: implicit_vars / implicit_roles) into a list of conserved-component indices, against the block descriptor cons.
The mask lives on the BLOCK / time-policy side (and NOT the model): same model, distinct implicit treatments per block. A name or role absent from the block raises an EXPLICIT error (no silent ignore). Returns the UNIQUE, sorted indices (order is irrelevant). Empty input -> empty -> inactive mask. Moved out of system.cpp's anonymous namespace (ADC-335) so the per-transport seam TUs share one definition.
Here is the call graph for this function:
Here is the caller graph for this function:◆ resolve_implicit_components_amr()
|
inline |
AMR partial-IMEX-mask resolution, moved out of amr_system.cpp's anonymous namespace (ADC-335) so the per-transport seam TUs share one definition.
Distinct from the System resolve_implicit_components (model_factory.hpp): the AmrSystem error wording differs, kept VERBATIM here.
Here is the call graph for this function:◆ resolve_selected_component()
|
inline |
Resolves a SINGLE selector variable of block (the AMR regrid variable, ADC-296) into its conserved-component index, by NAME (name) XOR by physical ROLE (role), against cons.
STRICT, like resolve_implicit_components: an absent name/role raises an EXPLICIT error (NO silent fallback to component 0 – the whole point of letting a model put its refinement variable off component 0). Empty name AND empty role -> -1, the caller keeps its default (component 0, historical density criterion, bit-identical). At most one of name/role may be set. origin labels the error (e.g. "AmrSystem::set_refinement").
Here is the call graph for this function:◆ same_layout_or_throw()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ same_level_layout()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ shortley_weller()
|
inline |
◆ signature()
Signature of r along axis: number of tagged cells per column (axis 0) or per row (axis 1).
Here is the call graph for this function:
Here is the caller graph for this function:◆ solve_dense()
|
inline |
Here is the call graph for this function:◆ ssprk3_advance_level()
| void pops::detail::ssprk3_advance_level | ( | const Model & | m, |
| AmrLevelMP & | lv, | ||
| Real | dt, | ||
| MultiFab & | fx, | ||
| MultiFab & | fy, | ||
| bool | recon_prim, | ||
| int | lev, | ||
| const Box2D & | base_dom, | ||
| Periodicity | base_per, | ||
| const MultiFab * | pOld, | ||
| const MultiFab * | pNew, | ||
| Real | frac, | ||
| bool | coarse_replicated, | ||
| Real | pos_floor = Real(0) |
||
| ) |
Here is the call graph for this function:◆ ssprk3_refill_level_ghosts()
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:◆ subcycle_level_mf()
| void pops::detail::subcycle_level_mf | ( | const Model & | m, |
| std::vector< AmrLevelMF > & | L, | ||
| int | lev, | ||
| Real | dt, | ||
| const Box2D & | dom, | ||
| const MultiFab * | pOld, | ||
| const MultiFab * | pNew, | ||
| Real | frac, | ||
| std::vector< Real > * | pregL, | ||
| std::vector< Real > * | pregR, | ||
| std::vector< Real > * | pregB, | ||
| std::vector< Real > * | pregT | ||
| ) |
Here is the call graph for this function:◆ subcycle_level_mp()
| void pops::detail::subcycle_level_mp | ( | const Model & | m, |
| std::vector< AmrLevelMP > & | L, | ||
| int | lev, | ||
| Real | dt, | ||
| const Box2D & | base_dom, | ||
| Periodicity | base_per, | ||
| const MultiFab * | pOld, | ||
| const MultiFab * | pNew, | ||
| Real | frac, | ||
| std::vector< RegMP > * | parentRegs, | ||
| bool | coarse_replicated = true, |
||
| bool | recon_prim = false, |
||
| bool | imex = false, |
||
| const NewtonOptions & | nopts = {}, |
||
| AmrTimeMethod | tmethod = AmrTimeMethod::kEuler, |
||
| Real | pos_floor = Real(0) |
||
| ) |
◆ tag_bbox()
Bounding box of the tagged cells in region; empty box (hi < lo) if none is tagged.
Here is the caller graph for this function:◆ validate_krylov_params()
|
inline |
Validates the Krylov tolerance / iteration budget shared by the Schur source steppers (historical constants made configurable by the audit 2026-06).
who names the calling class for the message.
- Exceptions
-
std::invalid_argument if tol <= 0 or max_iters < 1.
Here is the caller graph for this function:◆ validate_model_spec()
|
inline |
Completeness contract of a ModelSpec (ADC-290): transport and elliptic MUST be chosen explicitly.
An unset (empty) tag is rejected here with a clear message, instead of letting the old physics default (compressible/charge) be selected silently. source may stay "none" (the explicit, neutral no-source choice); an empty source is also rejected so a cleared tag fails loud rather than tripping dispatch_source's "invalid here" message. This is a CONTRACT guard (mirrors throw_registry_dispatch_mismatch in dispatch_tags.hpp), distinct from a user-tag typo: an unknown (non-empty) tag is still caught downstream by dispatch_transport / dispatch_source / dispatch_elliptic, which list the valid values. Call at every public ModelSpec entry point.
Here is the call graph for this function:
Here is the caller graph for this function:◆ wall_predicate()
|
inline |
Builds the "inside the conductor" predicate (embedded wall for the Poisson solver) from the wall mode wall, the radius wall_radius and the domain size L.
- "none": no wall -> empty predicate.
- "circle": disc centered at (L/2, L/2) with radius
wall_radius. - other: error, prefixed by
err_context(e.g. "System::set_poisson"). Body reused identically from the System / AmrSystem runtimes (bit-identical).
Here is the caller graph for this function:Variable Documentation
◆ always_false_v
|
inlineconstexpr |
◆ amr_always_false_v
|
inlineconstexpr |
◆ kEbFaceOpenEps
Default aperture below which a face is treated as CLOSED (immersed wall).
Below this threshold the linear aperture is numerically zero (the face barely crosses the disc); the anti-division clamp of cut_distance already stops at 1e-3, this threshold aligns it with the FV closure.
◆ kEbKappaMin
◆ kHasGpuBackend
|
inlineconstexpr |
True iff this translation unit is compiled for a real GPU device backend.
Conservative and honest: a Kokkos build is necessary but NOT sufficient (Kokkos-Serial / OpenMP is a CPU build). CUDACC / HIPCC are the device-compiler tokens (cf. core/foundation/types.hpp); absent them we report false rather than fabricate GPU support from the mere presence of Kokkos.
◆ kHasMpi
|
inlineconstexpr |
◆ kKrylovTiny
Generated by