SpECTRE Documentation Coverage Report
Current view: top level - Time/TimeSteppers - Rk4Kennedy.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 25.0 % 20 5
Test Date: 2026-10-22 17:29:42
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 "DataStructures/TaggedVariant.hpp"
       9              : #include "Options/String.hpp"
      10              : #include "Time/TimeSteppers/ImexRungeKutta.hpp"
      11              : #include "Utilities/Serialization/CharmPupable.hpp"
      12              : #include "Utilities/TMPL.hpp"
      13              : 
      14              : namespace TimeSteppers {
      15              : /*!
      16              :  * \ingroup TimeSteppersGroup
      17              :  * \brief A fourth-order Runge-Kutta method with IMEX support.
      18              :  *
      19              :  * The coefficients are given as ARK4(3)6L[2]SA in \cite Kennedy2003.
      20              :  *
      21              :  * The implicit part is stiffly accurate and L-stable.
      22              :  *
      23              :  * The CFL factor/stable step size is 2.1172491998184686.
      24              :  */
      25            1 : class Rk4Kennedy : public ImexRungeKutta {
      26              :  public:
      27            0 :   using options = tmpl::list<>;
      28            0 :   static constexpr Options::String help = {
      29              :       "A 4th-order Runge-Kutta scheme devised by Kennedy and Carpenter."};
      30              : 
      31            0 :   Rk4Kennedy() = default;
      32            0 :   Rk4Kennedy(const Rk4Kennedy&) = default;
      33            0 :   Rk4Kennedy& operator=(const Rk4Kennedy&) = default;
      34            0 :   Rk4Kennedy(Rk4Kennedy&&) = default;
      35            0 :   Rk4Kennedy& operator=(Rk4Kennedy&&) = default;
      36            0 :   ~Rk4Kennedy() override = default;
      37              : 
      38            1 :   variants::TaggedVariant<Tags::FixedOrder, Tags::VariableOrder> order()
      39              :       const override;
      40              : 
      41            1 :   double stable_step() const override;
      42              : 
      43            1 :   size_t imex_order() const override;
      44              : 
      45            1 :   size_t implicit_stage_order() const override;
      46              : 
      47            0 :   WRAPPED_PUPable_decl_template(Rk4Kennedy);  // NOLINT
      48              : 
      49            0 :   explicit Rk4Kennedy(CkMigrateMessage* /*unused*/) {}
      50              : 
      51            0 :   const ButcherTableau& butcher_tableau() const override;
      52              : 
      53            0 :   const ImplicitButcherTableau& implicit_butcher_tableau() const override;
      54              : };
      55              : 
      56            0 : inline bool constexpr operator==(const Rk4Kennedy& /*lhs*/,
      57              :                                  const Rk4Kennedy& /*rhs*/) {
      58              :   return true;
      59              : }
      60              : 
      61            0 : inline bool constexpr operator!=(const Rk4Kennedy& lhs, const Rk4Kennedy& rhs) {
      62              :   return not(lhs == rhs);
      63              : }
      64              : }  // namespace TimeSteppers
        

Generated by: LCOV version 2.0-1