SpECTRE Documentation Coverage Report
Current view: top level - Time/StepChoosers - Maximum.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 3 13 23.1 %
Date: 2025-12-05 05:03:31
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/Options.hpp"
       9             : #include "Options/String.hpp"
      10             : #include "Time/StepChoosers/StepChooser.hpp"
      11             : #include "Time/TimeStepRequest.hpp"
      12             : #include "Utilities/Serialization/CharmPupable.hpp"
      13             : #include "Utilities/TMPL.hpp"
      14             : 
      15             : /// \cond
      16             : namespace PUP {
      17             : class er;
      18             : }  // namespace PUP
      19             : /// \endcond
      20             : 
      21             : namespace StepChoosers {
      22             : 
      23             : /// Limits the step size to a constant.
      24           1 : class Maximum : public StepChooser<StepChooserUse::Slab>,
      25             :                 public StepChooser<StepChooserUse::LtsStep> {
      26             :  public:
      27             :   /// \cond
      28             :   Maximum() = default;
      29             :   explicit Maximum(CkMigrateMessage* /*unused*/) {}
      30             :   using PUP::able::register_constructor;
      31             :   WRAPPED_PUPable_decl_template(Maximum);  // NOLINT
      32             :   /// \endcond
      33             : 
      34           0 :   static constexpr Options::String help{"Limits the step size to a constant."};
      35             : 
      36           0 :   explicit Maximum(double value);
      37             : 
      38           0 :   using argument_tags = tmpl::list<>;
      39             : 
      40           0 :   TimeStepRequest operator()(double last_step) const;
      41             : 
      42           1 :   bool uses_local_data() const override;
      43           1 :   bool can_be_delayed() const override;
      44             : 
      45             :   // NOLINTNEXTLINE(google-runtime-references)
      46           0 :   void pup(PUP::er& p) override;
      47             : 
      48             :  private:
      49           0 :   double value_ = std::numeric_limits<double>::signaling_NaN();
      50             : };
      51             : }  // namespace StepChoosers
      52             : 
      53             : template <>
      54           0 : struct Options::create_from_yaml<StepChoosers::Maximum> {
      55             :   template <typename Metavariables>
      56           0 :   static StepChoosers::Maximum create(const Options::Option& options) {
      57             :     return create<void>(options);
      58             :   }
      59             : };
      60             : 
      61             : template <>
      62           0 : StepChoosers::Maximum
      63             : Options::create_from_yaml<StepChoosers::Maximum>::create<void>(
      64             :     const Options::Option& options);

Generated by: LCOV version 1.14