PhysicalModel Concept ReferenceΒΆ

adc_cpp: pops::PhysicalModel Concept 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
pops::PhysicalModel Concept Reference

Minimal contract of a physical model. More...

#include <physical_model.hpp>

Concept definition

template<class M>
requires(const M m, const typename M::State u, const typename M::Aux a, int dir) {
typename M::State;
typename M::Aux;
requires std::same_as<typename M::Aux, Aux>;
{ M::n_vars } -> std::convertible_to<int>;
{ m.flux(u, a, dir) } -> std::same_as<typename M::State>;
{ m.max_wave_speed(u, a, dir) } -> std::convertible_to<Real>;
{ m.source(u, a) } -> std::same_as<typename M::State>;
{ m.elliptic_rhs(u) } -> std::convertible_to<Real>;
}
Minimal contract of a physical model.
Definition physical_model.hpp:81

Detailed Description

Minimal contract of a physical model.

Requires: State, Aux == pops::Aux, n_vars, flux(u,a,dir), max_wave_speed(u,a,dir), source(u,a), elliptic_rhs(u). All these methods must be POPS_HD if called in kernels (not checked by the concept; responsibility of the author). Do not confuse with HyperbolicPhysicalModel which adds the variables and conversions.