include/pops/core/model/physical_model.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
|
C++20 concepts defining the contract of the physics layer. More...
#include <pops/core/state/state.hpp>#include <pops/core/foundation/types.hpp>#include <pops/core/state/variables.hpp>#include <concepts>
Include dependency graph for physical_model.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | pops |
Concepts | |
| concept | pops::PhysicalModel |
| Minimal contract of a physical model. | |
| concept | pops::HasStabilitySpeed |
| OPTIONAL trait: stability speed lambda* replacing max_wave_speed in the block CFL. | |
| concept | pops::HasSourceFrequency |
| OPTIONAL trait: local source frequency mu [1/s] (bound dt <= cfl / max mu, without h). | |
| concept | pops::HasStabilityDt |
| OPTIONAL trait: direct admissible step per cell (bound dt <= min stability_dt, without cfl). | |
| concept | pops::HasPointwiseProjection |
| Trait OPTIONNEL : PROJECTION PONCTUELLE post-pas U -> project(U, aux) (ADC-177). | |
| concept | pops::HasPrimitiveVars |
| OPTIONAL extension of a PhysicalModel: primitive variables + cons<->prim conversions. | |
| concept | pops::HyperbolicPhysicalModel |
| Hyperbolic brick of a model: flux + wave speed + variables + cons<->prim conversions. | |
| concept | pops::HyperbolicModel |
Old name (compat): HyperbolicPhysicalModel used to be HyperbolicModel. | |
Functions | |
| template<class M > | |
| POPS_HD constexpr int | pops::aux_comps () |
| Width of the aux channel a model CONSUMES. | |
Detailed Description
C++20 concepts defining the contract of the physics layer.
Concept hierarchy: PhysicalModel: minimal contract (flux, source, wave speed, elliptic RHS). HasPrimitiveVars: optional extension (primitive variables + cons<->prim conversions). HyperbolicPhysicalModel: complete hyperbolic brick (flux + conversions + Variables). HyperbolicModel: compat alias for HyperbolicPhysicalModel.
Aux INVARIANT: every PhysicalModel receives an pops::Aux (phi, grad phi, extra fields). Generalizing the auxiliary to an arbitrary Model::Aux is possible later; today the contract says exactly what load_aux builds.
device INVARIANT: the concept methods (flux, source, ...) must be POPS_HD if they are called in kernels. The concept does not check it – that is the responsibility of the model author.
Generated by