Class template Dune::GDT::TimeStepperInterface¶
Inherits from Dune::XT::Common::StorageProvider.
-
template<class DiscreteFunctionImp>
class Dune::GDT::TimeStepperInterface : private Dune::XT::Common::StorageProvider<DiscreteFunctionImp>¶ Interface for time stepping schemes that evolve a discrete function from an initial time to a final time, storing, visualizing and writing the solution at requested time points.
-
ThisType &Dune::GDT::TimeStepperInterface::operator=(const ThisType &other) = delete¶
No documentation provided.
-
ThisType &Dune::GDT::TimeStepperInterface::operator=(ThisType &&source) = delete¶
No documentation provided.
-
virtual RangeFieldType Dune::GDT::TimeStepperInterface::step(const RangeFieldType dt, const RangeFieldType max_dt) = 0¶
Perform one time step and return the estimated optimal time step length for the next time step.
Note
For adaptive methods or if max_dt < dt, dt is just the initial time step length, the actual time step taken may be shorter. To get the actual time step length you need to compare current_time() before and after calling step().
Note
This method has to increase the current time by the actual time step length taken, otherwise solve will never finish execution (if current_time is not increased) or give wrong results (if current time is increased by a wrong dt).
:param dt: Time step length. :param max_dt: Maximal allowed time step length in this time step. :returns: Estimated optimal time step length for the next time step.
-
const RangeFieldType &Dune::GDT::TimeStepperInterface::current_time() const¶
No documentation provided.
-
RangeFieldType &Dune::GDT::TimeStepperInterface::current_time()¶
No documentation provided.
-
const DiscreteFunctionType &Dune::GDT::TimeStepperInterface::current_solution() const¶
No documentation provided.
-
DiscreteFunctionType &Dune::GDT::TimeStepperInterface::current_solution()¶
No documentation provided.
-
void Dune::GDT::TimeStepperInterface::set_current_solution_pointer(DiscreteFunctionType &discrete_function)¶
No documentation provided.
-
const int &Dune::GDT::TimeStepperInterface::solution() const¶
No documentation provided.
-
int &Dune::GDT::TimeStepperInterface::solution()¶
No documentation provided.
-
void Dune::GDT::TimeStepperInterface::set_solution_pointer(int &solution_ref)¶
No documentation provided.
-
static const GridFunctionType &Dune::GDT::TimeStepperInterface::dummy_solution()¶
No documentation provided.
-
virtual RangeFieldType Dune::GDT::TimeStepperInterface::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const size_t num_save_steps, const size_t num_output_steps, const bool save_solution, const bool visualize, const bool write_discrete, const bool write_exact, const bool reset_begin_time, const std::string prefix, int &sol, const VisualizerType &visualizer, const StringifierType &stringifier, const GridFunctionType &exact_solution)¶
solve Applies time stepping scheme up to time t_end
Note
If num_save_steps is specified (i.e. if it is not size_t(-1), the solution will be stored/visualized at exactly num_save_steps + 1 equidistant time points (including the initial time and t_end), even if the time step length has to be reduced to hit these time points.
:param t_end: Final time. :param initial_dt: Initial time step length. Non-adaptive schemes will use this dt for all time steps. Adaptive schemes will use initial_dt as a first guess for the time step length. :param num_save_steps: Number of time points that will be stored/visualized/written Default is size_t(-1), which will store all time steps. :param num_output_steps: Number of time points where current time and current time step length will be written to std::cout. Default is size_t(-1), which will output all time steps. Set to 0 to suppress output. :param save_solution: If true, the discrete solution at num_save_steps equidistant time points will be stored in solution. :param visualize: If true, solution will be written to .vtp/.vtu files at num_save_steps equidistant time points :param write_discrete: If true, discrete solution will be written to .txt files at num_save_steps equidistant time points :param write_exact: If true, exact solution will be written to .txt files at num_save_steps equidistant time points :param prefix: Filename prefix of .vtp/.vtu/.txt files that are written :param sol: The discrete solution :param visualizer: Function object that determines how the discrete solution is visualized. :param stringifier: Function object that determines how RangeType is converted to string before writing to .txt files. :param exact_solution: Exact solution function. :returns: estimated optimal time step length for next step
-
virtual RangeFieldType Dune::GDT::TimeStepperInterface::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const size_t num_save_steps = size_t(-1), const size_t num_output_steps = size_t(-1), const bool save_solution = false, const bool visualize = false, const bool write_discrete = false, const bool write_exact = false, const bool reset_begin_time = true, const std::string prefix =
<recovery-expr>("solution"), const VisualizerType &visualizer = default_visualizer(), const StringifierType &stringifier = vector_stringifier(), const GridFunctionType &exact_solution = dummy_solution())¶ No documentation provided.
-
virtual RangeFieldType Dune::GDT::TimeStepperInterface::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const size_t num_save_steps, int &sol, const bool reset_begin_time = false)¶
No documentation provided.
-
const int &Dune::GDT::TimeStepperInterface::solution_closest_to_time(const RangeFieldType t) const¶
Find discrete solution for time point that is closest to t. The timestepper only stores the solution at discrete time points. This function returns the discrete solution for the stored time point that is closest to the query time t.
:param t: Time :returns: std::pair with pair.second the discrete solution at time pair.first
-
virtual const DiscreteFunctionType &Dune::GDT::TimeStepperInterface::solution_at_time(const RangeFieldType t) const¶
No documentation provided.
-
virtual void Dune::GDT::TimeStepperInterface::visualize_solution(const std::string prefix =
<recovery-expr>(""), const VisualizerType &visualizer = default_visualizer()) const¶ No documentation provided.
-
static const VisualizerType &Dune::GDT::TimeStepperInterface::default_visualizer()¶
No documentation provided.
-
static StringifierType Dune::GDT::TimeStepperInterface::vector_stringifier()¶
No documentation provided.
-
static std::string Dune::GDT::TimeStepperInterface::rankfile_name(const std::string &prefix, const int rank, const size_t step)¶
No documentation provided.
-
static void Dune::GDT::TimeStepperInterface::write_to_textfile(const GridFunctionType &u_n, const GridViewType &grid_view, const std::string &prefix, const size_t step, const RangeFieldType t, const StringifierType &stringifier, const bool intersection_wise = false)¶
No documentation provided.
-
static void Dune::GDT::TimeStepperInterface::write_files(const bool visualize, const bool write_discrete, const bool write_exact, const DiscreteFunctionType &discrete_sol, const GridFunctionType &exact_sol, const std::string &prefix, const size_t step, const RangeFieldType t, const StringifierType &stringifier, const VisualizerType &visualizer)¶
No documentation provided.
-
void Dune::GDT::TimeStepperInterface::write_timings(const std::string &prefix)¶
No documentation provided.
-
template<>
Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>(const RangeFieldType t_0, DiscreteFunctionType &initial_values)¶ No documentation provided.
-
template<>
Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>(const ThisType &other) = delete¶ No documentation provided.
-
template<>
Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>(ThisType &&source) = delete¶ No documentation provided.
-
template<>
virtual Dune::GDT::TimeStepperInterface::~TimeStepperInterface<DiscreteFunctionImp>() = default¶ No documentation provided.
-
RangeFieldType Dune::GDT::TimeStepperInterface::t_¶
No documentation provided.
-
DiscreteFunctionType *Dune::GDT::TimeStepperInterface::u_n_¶
No documentation provided.
-
int *Dune::GDT::TimeStepperInterface::solution_¶
No documentation provided.
-
int Dune::GDT::TimeStepperInterface::begin_time_¶
No documentation provided.
-
int Dune::GDT::TimeStepperInterface::dts_¶
No documentation provided.
-
int Dune::GDT::TimeStepperInterface::timepoints_¶
No documentation provided.
-
int Dune::GDT::TimeStepperInterface::step_walltimes_¶
No documentation provided.
-
int Dune::GDT::TimeStepperInterface::solve_walltime_¶
No documentation provided.
-
const size_t Dune::GDT::TimeStepperInterface::dimDomain¶
No documentation provided.
-
const size_t Dune::GDT::TimeStepperInterface::dimRange¶
No documentation provided.
-
const size_t Dune::GDT::TimeStepperInterface::dimRangeCols¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::DiscreteFunctionType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::GridViewType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::EntityType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::DomainFieldType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::RangeFieldType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::DomainType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::RangeType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::GridFunctionType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::DataHandleType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::VisualizerType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::StringifierType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::ThisType¶
No documentation provided.
-
type Dune::GDT::TimeStepperInterface::CurrentSolutionStorageProviderType¶
No documentation provided.