OGS
FixedTimeStepping.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <memory>
16#include <vector>
17
18#include "TimeStepAlgorithm.h"
19
20namespace NumLib
21{
28{
29public:
43 FixedTimeStepping(double t0, double t_end, double dt);
44
50 double t0, double tn,
51 std::vector<std::pair<std::size_t, double>> const& repeat_dt_pairs,
52 std::vector<double> const& fixed_times_for_output);
53
54 std::tuple<bool, double> next(double solution_error, int number_iterations,
55 NumLib::TimeStep& ts_previous,
56 NumLib::TimeStep& ts_current) override;
57
58private:
60 std::vector<double> _dt_vector;
61};
62
63std::size_t findDeltatInterval(double const t_initial,
64 std::vector<double> const& delta_ts,
65 double const fixed_output_time);
66} // namespace NumLib
Fixed time stepping algorithm.
std::tuple< bool, double > next(double solution_error, int number_iterations, NumLib::TimeStep &ts_previous, NumLib::TimeStep &ts_current) override
std::vector< double > _dt_vector
a vector of time step sizes
FixedTimeStepping(double t0, double t_end, double dt)
Interface of time stepping algorithms.
Time step object.
Definition TimeStep.h:29
std::size_t findDeltatInterval(double const t_initial, std::vector< double > const &delta_ts, double const fixed_output_time)