Template Class ModelBase

Class Documentation

template<class Derived, class Real, class Backend>
class ModelBase

Base class of MHD models using CRTP.

The derived class must implement the following members:

  • eos: equation of state

  • ic: initial condition

  • bc: boundary condition

  • src: source term (optional; default is no source)

Public Functions

inline explicit ModelBase(Config &cfg)
inline void update()

Default implementation of one timestep update.

The derived class may provide its own update() method.

inline void save_metadata()
inline void save_state()
inline void load_state()
inline void save_if_needed()
inline void run()

Public Members

Config &config
mpi::Shape mpi_shape
Time<Real> time
Grid<Real, backend::Host> grid
ExecContext<Real, Backend> exec_ctx
MHD<Real, Backend> mhd

Protected Functions

inline Derived &derived()