![]() |
ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
|

Classes | |
| class | ryujin::Checkpointing< dim, Number > |
| class | ryujin::Environment |
| struct | ryujin::Equation |
| class | ryujin::EquationRegistration< HD, PD > |
| class | ryujin::Logger< dim, Number > |
| class | ryujin::Scheduler< Number > |
| class | ryujin::Simulation< HD, PD, dim, Number > |
| struct | ryujin::TaskComposition< dim, Number > |
| struct | ryujin::TaskContext< Number > |
| class | ryujin::Trigger< Number > |
Enumerations | |
| enum class | ryujin::TaskPhase : std::uint8_t { ryujin::TaskPhase::pre_step , ryujin::TaskPhase::adapt , ryujin::TaskPhase::step , ryujin::TaskPhase::post_step } |
| enum class | ryujin::TriggerMode : std::uint8_t { ryujin::TriggerMode::every_cycle , ryujin::TriggerMode::timer_tick , ryujin::TriggerMode::wall_clock , ryujin::TriggerMode::time_points } |
Functions | |
| template<typename Setup > | |
| void | ryujin::write_parameter_files (const std::string &name, bool write_detailed_description, const Setup &setup) |
| std::map< std::string, Equation > & | ryujin::equations () |
The Environment that initializes MPI, the thread pools, and the instrumentation, the registry of equations, the Simulation, the TaskComposition that assembles the Simulation and the tasks, the Scheduler that runs them, and write_parameter_files() that writes the default parameter files (include/ryujin/driver).
The ryujin executable selects the equation and the dimension at run time. Every equation registers itself with a constant EquationRegistration<HD, PD> at namespace scope in source/driver/equation_*.cc. Its constructor runs during static initialization and inserts an Equation under the given name into the map returned by equations(). An Equation holds two std::function objects, so that main() (source/main.cc) can call them without knowing HD, PD, or the dimension. main() reads the run time parameters "dimension" and "equation", looks up the equation, and calls Equation::run, which switches over the dimension and constructs the Simulation and the TaskComposition. If the parameter file does not exist, main() instead calls Equation::create_parameter_files of every registered equation:
Only EquationRegistration and the Simulation depend on HD and PD. The TaskComposition and all tasks use the Simulation through Interface::Simulation and are compiled once per dimension.
The Scheduler runs a list of tasks (see Interface::Task). The active tasks are the required tasks, followed by the tasks named in the run time parameter "tasks". After calling initialize(), start(), and prepare() on every active task, the Scheduler runs cycles of four phases. Each task belongs to exactly one TaskPhase; within a phase the Scheduler executes the tasks of that phase in the order of the active tasks. The diagram lists the tasks that TaskComposition assigns to each phase:
The first required task is the primary task. In TaskComposition this is the Simulation, which sets up the discretization in prepare() and chooses the time step size tau in the step phase. All values the Scheduler shares with the tasks, such as t, tau, the cycle, and whether a timer tick has been reached, are stored in the TaskContext. Tasks decide in which cycles to do their work with a Trigger.
|
strong |
The phase of a cycle of the Scheduler in which a Task runs.
| Enumerator | |
|---|---|
| pre_step | Before the time step, at time t. Output and postprocessing tasks typically run in this phase. |
| adapt | Mesh adaptation, at time t. The Scheduler runs this phase only if a time step follows. A task of this phase that changes the mesh sets TaskContext::prepare_required. |
| step | The time step from t to t + tau. The first task of this phase chooses the time step size tau, all subsequent tasks advance over the same interval (Lie splitting). |
| post_step | After the time step, at time t + tau. |
|
strong |
The condition under which a Trigger fires.
| void ryujin::write_parameter_files | ( | const std::string & | name, |
| bool | write_detailed_description, | ||
| const Setup & | setup | ||
| ) |
Write the default parameter file "default_parameters-<name>.prm", and, if write_detailed_description is set, the parameter file "default_parameters-<name>-description.prm" with the documentation of all parameters.
Definition at line 46 of file equation.h.
| std::map< std::string, Equation > & ryujin::equations | ( | ) |
All registered equations, sorted by name. The equations of ryujin are registered by default.
Referenced by ryujin::EquationRegistration< HD, PD >::EquationRegistration().