SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ForceFree/Subcell - TciOptions.hpp Hit Total Coverage
Commit: 8f6d7ed2ad592dd78354983fd8e5ec2be7abb468 Lines: 1 21 4.8 %
Date: 2024-05-02 15:57:06
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             : #include <limits>
       8             : #include <optional>
       9             : 
      10             : #include "DataStructures/DataBox/Tag.hpp"
      11             : #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags/OptionsGroup.hpp"
      12             : #include "Options/Auto.hpp"
      13             : #include "Options/String.hpp"
      14             : #include "Utilities/TMPL.hpp"
      15             : 
      16             : /// \cond
      17             : namespace PUP {
      18             : class er;
      19             : }  // namespace PUP
      20             : /// \endcond
      21             : 
      22             : namespace ForceFree::subcell {
      23             : 
      24           0 : struct TciOptions {
      25             :  private:
      26           0 :   struct DoNotCheckTildeQ {};
      27             : 
      28             :  public:
      29             :   /*!
      30             :    * \brief The cutoff of the absolute value of the generalized charge density
      31             :    * \f$\tilde{Q}\f$ in an element to apply the Persson TCI.
      32             :    *
      33             :    * If maximum absolute value of \f$\tilde{Q}\f$ is below this option value,
      34             :    * the Persson TCI is not triggered for it.
      35             :    */
      36           1 :   struct TildeQCutoff {
      37           0 :     using type = Options::Auto<double, DoNotCheckTildeQ>;
      38           0 :     static constexpr Options::String help = {
      39             :         "If maximum absolute value of TildeQ in an element is below this value "
      40             :         "we do not apply the Persson TCI to TildeQ. To disable the check, set "
      41             :         "this option to 'DoNotCheckTildeQ'."};
      42             :   };
      43             : 
      44           0 :   using options = tmpl::list<TildeQCutoff>;
      45             : 
      46           0 :   static constexpr Options::String help = {
      47             :       "Options for the troubled-cell indicator"};
      48             : 
      49             :   // NOLINTNEXTLINE(google-runtime-references)
      50           0 :   void pup(PUP::er& /*p*/);
      51             : 
      52           0 :   std::optional<double> tilde_q_cutoff{
      53             :       std::numeric_limits<double>::signaling_NaN()};
      54             : };
      55             : 
      56           0 : namespace OptionTags {
      57           0 : struct TciOptions {
      58           0 :   using type = subcell::TciOptions;
      59           0 :   static constexpr Options::String help = "TCI options for ForceFree system";
      60           0 :   using group = ::dg::OptionTags::DiscontinuousGalerkinGroup;
      61             : };
      62             : }  // namespace OptionTags
      63             : 
      64           0 : namespace Tags {
      65           0 : struct TciOptions : db::SimpleTag {
      66           0 :   using type = subcell::TciOptions;
      67           0 :   using option_tags = tmpl::list<typename OptionTags::TciOptions>;
      68             : 
      69           0 :   static constexpr bool pass_metavariables = false;
      70           0 :   static type create_from_options(const type& tci_options) {
      71             :     return tci_options;
      72             :   }
      73             : };
      74             : }  // namespace Tags
      75             : }  // namespace ForceFree::subcell

Generated by: LCOV version 1.14