SpECTRE Documentation Coverage Report
Current view: top level - ParallelAlgorithms/Amr/Criteria - IncreaseResolution.hpp Hit Total Coverage
Commit: a9ee6aa7c65ba703dbdc6dfb79436bb5378d4465 Lines: 1 8 12.5 %
Date: 2024-05-05 02:31:09
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 <array>
       7             : #include <cstddef>
       8             : #include <pup.h>
       9             : 
      10             : #include "Domain/Amr/Flag.hpp"
      11             : #include "ParallelAlgorithms/Amr/Criteria/Criterion.hpp"
      12             : #include "Utilities/MakeArray.hpp"
      13             : #include "Utilities/TMPL.hpp"
      14             : 
      15             : namespace amr::Criteria {
      16             : /*!
      17             :  * \brief Uniformly increases the number of grid points by one
      18             :  *
      19             :  * Useful to do uniform p-refinement, possibly alongside a nontrivial
      20             :  * h-refinement criterion.
      21             :  */
      22             : template <size_t Dim>
      23           1 : class IncreaseResolution : public Criterion {
      24             :  public:
      25           0 :   using options = tmpl::list<>;
      26             : 
      27           0 :   static constexpr Options::String help = {
      28             :       "Uniformly increases the number of grid points by one."};
      29             : 
      30           0 :   IncreaseResolution() = default;
      31             : 
      32             :   /// \cond
      33             :   explicit IncreaseResolution(CkMigrateMessage* msg);
      34             :   using PUP::able::register_constructor;
      35             :   WRAPPED_PUPable_decl_template(IncreaseResolution);  // NOLINT
      36             :   /// \endcond
      37             : 
      38           0 :   using compute_tags_for_observation_box = tmpl::list<>;
      39           0 :   using argument_tags = tmpl::list<>;
      40             : 
      41             :   template <typename Metavariables>
      42           0 :   std::array<Flag, Dim> operator()(
      43             :       Parallel::GlobalCache<Metavariables>& /*cache*/,
      44             :       const ElementId<Dim>& /*element_id*/) const {
      45             :     return make_array<Dim>(Flag::IncreaseResolution);
      46             :   }
      47             : };
      48             : 
      49             : /// \cond
      50             : template <size_t Dim>
      51             : PUP::able::PUP_ID IncreaseResolution<Dim>::my_PUP_ID = 0;  // NOLINT
      52             : /// \endcond
      53             : 
      54             : }  // namespace amr::Criteria

Generated by: LCOV version 1.14