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 <pup.h> 8 : 9 : #include "NumericalAlgorithms/SphericalHarmonics/Strahlkorper.hpp" 10 : #include "Options/Options.hpp" 11 : #include "Parallel/GlobalCache.hpp" 12 : #include "ParallelAlgorithms/ApparentHorizonFinder/Criteria/Criterion.hpp" 13 : #include "ParallelAlgorithms/ApparentHorizonFinder/FastFlow.hpp" 14 : #include "Utilities/TMPL.hpp" 15 : 16 : namespace ah::Criteria { 17 : /*! 18 : * \brief Increases the resolution of the Strahlkorper by 2. 19 : * 20 : * Useful to force the horizon finder to adopt the maximum allowed resolution 21 : * and as a simple criterion for testing. 22 : */ 23 1 : class IncreaseResolution : public Criterion { 24 : public: 25 0 : using options = tmpl::list<>; 26 0 : static constexpr Options::String help = { 27 : "Increases the resolution of the Strahlkorper by 2."}; 28 : 29 0 : IncreaseResolution() = default; 30 : 31 : /// \cond 32 : explicit IncreaseResolution(CkMigrateMessage* msg); 33 : using PUP::able::register_constructor; 34 : WRAPPED_PUPable_decl_template(IncreaseResolution); // NOLINT 35 : /// \endcond 36 : 37 0 : std::string observation_name() override { return "IncreaseResolution"; } 38 : 39 0 : using argument_tags = tmpl::list<>; 40 0 : using compute_tags_for_observation_box = tmpl::list<>; 41 : 42 : template <typename Metavariables, typename Frame> 43 0 : size_t operator()(const Parallel::GlobalCache<Metavariables>& /*cache*/, 44 : const ylm::Strahlkorper<Frame>& strahlkorper, 45 : const FastFlow::IterInfo& /*info*/) const { 46 : return strahlkorper.l_max() + 2; 47 : } 48 : 49 0 : bool is_equal(const Criterion& other) const override; 50 : }; 51 : } // namespace ah::Criteria