16 #ifndef dealii__time_stepping_h 17 #define dealii__time_stepping_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/std_cxx11/function.h> 25 DEAL_II_NAMESPACE_OPEN
56 BACKWARD_EULER, IMPLICIT_MIDPOINT, CRANK_NICOLSON,
57 SDIRK_TWO_STAGES, HEUN_EULER, BOGACKI_SHAMPINE, DOPRI,
77 template <
typename VectorType>
96 virtual double evolve_one_time_step
97 (std::vector<std_cxx11::function<VectorType (
const double,
const VectorType &)> > &F,
98 std::vector<std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> > &J_inverse,
111 virtual const Status &get_status()
const = 0;
122 template <
typename VectorType>
146 double evolve_one_time_step
147 (std::vector<std_cxx11::function<VectorType (
const double,
const VectorType &)> > &F,
148 std::vector<std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> > &J_inverse,
164 virtual double evolve_one_time_step
165 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
166 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
180 std::vector<double>
b;
185 std::vector<double>
c;
190 std::vector<std::vector<double> >
a;
199 template <
typename VectorType>
232 double evolve_one_time_step
233 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
234 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
246 double evolve_one_time_step
247 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
263 const Status &get_status()
const;
270 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
272 const double delta_t,
274 std::vector<VectorType> &f_stages)
const;
288 template <
typename VectorType>
324 double evolve_one_time_step
325 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
326 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
335 void set_newton_solver_parameters(
unsigned int max_it,
double tolerance);
344 unsigned int n_iterations;
345 double norm_residual;
351 const Status &get_status()
const;
358 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
359 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
363 std::vector<VectorType> &f_stages);
368 void newton_solve(std_cxx11::function<
void (
const VectorType &,VectorType &)> get_residual,
369 std_cxx11::function<VectorType (
const VectorType &)> id_minus_tau_J_inverse,
375 void compute_residual(std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
378 const VectorType &old_y,
380 VectorType &tendency,
381 VectorType &residual)
const;
412 template <
typename VectorType>
430 double coarsen_param = 1.2,
431 double refine_param = 0.8,
432 double min_delta = 1e-14,
433 double max_delta = 1e100,
434 double refine_tol = 1e-8,
435 double coarsen_tol = 1e-12);
466 double evolve_one_time_step
467 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
468 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
480 double evolve_one_time_step
481 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
489 void set_time_adaptation_parameters(
double coarsen_param,
506 unsigned int n_iterations;
507 double delta_t_guess;
514 const Status &get_status()
const;
520 void compute_stages(std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
522 const double delta_t,
524 std::vector<VectorType> &f_stages);
569 std::vector<double>
b1;
574 std::vector<double>
b2;
589 DEAL_II_NAMESPACE_CLOSE
std::vector< std::vector< double > > a
embedded_runge_kutta_time_step
~EmbeddedExplicitRungeKutta()
EmbeddedExplicitRungeKutta()