13#ifndef dealii_time_stepping_h
14#define dealii_time_stepping_h
193 template <
typename VectorType>
214 std::vector<std::function<VectorType(
const double,
const VectorType &)>>
216 std::vector<std::function<
217 VectorType(
const double,
const double,
const VectorType &)>> &J_inverse,
240 template <
typename VectorType>
268 std::vector<std::function<VectorType(
const double,
const VectorType &)>>
270 std::vector<std::function<
271 VectorType(
const double,
const double,
const VectorType &)>> &J_inverse,
274 VectorType &y)
override;
289 const std::function<VectorType(
const double,
const VectorType &)> &f,
291 VectorType(
const double,
const double,
const VectorType &)>
292 &id_minus_tau_J_inverse,
306 std::vector<double>
b;
311 std::vector<double>
c;
316 std::vector<std::vector<double>>
a;
325 template <
typename VectorType>
364 const std::function<VectorType(
const double,
const VectorType &)> &f,
366 VectorType(
const double,
const double,
const VectorType &)>
367 &id_minus_tau_J_inverse,
370 VectorType &y)
override;
381 const std::function<VectorType(
const double,
const VectorType &)> &f,
410 const std::function<VectorType(
const double,
const VectorType &)> &f,
412 const double delta_t,
414 std::vector<VectorType> &f_stages)
const;
431 template <
typename VectorType>
468 const std::function<VectorType(
const double,
const VectorType &)> &f,
470 VectorType(
const double,
const double,
const VectorType &)>
471 &id_minus_tau_J_inverse,
474 VectorType &y)
override;
487 const std::function<VectorType(
const double,
const VectorType &)> &f,
490 VectorType &solution,
502 std::vector<double> &
b,
503 std::vector<double> &
c)
const;
529 const std::function<VectorType(
const double,
const VectorType &)> &f,
531 const double factor_solution,
532 const double factor_ai,
533 const VectorType ¤t_ri,
535 VectorType &solution,
536 VectorType &next_ri)
const;
550 template <
typename VectorType>
569 const unsigned int max_it = 100,
591 const std::function<VectorType(
const double,
const VectorType &)> &f,
593 VectorType(
const double,
const double,
const VectorType &)>
594 &id_minus_tau_J_inverse,
597 VectorType &y)
override;
636 const std::function<VectorType(
const double,
const VectorType &)> &f,
638 VectorType(
const double,
const double,
const VectorType &)>
639 &id_minus_tau_J_inverse,
643 std::vector<VectorType> &f_stages);
650 const std::function<
void(
const VectorType &, VectorType &)> &get_residual,
651 const std::function<VectorType(
const VectorType &)>
652 &id_minus_tau_J_inverse,
660 const std::function<VectorType(
const double,
const VectorType &)> &f,
663 const VectorType &new_y,
665 VectorType &tendency,
666 VectorType &residual)
const;
690 template <
typename VectorType>
710 const double min_delta = 1e-14,
711 const double max_delta = 1e100,
741 const std::function<VectorType(
const double,
const VectorType &)> &f,
743 VectorType(
const double,
const double,
const VectorType &)>
744 &id_minus_tau_J_inverse,
747 VectorType &y)
override;
758 const std::function<VectorType(
const double,
const VectorType &)> &f,
769 const double min_delta,
770 const double max_delta,
805 const std::function<VectorType(
const double,
const VectorType &)> &f,
807 const double delta_t,
809 std::vector<VectorType> &f_stages);
854 std::vector<double>
b1;
859 std::vector<double>
b2;
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, double t, double delta_t, VectorType &y)
std::unique_ptr< VectorType > last_stage
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)
EmbeddedExplicitRungeKutta()=default
const Status & get_status() const override
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)
void initialize(const runge_kutta_method method) 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
~EmbeddedExplicitRungeKutta() override=default
EmbeddedExplicitRungeKutta(const runge_kutta_method method, const double coarsen_param=1.2, const double refine_param=0.8, const double min_delta=1e-14, const double max_delta=1e100, const double refine_tol=1e-8, const double coarsen_tol=1e-12)
const Status & get_status() const override
void initialize(const runge_kutta_method method) override
ExplicitRungeKutta()=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) const
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, double t, double delta_t, VectorType &y)
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(const runge_kutta_method method)
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)
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)
const Status & get_status() const override
void initialize(const runge_kutta_method method) 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
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
void set_newton_solver_parameters(const unsigned int max_it, const double tolerance)
ImplicitRungeKutta()=default
ImplicitRungeKutta(const runge_kutta_method method, const unsigned int max_it=100, const double tolerance=1e-6)
void compute_one_stage(const std::function< VectorType(const double, const VectorType &)> &f, const double t, const double factor_solution, const double factor_ai, const VectorType ¤t_ri, VectorType &vec_ki, VectorType &solution, VectorType &next_ri) const
void initialize(const runge_kutta_method method) override
LowStorageRungeKutta(const runge_kutta_method method)
void get_coefficients(std::vector< double > &a, std::vector< double > &b, std::vector< double > &c) const
LowStorageRungeKutta()=default
double evolve_one_time_step(const std::function< VectorType(const double, const VectorType &)> &f, double t, double delta_t, VectorType &solution, VectorType &vec_ri, VectorType &vec_ki)
const Status & get_status() const 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
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
virtual ~RungeKutta() override=default
virtual void initialize(const runge_kutta_method method)=0
std::vector< std::vector< double > > a
virtual 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)=0
virtual 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)=0
virtual ~TimeStepping()=default
virtual const Status & get_status() const =0
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
embedded_runge_kutta_time_step
@ RK_CLASSIC_FOURTH_ORDER
@ LOW_STORAGE_RK_STAGE9_ORDER5
@ LOW_STORAGE_RK_STAGE3_ORDER3
@ LOW_STORAGE_RK_STAGE7_ORDER4
@ LOW_STORAGE_RK_STAGE5_ORDER4
embedded_runge_kutta_time_step exit_delta_t
unsigned int n_iterations
runge_kutta_method method
runge_kutta_method method
unsigned int n_iterations
runge_kutta_method method
runge_kutta_method method