include/pops/runtime/config/dispatch_tags.hpp File ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
SINGLE registry of spatial scheme tags (limiters + Riemann fluxes): shared source of truth for ALL dispatches (System make_block, AMR dispatch_amr_block / dispatch_amr_compiled, polar make_block_polar). More...
#include <stdexcept>#include <string>
Include dependency graph for dispatch_tags.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | pops::LimiterTag |
| Tag of a reconstruction LIMITER: user-facing name + halo width (n_ghost) required by its stencil. More... | |
| struct | pops::RiemannTag |
Tag of a Riemann FLUX: name + model CAPABILITY needs (DOCUMENTARY: the real guard is an if constexpr per model at the call-site – these flags do NOT drive the dispatch, they document the contract and serve the tests). More... | |
Namespaces | |
| namespace | pops |
| namespace | pops::detail |
Functions | |
| int | pops::limiter_n_ghost (const std::string &lim) |
Halo width required by the limiter lim (source: kLimiters). | |
| constexpr bool | pops::detail::ct_str_eq (const char *a, const char *b) |
| COMPILE-TIME C string equality (no constexpr <cstring> guaranteed everywhere). | |
| constexpr int | pops::limiter_n_ghost_ct (const char *lim) |
| COMPILE-TIME variant of limiter_n_ghost (const char* literal): -1 if unknown. | |
| void | pops::validate_limiter (const std::string &lim, const char *ctx="System") |
| Validates a LIMITER tag against kLimiters. | |
| void | pops::validate_riemann (const std::string &riem, bool polar=false, const char *ctx="System") |
| Validates a Riemann FLUX tag against kRiemanns. | |
| void | pops::throw_registry_dispatch_mismatch (const char *ctx, const char *kind, const std::string &tag) |
| DEFENSE-IN-DEPTH guard: reached only if a VALID tag (already accepted by validate_*) is routed by NO branch of the if/else dispatch – this is an inconsistency between the registry (kLimiters/kRiemanns) and the dispatch, hence a programming bug, not a user input. | |
Variables | |
| constexpr LimiterTag | pops::kLimiters [] |
| SINGLE SOURCE of the wired limiters (order = display priority: none < minmod < vanleer < weno5). | |
| constexpr RiemannTag | pops::kRiemanns [] |
| SINGLE SOURCE of the wired Riemann fluxes (order = message "(rusanov|hll|hllc|roe)"). | |
Detailed Description
SINGLE registry of spatial scheme tags (limiters + Riemann fluxes): shared source of truth for ALL dispatches (System make_block, AMR dispatch_amr_block / dispatch_amr_compiled, polar make_block_polar).
Before this header each dispatch carried its OWN tag table (limiters x fluxes) and its OWN error message; the tables diverged silently (a weno5 case forgotten on an hllc/roe AMR branch gave "unknown limiter" where System accepted it). Here: ONE kLimiters / kRiemanns table, shared VALIDATION functions (same messages, or clearer) and limiter_n_ghost (halo width). The call-sites keep their template if/else dispatch (the Limiter / Flux types are COMPILE-TIME, not tabulable without a heavy X-macro) BUT validate HERE FIRST -> centralized rejection; the final throw of the if/else becomes a "registry/dispatch inconsistency" guard (defense in depth, never reached in practice).
This header is deliberately LIGHT (no numerical dependency): it carries only strings and integers, not the Limiter / Flux types. It thus stays included early and cost-free. The capability NEEDS of the fluxes (hll: signed waves; hllc/roe: 2D Euler structure or model capability) are DOCUMENTED in kRiemanns but the real guard stays an if constexpr PER MODEL at the call-site (capabilities depend on the Model type, unavailable here).
Generated by