include/pops/runtime/facade_options.hpp File ReferenceΒΆ

adc_cpp: include/pops/runtime/facade_options.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
facade_options.hpp File Reference

OPTIONS PODs for the public facades (System / AmrSystem), grouping the long families of HOMOGENEOUS parameters that posed an ordering footgun (C++ Core Guidelines I.23). More...

#include <string>
#include <vector>
+ Include dependency graph for facade_options.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pops::SourceStageOptions
 Settings of the Schur-condensed SOURCE STAGE (cf. More...
 
struct  pops::CoupledSourceProgram
 BYTECODE description of a generic inter-species COUPLED SOURCE (cf. More...
 

Namespaces

namespace  pops
 

Detailed Description

OPTIONS PODs for the public facades (System / AmrSystem), grouping the long families of HOMOGENEOUS parameters that posed an ordering footgun (C++ Core Guidelines I.23).

Layer: include/pops/runtime. Role: carry, in a single named aggregate, the settings of a Schur-condensed source stage and the bytecode description of an inter-species coupled source. These families were previously flat lists of parameters of the SAME type (several adjacent std::string, several parallel std::vector<int>) – silently swappable at the call site. Grouping them into a named POD makes the call self-documenting (designated initializers) and removes the swap risk. Contract: flat POD crossing the bindings without friction. The in-class DEFAULTS reproduce EXACTLY the old defaults of the flat parameters -> no behavior change.

Invariants:

  • each field keeps the name, type and default of the old flat parameter of the same name;
  • these PODs live ABOVE the ABI layer (compiled_block_abi.hpp / native_loader.hpp): they never cross the extern "C" boundary of a .so loader. The SEMANTIC extern "C" ABI (residual / advance, structs crossing the loader) therefore stays UNCHANGED. On the other hand the abi_key() LITERAL CHANGES: it embeds the token headers=POPS_HEADER_SIG (conservative sha256 of the path and content of EVERY header under include/, cf. abi_key.hpp and python/CMakeLists.txt); merely ADDING this header and EDITING system.hpp / amr_system.hpp shifts POPS_HEADER_SIG. This is EXPECTED and harmless: no semantic ABI changes, but add_native_block will reject the AOT .so generated before this change (divergent signature) -> a one-time regeneration of the stale .so.