16 #ifndef dealii__time_stepping_h 17 #define dealii__time_stepping_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/signaling_nan.h> 22 #include <deal.II/base/std_cxx11/function.h> 26 DEAL_II_NAMESPACE_OPEN
57 BACKWARD_EULER, IMPLICIT_MIDPOINT, CRANK_NICOLSON,
58 SDIRK_TWO_STAGES, HEUN_EULER, BOGACKI_SHAMPINE, DOPRI,
79 template <
typename VectorType>
98 virtual double evolve_one_time_step
99 (std::vector<std_cxx11::function<VectorType (
const double,
const VectorType &)> > &F,
100 std::vector<std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> > &J_inverse,
113 virtual const Status &get_status()
const = 0;
124 template <
typename VectorType>
149 double evolve_one_time_step
150 (std::vector<std_cxx11::function<VectorType (
const double,
const VectorType &)> > &F,
151 std::vector<std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> > &J_inverse,
167 virtual double evolve_one_time_step
168 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
169 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
183 std::vector<double>
b;
188 std::vector<double>
c;
193 std::vector<std::vector<double> >
a;
202 template <
typename VectorType>
236 double evolve_one_time_step
237 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
238 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
250 double evolve_one_time_step
251 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
272 const Status &get_status()
const;
279 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
281 const double delta_t,
283 std::vector<VectorType> &f_stages)
const;
297 template <
typename VectorType>
316 const unsigned int max_it = 100,
317 const double tolerance = 1e-6);
335 double evolve_one_time_step
336 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
337 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
346 void set_newton_solver_parameters(
const unsigned int max_it,
347 const double tolerance);
359 norm_residual (numbers::signaling_nan<double>())
363 unsigned int n_iterations;
364 double norm_residual;
370 const Status &get_status()
const;
377 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
378 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
382 std::vector<VectorType> &f_stages);
387 void newton_solve(std_cxx11::function<
void (
const VectorType &,VectorType &)> get_residual,
388 std_cxx11::function<VectorType (
const VectorType &)> id_minus_tau_J_inverse,
394 void compute_residual(std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
397 const VectorType &old_y,
399 VectorType &tendency,
400 VectorType &residual)
const;
431 template <
typename VectorType>
449 const double coarsen_param = 1.2,
450 const double refine_param = 0.8,
451 const double min_delta = 1e-14,
452 const double max_delta = 1e100,
453 const double refine_tol = 1e-8,
454 const double coarsen_tol = 1e-12);
485 double evolve_one_time_step
486 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
487 std_cxx11::function<VectorType (
const double,
const double,
const VectorType &)> id_minus_tau_J_inverse,
499 double evolve_one_time_step
500 (std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
508 void set_time_adaptation_parameters(
const double coarsen_param,
509 const double refine_param,
510 const double min_delta,
511 const double max_delta,
512 const double refine_tol,
513 const double coarsen_tol);
525 unsigned int n_iterations;
526 double delta_t_guess;
533 const Status &get_status()
const;
539 void compute_stages(std_cxx11::function<VectorType (
const double,
const VectorType &)> f,
541 const double delta_t,
543 std::vector<VectorType> &f_stages);
588 std::vector<double>
b1;
593 std::vector<double>
b2;
608 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
std::vector< std::vector< double > > a
embedded_runge_kutta_time_step
~EmbeddedExplicitRungeKutta()
EmbeddedExplicitRungeKutta()