36 using Tscal = shambase::VecComponent<Tvec>;
37 using Tgridscal = shambase::VecComponent<TgridVec>;
52 inline void init_required_fields() { solver_config.set_layout(context.get_pdl_write()); }
56 void do_debug_vtk_dump(std::string filename);
58 inline void print_timestep_logs() {
63 "Godunov",
"time since start :", shambase::details::get_wtime(),
"(s)");
69 inline Tscal evolve_once_time_expl(Tscal t_current, Tscal dt_input) {
73 return solver_config.
get_dt();
76 inline bool evolve_until(Tscal target_time,
i32 niter_max) {
78 Tscal dt = solver_config.
get_dt();
81 if (t > target_time) {
83 "the target time is higher than the current time");
86 if (t + dt > target_time) {
94 while (solver_config.
get_time() < target_time) {
98 if ((iter_count >= niter_max) && (niter_max != -1)) {
99 logger::info_ln(
"SPH",
"stopping evolve until because of niter =", iter_count);
104 print_timestep_logs();
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...