SpECTRE Documentation Coverage Report
Current view: top level - ParallelAlgorithms/Amr/Policies - Policies.hpp Hit Total Coverage
Commit: 965048f86d23c819715b3af1ca3f880c8145d4bb Lines: 3 19 15.8 %
Date: 2024-05-16 17:00:40
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 "Options/String.hpp"
       7             : #include "ParallelAlgorithms/Amr/Policies/Isotropy.hpp"
       8             : #include "ParallelAlgorithms/Amr/Policies/Limits.hpp"
       9             : #include "Utilities/TMPL.hpp"
      10             : 
      11             : /// \cond
      12             : namespace PUP {
      13             : class er;
      14             : }  // namespace PUP
      15             : /// \endcond
      16             : 
      17             : namespace amr {
      18             : /// \brief A set of runtime policies controlling adaptive mesh refinement
      19           1 : class Policies {
      20             :  public:
      21             :   /// The isotropy of AMR
      22           1 :   struct Isotropy {
      23           0 :     using type = amr::Isotropy;
      24           0 :     static constexpr Options::String help = {
      25             :         "Isotropy of adaptive mesh refinement (whether or not each dimension "
      26             :         "can be refined independently)."};
      27             :   };
      28             : 
      29             :   /// The limits on refinement level and resolution for AMR
      30           1 :   struct Limits {
      31           0 :     using type = amr::Limits;
      32           0 :     static constexpr Options::String help = {
      33             :         "Limits on refinement level and resolution for adaptive mesh "
      34             :         "refinement."};
      35             :   };
      36             : 
      37           0 :   using options = tmpl::list<Isotropy, Limits>;
      38             : 
      39           0 :   static constexpr Options::String help = {
      40             :       "Policies controlling adaptive mesh refinement."};
      41             : 
      42           0 :   Policies() = default;
      43             : 
      44           0 :   Policies(amr::Isotropy isotropy, const amr::Limits& limits);
      45             : 
      46           0 :   amr::Isotropy isotropy() const { return isotropy_; }
      47             : 
      48           0 :   amr::Limits limits() const { return limits_; }
      49             : 
      50           0 :   void pup(PUP::er& p);
      51             : 
      52             :  private:
      53           0 :   amr::Isotropy isotropy_{amr::Isotropy::Anisotropic};
      54           0 :   amr::Limits limits_{};
      55             : };
      56             : 
      57           0 : bool operator==(const Policies& lhs, const Policies& rhs);
      58             : 
      59           0 : bool operator!=(const Policies& lhs, const Policies& rhs);
      60             : }  // namespace amr

Generated by: LCOV version 1.14