.. _program_listing_file_src_pcms_transient_timestepper.hpp: Program Listing for File timestepper.hpp ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/pcms/transient/timestepper.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef PCMS_TRANSIENT_TIMESTEPPER_HPP #define PCMS_TRANSIENT_TIMESTEPPER_HPP #include "pcms/utility/types.h" namespace pcms { struct Step { bool accepted; Real next_step; }; class Timestepper { public: [[nodiscard]] virtual Real InitialStep() const = 0; [[nodiscard]] virtual Step UpdateStep(Real dt, Real err) = 0; virtual ~Timestepper() = default; }; class FixedTimestepper : public Timestepper { public: explicit FixedTimestepper(Real dt); Real InitialStep() const override; Step UpdateStep(Real dt, Real err) override; private: Real dt_; }; } // namespace pcms #endif // PCMS_TRANSIENT_TIMESTEPPER_HPP