16 #ifndef dealii_time_stepping_h 17 #define dealii_time_stepping_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/signaling_nan.h> 27 DEAL_II_NAMESPACE_OPEN
61 RK_CLASSIC_FOURTH_ORDER,
95 template <
typename VectorType>
115 evolve_one_time_step(
116 std::vector<std::function<VectorType(
const double,
const VectorType &)>>
118 std::vector<std::function<
119 VectorType(
const double,
const double,
const VectorType &)>> &J_inverse,
134 get_status()
const = 0;
145 template <
typename VectorType>
173 std::vector<std::function<VectorType(
const double,
const VectorType &)>>
175 std::vector<std::function<
176 VectorType(
const double,
const double,
const VectorType &)>> &J_inverse,
179 VectorType &y)
override;
194 const std::function<VectorType(
const double,
const VectorType &)> &f,
196 VectorType(
const double,
const double,
const VectorType &)>
197 & id_minus_tau_J_inverse,
211 std::vector<double>
b;
216 std::vector<double>
c;
221 std::vector<std::vector<double>>
a;
230 template <
typename VectorType>
267 const std::function<VectorType(
const double,
const VectorType &)> &f,
269 VectorType(
const double,
const double,
const VectorType &)>
270 & id_minus_tau_J_inverse,
273 VectorType &y)
override;
284 const std::function<VectorType(
const double,
const VectorType &)> &f,
313 const std::function<VectorType(
const double,
const VectorType &)> &f,
315 const double delta_t,
316 const VectorType & y,
317 std::vector<VectorType> &f_stages)
const;
331 template <
typename VectorType>
350 const unsigned int max_it = 100,
372 const std::function<VectorType(
const double,
const VectorType &)> &f,
374 VectorType(
const double,
const double,
const VectorType &)>
375 & id_minus_tau_J_inverse,
378 VectorType &y)
override;
397 , norm_residual(numbers::signaling_nan<double>())
401 unsigned int n_iterations;
402 double norm_residual;
417 const std::function<VectorType(
const double,
const VectorType &)> &f,
419 VectorType(
const double,
const double,
const VectorType &)>
420 & id_minus_tau_J_inverse,
424 std::vector<VectorType> &f_stages);
431 const std::function<
void(
const VectorType &, VectorType &)> &get_residual,
432 const std::function<VectorType(
const VectorType &)>
433 & id_minus_tau_J_inverse,
441 const std::function<VectorType(
const double,
const VectorType &)> &f,
444 const VectorType &new_y,
446 VectorType & tendency,
447 VectorType & residual)
const;
478 template <
typename VectorType>
498 const double min_delta = 1e-14,
499 const double max_delta = 1e100,
536 const std::function<VectorType(
const double,
const VectorType &)> &f,
538 VectorType(
const double,
const double,
const VectorType &)>
539 & id_minus_tau_J_inverse,
542 VectorType &y)
override;
553 const std::function<VectorType(
const double,
const VectorType &)> &f,
564 const double min_delta,
565 const double max_delta,
579 unsigned int n_iterations;
580 double delta_t_guess;
596 const std::function<VectorType(
const double,
const VectorType &)> &f,
598 const double delta_t,
599 const VectorType & y,
600 std::vector<VectorType> &f_stages);
645 std::vector<double>
b1;
650 std::vector<double>
b2;
665 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
void set_newton_solver_parameters(const unsigned int max_it, const double tolerance)
void compute_stages(const std::function< VectorType(const double, const VectorType &)> &f, const double t, const double delta_t, const VectorType &y, std::vector< VectorType > &f_stages) const
void compute_residual(const std::function< VectorType(const double, const VectorType &)> &f, double t, double delta_t, const VectorType &new_y, const VectorType &y, VectorType &tendency, VectorType &residual) const
double evolve_one_time_step(std::vector< std::function< VectorType(const double, const VectorType &)>> &F, std::vector< std::function< VectorType(const double, const double, const VectorType &)>> &J_inverse, double t, double delta_t, VectorType &y) override
void initialize(const runge_kutta_method method) override
ImplicitRungeKutta()=default
void set_time_adaptation_parameters(const double coarsen_param, const double refine_param, const double min_delta, const double max_delta, const double refine_tol, const double coarsen_tol)
virtual ~RungeKutta() override=default
const Status & get_status() const override
void newton_solve(const std::function< void(const VectorType &, VectorType &)> &get_residual, const std::function< VectorType(const VectorType &)> &id_minus_tau_J_inverse, VectorType &y)
EmbeddedExplicitRungeKutta()=default
void compute_stages(const std::function< VectorType(const double, const VectorType &)> &f, const double t, const double delta_t, const VectorType &y, std::vector< VectorType > &f_stages)
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, const std::function< VectorType(const double, const double, const VectorType &)> &id_minus_tau_J_inverse, double t, double delta_t, VectorType &y) override
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, const std::function< VectorType(const double, const double, const VectorType &)> &id_minus_tau_J_inverse, double t, double delta_t, VectorType &y) override
std::vector< std::vector< double > > a
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, const std::function< VectorType(const double, const double, const VectorType &)> &id_minus_tau_J_inverse, double t, double delta_t, VectorType &y) override
ExplicitRungeKutta()=default
const Status & get_status() const override
void compute_stages(const std::function< VectorType(const double, const VectorType &)> &f, const std::function< VectorType(const double, const double, const VectorType &)> &id_minus_tau_J_inverse, double t, double delta_t, VectorType &y, std::vector< VectorType > &f_stages)
~EmbeddedExplicitRungeKutta() override
virtual void initialize(const runge_kutta_method method)=0
embedded_runge_kutta_time_step
const Status & get_status() const override
void initialize(const runge_kutta_method method) override
void initialize(const runge_kutta_method method) override