ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
List of all members
ryujin::TimeLoop< Description, dim, Number > Class Template Referencefinal

#include <source/time_loop.h>

Inheritance diagram for ryujin::TimeLoop< Description, dim, Number >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::TimeLoop< Description, dim, Number >:
Collaboration graph
[legend]

Public Member Functions

Constructor and setup
 TimeLoop (const MPI_Comm &mpi_comm)
 
void run ()
 

Protected Member Functions

Private methods for run()
template<typename Callable >
void read_checkpoint (StateVector &state_vector, const std::string &base_name, Number &t, unsigned int &output_cycle, const Callable &prepare_compute_kernels)
 
void write_checkpoint (const StateVector &state_vector, const std::string &base_name, const Number &t, const unsigned int &output_cycle)
 
template<typename Callable >
void adapt_mesh_and_transfer_state_vector (StateVector &state_vector, const Callable &prepare_compute_kernels)
 
void compute_error (StateVector &state_vector, Number t)
 
void output (StateVector &state_vector, const std::string &name, const Number t, const unsigned int cycle)
 
void print_parameters (std::ostream &stream)
 
void print_mpi_partition (std::ostream &stream)
 
void print_memory_statistics (std::ostream &stream)
 
void print_timers (std::ostream &stream)
 
void print_throughput (unsigned int cycle, Number t, std::ostream &stream, bool final_time=false)
 
void print_info (const std::string &header)
 
void print_head (const std::string &header, const std::string &secondary, std::ostream &stream)
 
void print_cycle_statistics (unsigned int cycle, Number t, unsigned int output_cycle, bool write_to_logfile=false, bool final_time=false)
 

Typedefs and constexpr constants

using HyperbolicSystem = typename Description::HyperbolicSystem
 
using View = typename Description::template HyperbolicSystemView< dim, Number >
 
using ParabolicSystem = typename Description::ParabolicSystem
 
using ParabolicSolver = typename Description::template ParabolicSolver< dim, Number >
 
using ScalarNumber = typename View::ScalarNumber
 
using StateVector = typename View::StateVector
 
using ScalarVector = Vectors::ScalarVector< Number >
 
static constexpr auto problem_dimension = View::problem_dimension
 
static constexpr auto n_precomputed_values = View::n_precomputed_values
 

Detailed Description

template<typename Description, int dim, typename Number = double>
class ryujin::TimeLoop< Description, dim, Number >

The high-level time loop driving the computation.

Definition at line 36 of file time_loop.h.

Member Typedef Documentation

◆ HyperbolicSystem

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::HyperbolicSystem = typename Description::HyperbolicSystem

Definition at line 44 of file time_loop.h.

◆ View

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::View = typename Description::template HyperbolicSystemView<dim, Number>

Definition at line 46 of file time_loop.h.

◆ ParabolicSystem

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::ParabolicSystem = typename Description::ParabolicSystem

Definition at line 49 of file time_loop.h.

◆ ParabolicSolver

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::ParabolicSolver = typename Description::template ParabolicSolver<dim, Number>

Definition at line 51 of file time_loop.h.

◆ ScalarNumber

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::ScalarNumber = typename View::ScalarNumber

Definition at line 54 of file time_loop.h.

◆ StateVector

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::StateVector = typename View::StateVector

Definition at line 60 of file time_loop.h.

◆ ScalarVector

template<typename Description , int dim, typename Number = double>
using ryujin::TimeLoop< Description, dim, Number >::ScalarVector = Vectors::ScalarVector<Number>

Definition at line 62 of file time_loop.h.

Constructor & Destructor Documentation

◆ TimeLoop()

template<typename Description , int dim, typename Number >
ryujin::TimeLoop< Description, dim, Number >::TimeLoop ( const MPI_Comm &  mpi_comm)

Constructor.

Definition at line 29 of file time_loop.template.h.

Member Function Documentation

◆ run()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::run

Run the high-level time loop.

Definition at line 220 of file time_loop.template.h.

Referenced by ryujin::Dispatch< Description, Number >::Dispatch().

◆ read_checkpoint()

template<typename Description , int dim, typename Number >
template<typename Callable >
void ryujin::TimeLoop< Description, dim, Number >::read_checkpoint ( StateVector state_vector,
const std::string &  base_name,
Number &  t,
unsigned int &  output_cycle,
const Callable &  prepare_compute_kernels 
)
protected

Performs a resume operation. Given a base_name the function tries to locate correponding checkpoint files and will read in the saved state state_vector at saved time t with saved output cycle output_cycle.

Definition at line 483 of file time_loop.template.h.

References ryujin::SolutionTransfer< Description, dim, Number >::project(), and ryujin::SolutionTransfer< Description, dim, Number >::set_handle().

◆ write_checkpoint()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::write_checkpoint ( const StateVector state_vector,
const std::string &  base_name,
const Number &  t,
const unsigned int &  output_cycle 
)
protected

Write out a checkpoint to disk. Given a base_name and a current state U at time t and output cycle output_cycle the function writes out the state to disk using boost::archive for serialization.

Precondition
the state_vector has to have been prepared prior to a call to write_checkpoint().

Definition at line 572 of file time_loop.template.h.

References ryujin::SolutionTransfer< Description, dim, Number >::get_handle(), and ryujin::SolutionTransfer< Description, dim, Number >::prepare_projection().

◆ adapt_mesh_and_transfer_state_vector()

template<typename Description , int dim, typename Number >
template<typename Callable >
void ryujin::TimeLoop< Description, dim, Number >::adapt_mesh_and_transfer_state_vector ( StateVector state_vector,
const Callable &  prepare_compute_kernels 
)
protected

Perform a mesh adaptation cycle according to the selected strategy in the MeshAdaptor class. The state vector is transferred to the new discretization.

Definition at line 638 of file time_loop.template.h.

References ryujin::SolutionTransfer< Description, dim, Number >::prepare_projection(), and ryujin::SolutionTransfer< Description, dim, Number >::project().

◆ compute_error()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::compute_error ( StateVector state_vector,
Number  t 
)
protected

Definition at line 685 of file time_loop.template.h.

References ryujin::pow().

◆ output()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::output ( StateVector state_vector,
const std::string &  name,
const Number  t,
const unsigned int  cycle 
)
protected

Definition at line 848 of file time_loop.template.h.

◆ print_parameters()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_parameters ( std::ostream &  stream)
protected

Definition at line 905 of file time_loop.template.h.

References ryujin::print_revision_and_version().

◆ print_mpi_partition()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_mpi_partition ( std::ostream &  stream)
protected

Definition at line 930 of file time_loop.template.h.

◆ print_memory_statistics()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_memory_statistics ( std::ostream &  stream)
protected

Definition at line 1008 of file time_loop.template.h.

◆ print_timers()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_timers ( std::ostream &  stream)
protected

Definition at line 1037 of file time_loop.template.h.

◆ print_throughput()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_throughput ( unsigned int  cycle,
Number  t,
std::ostream &  stream,
bool  final_time = false 
)
protected

◆ print_info()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_info ( const std::string &  header)
protected

Definition at line 1288 of file time_loop.template.h.

◆ print_head()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_head ( const std::string &  header,
const std::string &  secondary,
std::ostream &  stream 
)
protected

Definition at line 1299 of file time_loop.template.h.

◆ print_cycle_statistics()

template<typename Description , int dim, typename Number >
void ryujin::TimeLoop< Description, dim, Number >::print_cycle_statistics ( unsigned int  cycle,
Number  t,
unsigned int  output_cycle,
bool  write_to_logfile = false,
bool  final_time = false 
)
protected

Member Data Documentation

◆ problem_dimension

template<typename Description , int dim, typename Number = double>
constexpr auto ryujin::TimeLoop< Description, dim, Number >::problem_dimension = View::problem_dimension
staticconstexpr

Definition at line 56 of file time_loop.h.

◆ n_precomputed_values

template<typename Description , int dim, typename Number = double>
constexpr auto ryujin::TimeLoop< Description, dim, Number >::n_precomputed_values = View::n_precomputed_values
staticconstexpr

Definition at line 58 of file time_loop.h.


The documentation for this class was generated from the following files: