SpECTRE Documentation Coverage Report
Current view: top level - Time/TimeSteppers - Rk5Owren.hpp Hit Total Coverage
Commit: 524991323bb2b11bbb29bf2db759f03f14f0e6f0 Lines: 4 18 22.2 %
Date: 2024-05-25 20:39:28
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : 
       8             : #include "Options/String.hpp"
       9             : #include "Time/TimeSteppers/RungeKutta.hpp"
      10             : #include "Utilities/Serialization/CharmPupable.hpp"
      11             : #include "Utilities/TMPL.hpp"
      12             : 
      13             : namespace TimeSteppers {
      14             : /*!
      15             :  * \ingroup TimeSteppersGroup
      16             :  * \brief A fifth order continuous-extension RK method that provides 5th-order
      17             :  * dense output.
      18             :  *
      19             :  * \f{eqnarray}{
      20             :  * \frac{du}{dt} & = & \mathcal{L}(t,u).
      21             :  * \f}
      22             :  * Given a solution \f$u(t^n)=u^n\f$, this stepper computes
      23             :  * \f$u(t^{n+1})=u^{n+1}\f$ using the following equations:
      24             :  *
      25             :  * \f{align}{
      26             :  * k^{(i)} & = \mathcal{L}(t^n + c_i \Delta t,
      27             :  *                         u^n + \Delta t \sum_{j=1}^{i-1} a_{ij} k^{(j)}),
      28             :  *                              \mbox{ } 1 \leq i \leq s,\\
      29             :  * u^{n+1}(t^n + \theta \Delta t) & = u^n + \Delta t \sum_{i=1}^{s} b_i(\theta)
      30             :  * k^{(i)}. \f}
      31             :  *
      32             :  * Here the coefficients \f$a_{ij}\f$, \f$b_i\f$, and \f$c_i\f$ are given
      33             :  * in \cite Owren1992 and \cite Gassner20114232. Note that \f$c_1 = 0\f$,
      34             :  * \f$s\f$ is the number of stages, and \f$\theta\f$ is the fraction of the
      35             :  * step. This is an FSAL stepper.
      36             :  *
      37             :  * The CFL factor/stable step size is 1.5961737362090775.
      38             :  */
      39           1 : class Rk5Owren : public RungeKutta {
      40             :  public:
      41           0 :   using options = tmpl::list<>;
      42           0 :   static constexpr Options::String help = {
      43             :       "A 5th-order continuous extension Runge-Kutta time stepper."};
      44             : 
      45           0 :   Rk5Owren() = default;
      46           0 :   Rk5Owren(const Rk5Owren&) = default;
      47           0 :   Rk5Owren& operator=(const Rk5Owren&) = default;
      48           0 :   Rk5Owren(Rk5Owren&&) = default;
      49           0 :   Rk5Owren& operator=(Rk5Owren&&) = default;
      50           0 :   ~Rk5Owren() override = default;
      51             : 
      52           1 :   size_t order() const override;
      53             : 
      54           1 :   size_t error_estimate_order() const override;
      55             : 
      56           1 :   double stable_step() const override;
      57             : 
      58           0 :   WRAPPED_PUPable_decl_template(Rk5Owren);  // NOLINT
      59             : 
      60           0 :   explicit Rk5Owren(CkMigrateMessage* /*msg*/);
      61             : 
      62           0 :   const ButcherTableau& butcher_tableau() const override;
      63             : };
      64             : 
      65           0 : inline bool constexpr operator==(const Rk5Owren& /*lhs*/,
      66             :                                  const Rk5Owren& /*rhs*/) {
      67             :   return true;
      68             : }
      69             : 
      70           0 : inline bool constexpr operator!=(const Rk5Owren& /*lhs*/,
      71             :                                  const Rk5Owren& /*rhs*/) {
      72             :   return false;
      73             : }
      74             : }  // namespace TimeSteppers

Generated by: LCOV version 1.14