SpECTRE Documentation Coverage Report
Current view: top level - Time/StepChoosers - LimitIncrease.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 25.0 % 16 4
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 <limits>
       7              : 
       8              : #include "Options/String.hpp"
       9              : #include "Time/StepChoosers/StepChooser.hpp"
      10              : #include "Time/TimeStepRequest.hpp"
      11              : #include "Utilities/Serialization/CharmPupable.hpp"
      12              : #include "Utilities/TMPL.hpp"
      13              : 
      14              : /// \cond
      15              : namespace PUP {
      16              : class er;
      17              : }  // namespace PUP
      18              : /// \endcond
      19              : 
      20              : namespace StepChoosers {
      21              : /// Limits step increase to a constant ratio.
      22            1 : class LimitIncrease : public StepChooser<StepChooserUse::Slab>,
      23              :                       public StepChooser<StepChooserUse::LtsStep> {
      24              :  public:
      25              :   /// \cond
      26              :   LimitIncrease() = default;
      27              :   explicit LimitIncrease(CkMigrateMessage* /*unused*/) {}
      28              :   using PUP::able::register_constructor;
      29              :   WRAPPED_PUPable_decl_template(LimitIncrease);  // NOLINT
      30              :   /// \endcond
      31              : 
      32            0 :   struct Factor {
      33            0 :     using type = double;
      34            0 :     static constexpr Options::String help{"Factor to allow increase by"};
      35            0 :     static type lower_bound() { return 1.0; }
      36              :   };
      37              : 
      38            0 :   static constexpr Options::String help{
      39              :       "Limits step increase to a constant ratio."};
      40            0 :   using options = tmpl::list<Factor>;
      41              : 
      42            0 :   explicit LimitIncrease(double factor);
      43              : 
      44            0 :   using argument_tags = tmpl::list<>;
      45              : 
      46            0 :   TimeStepRequest operator()(double last_step) const;
      47              : 
      48            1 :   bool uses_local_data() const override;
      49            1 :   bool can_be_delayed() const override;
      50            1 :   bool must_set_step_size() const override;
      51              : 
      52              :   // NOLINTNEXTLINE(google-runtime-references)
      53            0 :   void pup(PUP::er& p) override;
      54              : 
      55              :  private:
      56            0 :   double factor_ = std::numeric_limits<double>::signaling_NaN();
      57              : };
      58              : }  // namespace StepChoosers
        

Generated by: LCOV version 2.0-1