|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Namespaces | |
| remap_detail | |
Classes | |
| struct | AdvectionFacePolicyInput |
| struct | AdvectionFacePolicy |
| struct | SBMAMRStateView |
| struct | BulkProjection |
| class | SBMBulkProjection |
| struct | ConstraintTerm |
| struct | LinearConstraint |
| struct | ConstraintGroup |
| struct | ConstraintDescriptor |
| struct | FlattenedConstraintSet |
| struct | AttachedPropertySupportDescriptor |
| struct | ConstraintClosureChunk |
| struct | FixtureInitialStateCanonicality |
| struct | SpectralPopulationSpec |
| struct | LiquidProjectionSpec |
| struct | AttachedPropertyDescriptor |
| struct | PopulationLayout |
| struct | SBMLayoutSpec |
| struct | LayoutValidation |
| class | SBMLayout |
| struct | PopulationRemapView |
| struct | RouteDestination |
| struct | PacketRoutingPlan |
| struct | PacketApplicationCoreResult |
| struct | ReconstructionDeltaView |
| struct | IntegratedMomentsCoreResult |
| struct | PacketApplicationResult |
| struct | ReconstructionDelta |
| struct | IntegratedMoments |
| struct | RepresentationIdentity |
| class | SBMStateManager |
| class | SBMTransport |
| struct | SpectralGridSpec |
| struct | GridValidation |
| struct | EndpointTransform |
| class | SpectralGrid |
Enumerations | |
| enum class | AdvectionFaceKind : int { Periodic , ImpermeableWall , AdvectiveOutflow , PrescribedInflow } |
| enum class | AdvectionFaceAction : int { PeriodicSharedFace , ZeroNormalFlux , InteriorDonor , ExplicitSpectralInflow , RejectInwardOutflow , RejectMissingInflowState , RejectIncompleteInflowState } |
| enum class | PropertyKind { ExtensiveMass , NumberCarried , MassBoundedSubset } |
| enum class | PropertyRemapPolicy { CarrierBinConservative , Independent } |
| enum class | SupportRequirement { None , PositiveMass , PositiveNumber } |
| enum class | PopulationPhase { Liquid , Ice , Aerosol , Generic } |
| enum class | HostWritePath { Advection , Diffusion , Source , Positivity , Microphysics , Wall , Boundary } |
| enum class | RemapStatus { Ok , ZeroWaterResidual , BelowSupportedGrid , Overflow , NumericalUnderflow , Invalid } |
| enum class | ReconstructionStatus { Populated , Empty , Invalid } |
| enum class | CoordinateKind { Mass , Radius } |
| enum class | MomentMode { OneMoment , TwoMoment } |
Functions | |
| constexpr AdvectionFacePolicy | make_advection_face_policy (const AdvectionFacePolicyInput &input) noexcept |
| bool | RestrictMappedSpectrum (const SBMLayout &layout, const SBMAMRStateView &fine, const SBMAMRStateView &coarse, const amrex::IntVect &ratio, const int coarse_level, MultiFab &coarse_candidate, std::string &diagnostic) |
| bool | ProlongCarrierRelativeSpectrum (const SBMLayout &layout, const SBMAMRStateView &coarse, const SBMAMRStateView &fine_target, const amrex::Geometry &coarse_geometry, const amrex::Geometry &fine_geometry, const amrex::IntVect &ratio, const int fine_level, MultiFab &fine_candidate, std::string &diagnostic) |
| bool | RestrictMappedSpectrum (const SBMLayout &layout, const SBMAMRStateView &fine, const SBMAMRStateView &coarse, const amrex::IntVect &ratio, int coarse_level, amrex::MultiFab &coarse_candidate, std::string &diagnostic) |
| bool | ProlongCarrierRelativeSpectrum (const SBMLayout &layout, const SBMAMRStateView &coarse, const SBMAMRStateView &fine_target, const amrex::Geometry &coarse_geometry, const amrex::Geometry &fine_geometry, const amrex::IntVect &ratio, int fine_level, amrex::MultiFab &fine_candidate, std::string &diagnostic) |
| std::string | canonical_real (const amrex::Real value, const bool allow_unbounded_nan=false) |
| std::vector< ConstraintGroup > | make_constraint_groups (const SBMLayout &layout) |
| FlattenedConstraintSet | flatten_constraint_groups (const std::vector< ConstraintGroup > &groups, const int state_components) |
| FlattenedConstraintSet | make_constraint_descriptors (const SBMLayout &layout) |
| std::vector< AttachedPropertySupportDescriptor > | make_attached_property_support_descriptors (const SBMLayout &layout) |
| std::vector< ConstraintClosureChunk > | make_constraint_closure_chunks (const SBMLayout &layout, const int max_groups) |
| EndpointTransform | transform_two_moment (const amrex::Real C, const amrex::Real M, const amrex::Real lower, const amrex::Real upper) |
| std::pair< amrex::Real, amrex::Real > | inverse_two_moment (const amrex::Real L, const amrex::Real H, const amrex::Real lower, const amrex::Real upper) |
| bool | property_support_is_admissible (const amrex::Real property, const amrex::Real carrier_number, const amrex::Real lower, const amrex::Real upper, const amrex::Real tolerance) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | evaluate_constraint_descriptor (const ConstraintDescriptor &constraint, const ConstraintTerm *terms, const amrex::Real *state) noexcept |
| FixtureInitialStateCanonicality | validate_fixture_initial_state_canonicality (const SBMLayout &layout, const std::vector< amrex::Real > &state) noexcept |
| const char * | host_write_path_name (const HostWritePath path) noexcept |
| bool | host_write_allowed (const bool sbm_active, const int component) noexcept |
| bool | host_write_range_allowed (const bool sbm_active, const int start_component, const int num_components) noexcept |
| void | require_host_write_allowed (const bool sbm_active, const int component, const HostWritePath path) |
| void | require_host_write_range_allowed (const bool sbm_active, const int start_component, const int num_components, const HostWritePath path) |
| PopulationRemapView | population_remap_view (const SBMLayout &layout, const int population_id) noexcept |
| PacketApplicationResult | apply_packet_routing (const SBMLayout &layout, const PacketRoutingPlan &plan, const std::vector< amrex::Real > &property_packet_amounts, std::vector< amrex::Real > &candidate_state) |
| ReconstructionStatus | reconstruct_bin (const SBMLayout &layout, const int population_id, const int bin, const std::vector< amrex::Real > &persisted_state, ReconstructionDelta &reconstruction) |
| bool | integrate_interval (const ReconstructionDelta &reconstruction, const amrex::Real lower, const amrex::Real upper, const bool include_upper, IntegratedMoments &integral) |
| bool | project_reconstruction_bin (const SBMLayout &layout, const ReconstructionDelta &reconstruction, std::vector< amrex::Real > &candidate_state) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | valid_population_remap_context (const PopulationRemapView &population) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | valid_population_remap_view (const PopulationRemapView &population) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | same_population_context (const PopulationRemapView &left, const PopulationRemapView &right) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PacketRoutingPlan | plan_packet_routing (const PopulationRemapView population, const amrex::Real packet_number, const amrex::Real particle_mass) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PacketApplicationCoreResult | apply_packet_routing_core (const PopulationRemapView population, const PacketRoutingPlan plan, const amrex::Real *property_packet_amounts, const int property_count, amrex::Real *residual_properties, const int residual_capacity, amrex::Real *candidate_state, const int state_count) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE ReconstructionStatus | reconstruct_bin_core (const PopulationRemapView population, const int bin, const amrex::Real *persisted_state, const int state_count, amrex::Real *property_per_particle, const int property_capacity, ReconstructionDeltaView &reconstruction) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | integrate_interval_core (const ReconstructionDeltaView reconstruction, const amrex::Real lower, const amrex::Real upper, const bool include_upper, amrex::Real *attached_properties, const int property_capacity, IntegratedMomentsCoreResult &integral) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | project_reconstruction_bin_core (const PopulationRemapView population, const ReconstructionDeltaView reconstruction, amrex::Real *candidate_state, const int state_count) noexcept |
| constexpr RepresentationIdentity | representation_identity (const MomentMode mode) noexcept |
| std::string | restart_schema (const SBMLayout &layout) |
| bool | restart_schema_matches (const SBMLayout &layout, const std::string &persisted) |
| bool | authoritative_state_admissible (const amrex::MultiFab &spectrum, const SBMLayout &layout, const int level, std::string *diagnostic) |
| bool | restart_projection_matches (const amrex::MultiFab &spectrum, const amrex::MultiFab &persisted_core, const SBMBulkProjection &projection, const int qc_component, const int qr_component, const amrex::Real tolerance_scale) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | copy_host_slow_component (const amrex::Array4< amrex::Real > ¤t, const amrex::Array4< const amrex::Real > &predictor, const int i, const int j, const int k, const int component, const bool sbm_active, const int qc_component, const int qr_component) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | try_two_moment_to_endpoints (const amrex::Real C, const amrex::Real M, const amrex::Real lower, const amrex::Real upper, EndpointTransform &result) noexcept |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | try_endpoints_to_two_moment (const amrex::Real L, const amrex::Real H, const amrex::Real lower, const amrex::Real upper, amrex::Real &C, amrex::Real &M) noexcept |
|
strong |
Result of applying the M3 spectral state policy at one oriented face.
| Enumerator | |
|---|---|
| PeriodicSharedFace | |
| ZeroNormalFlux | |
| InteriorDonor | |
| ExplicitSpectralInflow | |
| RejectInwardOutflow | |
| RejectMissingInflowState | |
| RejectIncompleteInflowState | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Semantic class of an attached carrier-bin extensive quantity.
ExtensiveMass is nonnegative additional mass and is not part of the water projection. NumberCarried is a nonnegative count-like quantity. A MassBoundedSubset is nonnegative and may be constrained by its carrier mass when that future physics is implemented.
| Enumerator | |
|---|---|
| ExtensiveMass | |
| NumberCarried | |
| MassBoundedSubset | |
|
strong |
|
strong |
|
strong |
|
strong |
| PacketApplicationResult erf_sbm::apply_packet_routing | ( | const SBMLayout & | layout, |
| const PacketRoutingPlan & | plan, | ||
| const std::vector< amrex::Real > & | property_packet_amounts, | ||
| std::vector< amrex::Real > & | candidate_state | ||
| ) |

|
noexcept |
Allocation-free packet application. The first pass validates the complete plan, residual outputs, and every candidate increment. The second pass commits only after all failure paths have been ruled out. Input/output and property/state storage supplied by the caller must not overlap.
Referenced by apply_packet_routing().


| bool erf_sbm::authoritative_state_admissible | ( | const amrex::MultiFab & | spectrum, |
| const SBMLayout & | layout, | ||
| int | level, | ||
| std::string * | diagnostic = nullptr |
||
| ) |
Validate every valid-cell value against the layout's runtime constraints.
Referenced by erf_sbm::SBMTransport::advance_stage(), ProlongCarrierRelativeSpectrum(), ERF::ReadCheckpointFile(), and RestrictMappedSpectrum().


|
inline |
Referenced by erf_sbm::SpectralGrid::identity(), and erf_sbm::SBMLayout::SBMLayout().

|
noexcept |
Perform ERF's predictor-to-current copy for one slow state component.
Referenced by erf_slow_rhs_post().

|
noexcept |
Evaluate a validated flattened constraint in host or device code.
| FlattenedConstraintSet erf_sbm::flatten_constraint_groups | ( | const std::vector< ConstraintGroup > & | groups, |
| int | state_components | ||
| ) |
Flatten arbitrary semantic groups through the production sparse format.
Referenced by make_constraint_descriptors().


|
noexcept |
The native host retains qv; SBM exclusively owns the compact liquid lanes.

|
noexcept |
|
noexcept |
Check every component in a native writer's complete, non-empty write range.
Referenced by host_write_allowed(), and require_host_write_range_allowed().

| bool erf_sbm::integrate_interval | ( | const ReconstructionDelta & | reconstruction, |
| const amrex::Real | lower, | ||
| const amrex::Real | upper, | ||
| const bool | include_upper, | ||
| IntegratedMoments & | integral | ||
| ) |

|
noexcept |
Integrate one reconstructed delta over [lower, upper), optionally including upper.
Referenced by integrate_interval().


| std::pair< amrex::Real, amrex::Real > erf_sbm::inverse_two_moment | ( | amrex::Real | L, |
| amrex::Real | H, | ||
| amrex::Real | lower, | ||
| amrex::Real | upper | ||
| ) |
|
constexprnoexcept |
Decide the face-level spectral advection semantics without performing ERF's deferred physical-boundary ghost-fill lifecycle. At a physical face whose high-order stencil is not qualified, the admissible donor proposal remains available and high-order transport falls back to it.
| std::vector< AttachedPropertySupportDescriptor > erf_sbm::make_attached_property_support_descriptors | ( | const SBMLayout & | layout | ) |

| std::vector< ConstraintClosureChunk > erf_sbm::make_constraint_closure_chunks | ( | const SBMLayout & | layout, |
| const int | max_groups | ||
| ) |
| FlattenedConstraintSet erf_sbm::make_constraint_descriptors | ( | const SBMLayout & | layout | ) |
Flatten complete semantic groups into bounded device descriptors.

| std::vector< ConstraintGroup > erf_sbm::make_constraint_groups | ( | const SBMLayout & | layout | ) |
Build deterministic groups from the immutable runtime layout.
Referenced by authoritative_state_admissible(), ERF::ERF_shared(), make_attached_property_support_descriptors(), make_constraint_closure_chunks(), and make_constraint_descriptors().


|
noexcept |
Classify one packet without allocation or state mutation. Two-moment routing uses half-open intervals, includes the global top edge, and admits only four representable steps of outer-boundary roundoff. The plan keeps the original packet mass while its destination records the exact boundary mass. The immutable metadata must have been fully qualified once before this call; the per-packet path performs only constant-time context checks and a logarithmic interval search.

|
noexcept |
Host adapter building a stable view into the immutable SBMLayout.
Referenced by apply_packet_routing(), authoritative_state_admissible(), project_reconstruction_bin(), reconstruct_bin(), erf_sbm::SBMTransport::SBMTransport(), and validate_fixture_initial_state_canonicality().


| bool erf_sbm::project_reconstruction_bin | ( | const SBMLayout & | layout, |
| const ReconstructionDelta & | reconstruction, | ||
| std::vector< amrex::Real > & | candidate_state | ||
| ) |

|
noexcept |
Project one reconstructed bin into caller-owned state after full validation.
Referenced by project_reconstruction_bin().


| bool erf_sbm::ProlongCarrierRelativeSpectrum | ( | const SBMLayout & | layout, |
| const SBMAMRStateView & | coarse, | ||
| const SBMAMRStateView & | fine_target, | ||
| const amrex::Geometry & | coarse_geometry, | ||
| const amrex::Geometry & | fine_geometry, | ||
| const amrex::IntVect & | ratio, | ||
| const int | fine_level, | ||
| MultiFab & | fine_candidate, | ||
| std::string & | diagnostic | ||
| ) |

| bool erf_sbm::ProlongCarrierRelativeSpectrum | ( | const SBMLayout & | layout, |
| const SBMAMRStateView & | coarse, | ||
| const SBMAMRStateView & | fine_target, | ||
| const amrex::Geometry & | coarse_geometry, | ||
| const amrex::Geometry & | fine_geometry, | ||
| const amrex::IntVect & | ratio, | ||
| int | fine_level, | ||
| amrex::MultiFab & | fine_candidate, | ||
| std::string & | diagnostic | ||
| ) |
Form a same-time piecewise-constant carrier-relative fine candidate. On success, overwrite the destination's valid cells with the complete, admitted result. On failure (including a rejection on another MPI rank), leave every destination valid cell and all source views unchanged. This operator does not itself commit authoritative SBM state.
|
noexcept |
Host reference for the finite property-support constraints.

| ReconstructionStatus erf_sbm::reconstruct_bin | ( | const SBMLayout & | layout, |
| const int | population_id, | ||
| const int | bin, | ||
| const std::vector< amrex::Real > & | persisted_state, | ||
| ReconstructionDelta & | reconstruction | ||
| ) |

|
noexcept |
Referenced by reconstruct_bin().


|
constexprnoexcept |
Referenced by erf_sbm::SBMLayout::inspection(), and erf_sbm::SBMLayout::SBMLayout().

| void erf_sbm::require_host_write_allowed | ( | bool | sbm_active, |
| int | component, | ||
| HostWritePath | path | ||
| ) |
Fail closed when a native host writer reaches a component owned by SBM.

| void erf_sbm::require_host_write_range_allowed | ( | bool | sbm_active, |
| int | start_component, | ||
| int | num_components, | ||
| HostWritePath | path | ||
| ) |
Fail closed when any component in a native writer's range is owned by SBM.
Referenced by erf_slow_rhs_post(), if(), and require_host_write_allowed().


| bool erf_sbm::restart_projection_matches | ( | const amrex::MultiFab & | spectrum, |
| const amrex::MultiFab & | persisted_core, | ||
| const SBMBulkProjection & | projection, | ||
| int | qc_component, | ||
| int | qr_component, | ||
| amrex::Real | tolerance_scale = amrex::Real(128.0) |
||
| ) |
Compare the projected spectrum to checkpointed qc/qr without mutating core.
Referenced by ERF::ReadCheckpointFile().


| std::string erf_sbm::restart_schema | ( | const SBMLayout & | layout | ) |
Exact semantic restart schema; no implicit checkpoint migration is performed.
Referenced by restart_schema_matches(), and ERF::WriteCheckpointFile().


| bool erf_sbm::restart_schema_matches | ( | const SBMLayout & | layout, |
| const std::string & | persisted | ||
| ) |
Compare persisted and expected schemas byte-for-byte.
Referenced by ERF::ReadCheckpointFile().


| bool erf_sbm::RestrictMappedSpectrum | ( | const SBMLayout & | layout, |
| const SBMAMRStateView & | fine, | ||
| const SBMAMRStateView & | coarse, | ||
| const amrex::IntVect & | ratio, | ||
| const int | coarse_level, | ||
| MultiFab & | coarse_candidate, | ||
| std::string & | diagnostic | ||
| ) |

| bool erf_sbm::RestrictMappedSpectrum | ( | const SBMLayout & | layout, |
| const SBMAMRStateView & | fine, | ||
| const SBMAMRStateView & | coarse, | ||
| const amrex::IntVect & | ratio, | ||
| int | coarse_level, | ||
| amrex::MultiFab & | coarse_candidate, | ||
| std::string & | diagnostic | ||
| ) |
Form an H-conservative coarse candidate from matching-time spectral views. On success, overwrite the destination's valid cells with the complete, admitted result. On failure (including a rejection on another MPI rank), leave every destination valid cell and all source views unchanged. This operator does not itself commit authoritative SBM state.
|
noexcept |
Referenced by apply_packet_routing_core(), project_reconstruction_bin_core(), and erf_sbm::remap_detail::route_plan_is_consistent().

| EndpointTransform erf_sbm::transform_two_moment | ( | amrex::Real | C, |
| amrex::Real | M, | ||
| amrex::Real | lower, | ||
| amrex::Real | upper | ||
| ) |
|
noexcept |
Allocation-free canonical inverse transform for host and device callers.
Referenced by erf_sbm::SpectralGrid::endpoints_to_two_moment().

|
noexcept |
Allocation-free canonical forward transform used by host and device code. Returns false instead of throwing when the state is invalid or materially unrealizable. The throwing host API below delegates to this function.
Referenced by erf_sbm::SBMTransport::advance_stage(), reconstruct_bin_core(), erf_sbm::SpectralGrid::two_moment_realizable(), and erf_sbm::SpectralGrid::two_moment_to_endpoints().

|
noexcept |
Constant-time structural/context checks for already qualified immutable metadata. Callers must derive views from a validated SBMLayout or call the full validator below once before using a raw view in the remapping cores.
Referenced by apply_packet_routing_core(), erf_sbm::remap_detail::canonical_one_moment_bin_state_view(), erf_sbm::remap_detail::canonical_two_moment_bin_state_view(), erf_sbm::remap_detail::canonical_two_moment_moments(), plan_packet_routing(), population_remap_view(), project_reconstruction_bin_core(), reconstruct_bin_core(), erf_sbm::remap_detail::route_plan_is_consistent(), and valid_population_remap_view().

|
noexcept |
Full O(nbins + properties^2) validator for untrusted/arbitrary views.

|
inlinenoexcept |
Apply the persisted-state admission rule to each bin before ERF accepts a user/fixture initial spectrum. Kept as the constructor's shared validation seam so unit tests can exercise the exact candidate-layout check.
Referenced by ERF::ERF_shared().

