Class template Dune::GDT::TimeStepperInterface

Inherits from Dune::XT::Common::StorageProvider.

template<class DiscreteFunctionImp>
class Dune::GDT::TimeStepperInterface<DiscreteFunctionImp> : 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.

Method Dune::GDT::TimeStepperInterface::operator=

template<class DiscreteFunctionImp>
ThisType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::operator=(const ThisType &other) = delete

No documentation provided.

Method Dune::GDT::TimeStepperInterface::operator=

template<class DiscreteFunctionImp>
ThisType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::operator=(ThisType &&source) = delete

No documentation provided.

Method Dune::GDT::TimeStepperInterface::step

template<class DiscreteFunctionImp>
virtual RangeFieldType Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::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.

Method Dune::GDT::TimeStepperInterface::current_time

template<class DiscreteFunctionImp>
const RangeFieldType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::current_time() const

No documentation provided.

Method Dune::GDT::TimeStepperInterface::current_time

template<class DiscreteFunctionImp>
RangeFieldType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::current_time()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::current_solution

template<class DiscreteFunctionImp>
const DiscreteFunctionType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::current_solution() const

No documentation provided.

Method Dune::GDT::TimeStepperInterface::current_solution

template<class DiscreteFunctionImp>
DiscreteFunctionType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::current_solution()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::set_current_solution_pointer

template<class DiscreteFunctionImp>
void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::set_current_solution_pointer(DiscreteFunctionType &discrete_function)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::solution

template<class DiscreteFunctionImp>
const int &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solution() const

No documentation provided.

Method Dune::GDT::TimeStepperInterface::solution

template<class DiscreteFunctionImp>
int &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solution()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::set_solution_pointer

template<class DiscreteFunctionImp>
void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::set_solution_pointer(int &solution_ref)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::dummy_solution

template<class DiscreteFunctionImp>
static const int &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::dummy_solution()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::solve

template<class DiscreteFunctionImp>
virtual RangeFieldType Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const int num_save_steps, const int 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 int &visualizer, const StringifierType &stringifier, const int &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

Method Dune::GDT::TimeStepperInterface::solve

template<class DiscreteFunctionImp>
virtual RangeFieldType Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const int num_save_steps, const int num_output_steps, 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, const int &visualizer(), const StringifierType &stringifier = vector_stringifier(), const int &exact_solution())

No documentation provided.

Method Dune::GDT::TimeStepperInterface::solve

template<class DiscreteFunctionImp>
virtual RangeFieldType Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solve(const RangeFieldType t_end, const RangeFieldType initial_dt, const int num_save_steps, int &sol, const bool reset_begin_time = false)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::solution_closest_to_time

template<class DiscreteFunctionImp>
const int &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::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

Method Dune::GDT::TimeStepperInterface::solution_at_time

template<class DiscreteFunctionImp>
virtual const DiscreteFunctionType &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::solution_at_time(const RangeFieldType t) const

No documentation provided.

Method Dune::GDT::TimeStepperInterface::visualize_solution

template<class DiscreteFunctionImp>
virtual void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::visualize_solution(const std::string prefix, const int &visualizer()) const

No documentation provided.

Method Dune::GDT::TimeStepperInterface::default_visualizer

template<class DiscreteFunctionImp>
static const int &Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::default_visualizer()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::vector_stringifier

template<class DiscreteFunctionImp>
static StringifierType Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::vector_stringifier()

No documentation provided.

Method Dune::GDT::TimeStepperInterface::rankfile_name

template<class DiscreteFunctionImp>
static std::string Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::rankfile_name(const std::string &prefix, const int rank, const int step)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::write_to_textfile

template<class DiscreteFunctionImp>
static void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::write_to_textfile(const int &u_n, const GridViewType &grid_view, const std::string &prefix, const int step, const RangeFieldType t, const StringifierType &stringifier, const bool intersection_wise = false)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::write_files

template<class DiscreteFunctionImp>
static void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::write_files(const bool visualize, const bool write_discrete, const bool write_exact, const DiscreteFunctionType &discrete_sol, const int &exact_sol, const std::string &prefix, const int step, const RangeFieldType t, const StringifierType &stringifier, const int &visualizer)

No documentation provided.

Method Dune::GDT::TimeStepperInterface::write_timings

template<class DiscreteFunctionImp>
void Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::write_timings(const std::string &prefix)

No documentation provided.

Constructor Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>

template<>
template<class DiscreteFunctionImp>
Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::TimeStepperInterface<DiscreteFunctionImp>(const RangeFieldType t_0, DiscreteFunctionType &initial_values)

No documentation provided.

Constructor Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>

template<>
template<class DiscreteFunctionImp>
Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::TimeStepperInterface<DiscreteFunctionImp>(const ThisType &other) = delete

No documentation provided.

Constructor Dune::GDT::TimeStepperInterface::TimeStepperInterface<DiscreteFunctionImp>

template<>
template<class DiscreteFunctionImp>
Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::TimeStepperInterface<DiscreteFunctionImp>(ThisType &&source) = delete

No documentation provided.

Destructor Dune::GDT::TimeStepperInterface::~TimeStepperInterface<DiscreteFunctionImp>

template<>
template<class DiscreteFunctionImp>
virtual Dune::GDT::TimeStepperInterface<DiscreteFunctionImp>::~TimeStepperInterface<DiscreteFunctionImp>() = default

No documentation provided.

Field Dune::GDT::TimeStepperInterface::t_

RangeFieldType Dune::GDT::TimeStepperInterface::t_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::u_n_

DiscreteFunctionType *Dune::GDT::TimeStepperInterface::u_n_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::solution_

int *Dune::GDT::TimeStepperInterface::solution_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::begin_time_

int Dune::GDT::TimeStepperInterface::begin_time_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::dts_

int Dune::GDT::TimeStepperInterface::dts_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::timepoints_

int Dune::GDT::TimeStepperInterface::timepoints_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::step_walltimes_

int Dune::GDT::TimeStepperInterface::step_walltimes_

No documentation provided.

Field Dune::GDT::TimeStepperInterface::solve_walltime_

int Dune::GDT::TimeStepperInterface::solve_walltime_

No documentation provided.

Variable Dune::GDT::TimeStepperInterface::dimDomain

const int Dune::GDT::TimeStepperInterface::dimDomain

No documentation provided.

Variable Dune::GDT::TimeStepperInterface::dimRange

const int Dune::GDT::TimeStepperInterface::dimRange

No documentation provided.

Variable Dune::GDT::TimeStepperInterface::dimRangeCols

const int Dune::GDT::TimeStepperInterface::dimRangeCols

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::DiscreteFunctionType

type Dune::GDT::TimeStepperInterface::DiscreteFunctionType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::GridViewType

type Dune::GDT::TimeStepperInterface::GridViewType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::EntityType

type Dune::GDT::TimeStepperInterface::EntityType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::DomainFieldType

type Dune::GDT::TimeStepperInterface::DomainFieldType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::RangeFieldType

type Dune::GDT::TimeStepperInterface::RangeFieldType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::DomainType

type Dune::GDT::TimeStepperInterface::DomainType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::RangeType

type Dune::GDT::TimeStepperInterface::RangeType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::DataHandleType

type Dune::GDT::TimeStepperInterface::DataHandleType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::StringifierType

type Dune::GDT::TimeStepperInterface::StringifierType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::ThisType

type Dune::GDT::TimeStepperInterface::ThisType

No documentation provided.

Type alias Dune::GDT::TimeStepperInterface::CurrentSolutionStorageProviderType

type Dune::GDT::TimeStepperInterface::CurrentSolutionStorageProviderType

No documentation provided.