BlockClosures Struct Reference

adc_cpp: pops::BlockClosures Struct 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
pops::BlockClosures Struct Reference

Compiled block closures, frozen at add time. More...

#include <grid_context.hpp>

+ Collaboration diagram for pops::BlockClosures:

Public Attributes

std::function< void(MultiFab &, Real, int)> advance
 (U, dt, n): n substeps of dt/n
 
std::function< void(MultiFab &, Real, int)> advance_masked
 same, residual via assemble_rhs_masked
 
std::function< void(MultiFab &, Real, int)> advance_eb
 same, residual via assemble_rhs_eb
 
std::function< void(MultiFab &, MultiFab &)> rhs_into
 R <- -div F + S (Poisson frozen)
 
std::function< void(MultiFab &, MultiFab &)> rhs_flux_only
 FLUX-ONLY residual R <- -div F(U) (NO default/composite source), Poisson frozen (ADC-425).
 
std::function< void(MultiFab &, MultiFab &)> source_only
 SOURCE-ONLY residual R <- S(U, aux) (the model's default/composite source, NO flux divergence), Poisson frozen (ADC-430).
 
std::function< void(const MultiFab &, Real &, int &, int &)> hotspot
 dt_hotspot diagnostic (ADC-182): (U, w, i, j) -> GLOBAL cell dominating the transport CFL and its speed.
 
std::function< void(MultiFab &)> project
 PROJECTION PONCTUELLE post-pas (ADC-177) : U <- project(U, aux) sur les cellules VALIDES du bloc, appliquee par le stepper a la FIN de chaque macro-pas ENTIER (jamais par etage RK).
 

Detailed Description

Compiled block closures, frozen at add time.

advance is the transport advance of the DEFAULT path (assemble_rhs, full Cartesian). The two optional DISC advances (T5-PR3 effort) mimic advance EXACTLY (same RK / IMEX scheme, same limiter / flux) but dispatch the transport residual to the disc operator:

  • advance_masked: assemble_rhs_masked (0/1 mask, Staircase mode);
  • advance_eb: assemble_rhs_eb (cut-cell EB, CutCell mode). They read the System mask / level set BY POINTER at step time (not at construction), so the order add_block / set_disc_domain does not matter. Empty (default) as long as the block does not support disc routing: the stepper then falls back to advance (bit-identical).

Member Data Documentation

◆ advance

std::function<void(MultiFab&, Real, int)> pops::BlockClosures::advance

(U, dt, n): n substeps of dt/n

◆ advance_eb

std::function<void(MultiFab&, Real, int)> pops::BlockClosures::advance_eb

same, residual via assemble_rhs_eb

◆ advance_masked

std::function<void(MultiFab&, Real, int)> pops::BlockClosures::advance_masked

same, residual via assemble_rhs_masked

◆ hotspot

std::function<void(const MultiFab&, Real&, int&, int&)> pops::BlockClosures::hotspot

dt_hotspot diagnostic (ADC-182): (U, w, i, j) -> GLOBAL cell dominating the transport CFL and its speed.

OPTIONAL (empty = block without diagnostic, e.g. historical unrewired paths); never called by step/step_cfl (off the hot path).

◆ project

std::function<void(MultiFab&)> pops::BlockClosures::project

PROJECTION PONCTUELLE post-pas (ADC-177) : U <- project(U, aux) sur les cellules VALIDES du bloc, appliquee par le stepper a la FIN de chaque macro-pas ENTIER (jamais par etage RK).

OPTIONNELLE (vide = bloc sans projection : jamais interrogee, cout nul, bit-identique).

◆ rhs_flux_only

std::function<void(MultiFab&, MultiFab&)> pops::BlockClosures::rhs_flux_only

FLUX-ONLY residual R <- -div F(U) (NO default/composite source), Poisson frozen (ADC-425).

The SAME transport assembly as rhs_into evaluated on SourceFreeModel<Model> (zero source), so the flux / ghost / geometry handling is bit-identical – only the source is dropped. A compiled time Program's hyperbolic stage (P.rhs(flux=True, sources without "default")) reads it so a Lie/Strang split assembles "flux but no source" without the default source leaking in (spec criterion 17: sources are explicit, never summed implicitly). OPTIONAL (empty for block paths that do not build it, e.g. the host .so prototype loader): System::block_neg_div_flux_into fails loud then.

◆ rhs_into

std::function<void(MultiFab&, MultiFab&)> pops::BlockClosures::rhs_into

R <- -div F + S (Poisson frozen)

◆ source_only

std::function<void(MultiFab&, MultiFab&)> pops::BlockClosures::source_only

SOURCE-ONLY residual R <- S(U, aux) (the model's default/composite source, NO flux divergence), Poisson frozen (ADC-430).

The exact MIRROR of rhs_flux_only: together they split rhs_into (-div F + S) into its two halves. Evaluates m.source per cell (the SAME source term assemble_rhs adds) with no numerical-flux dispatch, so it is flux-template agnostic and bit-identical to the source half of rhs_into. A compiled time Program's source stage (P.rhs(flux=False, sources with "default")) reads it so a Lie/Strang split assembles "the default source but no flux" without the -div F base leaking in (spec: rhs flux=False is source-only). OPTIONAL (empty for block paths that do not build it, e.g. the host .so prototype loader): System::block_source_into fails loud then.


The documentation for this struct was generated from the following file: