include/pops/core/state/variables.hpp Source FileΒΆ
|
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
|
variables.hpp
Go to the documentation of this file.
Definition amr_hierarchy.hpp:29
VariableKind
Kind of a variable set: conserved (U) or primitive (W).
Definition variables.hpp:22
@ Primitive
@ Conservative
std::string roles_meta()
A model's "roles" metadata: "cons_roles_csv|prim_roles_csv" (empty side = roles not provided).
Definition variables.hpp:241
int coupling_role_index(const VariableSet &vs, VariableRole role, int fallback, const char *origin, const std::string &block)
Resolve a REQUIRED canonical role to its component in vs, for a NAMED coupling (add_collision / add_t...
Definition variables.hpp:219
const char * role_name(VariableRole r)
Human-readable name of a role (introspection, Python binding).
Definition variables.hpp:97
std::string roles_csv(const VariableSet &vs)
CSV of a VariableSet's roles (role_name, separator ',').
Definition variables.hpp:172
@ VelocityY
@ VelocityX
@ Energy
@ MomentumZ
@ Density
@ MomentumX
@ Custom
@ Pressure
@ MomentumY
@ VelocityZ
@ Temperature
@ Scalar
void parse_roles_into(VariableSet &vs, const std::string &csv)
Inverse of roles_csv: fill vs.roles (and vs.user_roles for any NON-canonical token) from a roles CSV.
Definition variables.hpp:190
VariableRole role_from_name(const std::string &s)
Forward declaration: VariableSet::index_of(const std::string&) resolves a canonical role NAME via rol...
Definition variables.hpp:130
std::string names_csv(const VariableSet &vs)
CSV of a VariableSet's names (separator ',').
Definition variables.hpp:158
std::string var_names_meta()
A model's "names" metadata: "cons_csv|prim_csv" (separator '|' between the two sets).
Definition variables.hpp:235
A model's variable set: kind (cons/prim), names, size, canonical roles (optional, parallel to names; ...
Definition variables.hpp:58
Variable at(int i) const
Full descriptor of component i (Custom role if not provided).
Definition variables.hpp:90
std::vector< std::string > user_roles
parallel to names; per-component user-defined role label (Custom role); empty entry = canonical role
Definition variables.hpp:63
int index_of(const std::string &role) const
Index of the component carrying role addressed BY NAME: a canonical role name (role_from_name) first,...
Definition variables.hpp:78
std::vector< VariableRole > roles
parallel to names; empty = roles not provided
Definition variables.hpp:62
int index_of(VariableRole role) const
Index of the component carrying role (first occurrence), -1 if absent.
Definition variables.hpp:67
A variable: name, physical role, component index in the state.
Definition variables.hpp:47
Generated by