ModelAdapter< M > Struct Template 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::ModelAdapter< M > Struct Template Referencefinal
Adapts a STATIC model M into IModel<M::n_vars>. More...
#include <dynamic_model.hpp>
Inheritance diagram for pops::ModelAdapter< M >:
Collaboration diagram for pops::ModelAdapter< M >:Public Types | |
| using | State = StateVec< M::n_vars > |
Public Types inherited from pops::IModel< M::n_vars > | |
| using | State = StateVec< NV > |
Public Member Functions | |
| ModelAdapter ()=default | |
| ModelAdapter (M m) | |
| State | flux (const State &u, const Aux &a, int dir) const override |
| Real | max_wave_speed (const State &u, const Aux &a, int dir) const override |
| State | source (const State &u, const Aux &a) const override |
| Real | elliptic_rhs (const State &u) const override |
| State | to_primitive (const State &u) const override |
| State | to_conservative (const State &p) const override |
| int | n_aux () const override |
| Width of the aux channel that the model READS (cf. | |
Public Member Functions inherited from pops::IModel< M::n_vars > | |
| virtual | ~IModel ()=default |
| virtual State | flux (const State &u, const Aux &a, int dir) const=0 |
| virtual Real | max_wave_speed (const State &u, const Aux &a, int dir) const=0 |
| virtual State | source (const State &, const Aux &) const |
| Source term S(U, aux) (default: zero, model without source). | |
| virtual Real | elliptic_rhs (const State &) const |
| Elliptic right-hand side f(U) of the system Poisson (default: zero, no coupling). | |
| virtual State | to_primitive (const State &u) const |
| Conservative -> primitive conversion (P = M.to_primitive(U)). | |
| virtual State | to_conservative (const State &p) const |
| Primitive -> conservative conversion (U = M.to_conservative(P)). | |
Public Attributes | |
| M | model {} |
Additional Inherited Members | |
Static Public Attributes inherited from pops::IModel< M::n_vars > | |
| static constexpr int | n_vars |
Detailed Description
template<class M>
struct pops::ModelAdapter< M >
struct pops::ModelAdapter< M >
Adapts a STATIC model M into IModel<M::n_vars>.
M may be a hyperbolic brick (flux + max_wave_speed) or a full CompositeModel (flux + source + elliptic_rhs): source / elliptic_rhs are forwarded WHEN M exposes them (otherwise default value). Lets a model GENERATED by the DSL (CompositeModel<GenHyp, GenSrc, GenEll>) be loaded at runtime as a real coupled block.
Member Typedef Documentation
◆ State
template<class M >
| using pops::ModelAdapter< M >::State = StateVec<M::n_vars> |
Constructor & Destructor Documentation
◆ ModelAdapter() [1/2]
template<class M >
|
default |
◆ ModelAdapter() [2/2]
template<class M >
|
inlineexplicit |
Member Function Documentation
◆ elliptic_rhs()
template<class M >
|
inlineoverride |
◆ flux()
template<class M >
|
inlineoverride |
◆ max_wave_speed()
template<class M >
|
inlineoverride |
◆ n_aux()
template<class M >
|
inlineoverridevirtual |
Width of the aux channel that the model READS (cf.
aux_comps). Lets the System runtime size and marshal the right number of components to the host path (B_z...). Default: base contract (phi/grad), for a model that does not read any extra field.
Reimplemented from pops::IModel< M::n_vars >.
◆ source()
template<class M >
|
inlineoverride |
◆ to_conservative()
template<class M >
|
inlineoverride |
◆ to_primitive()
template<class M >
|
inlineoverride |
Member Data Documentation
◆ model
template<class M >
| M pops::ModelAdapter< M >::model {} |
The documentation for this struct was generated from the following file:
- include/pops/runtime/dynamic/dynamic_model.hpp
Generated by