Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <memory> 7 : #include <pup.h> 8 : 9 : #include "Utilities/Serialization/CharmPupable.hpp" 10 : 11 : namespace gh { 12 : /// \brief Gauge conditions for generalized harmonic evolution systems. 13 : namespace gauges { 14 : /// \brief Base class for GH gauge conditions. 15 : /// 16 : /// Derived class must have a `void gauge_and_spacetime_derivative` function 17 : /// that takes as `not_null` arguments \f$H_a\f$ and \f$\partial_b H_a\f$. 18 : /// Additional arguments can be added that are needed to compute the gauge 19 : /// condition. The `gh::gauges::dispatch()` function must also 20 : /// be updated to correctly detect and forward to the gauge condition. The 21 : /// header file must also be included in `Factory.hpp` and the gauge condition 22 : /// added to the `all_gauges` type alias in `Factory.hpp`. 23 1 : class GaugeCondition : public PUP::able { 24 : public: 25 0 : GaugeCondition() = default; 26 0 : GaugeCondition(const GaugeCondition&) = default; 27 0 : GaugeCondition& operator=(const GaugeCondition&) = default; 28 0 : GaugeCondition(GaugeCondition&&) = default; 29 0 : GaugeCondition& operator=(GaugeCondition&&) = default; 30 0 : ~GaugeCondition() override = default; 31 : 32 0 : explicit GaugeCondition(CkMigrateMessage* msg); 33 : 34 0 : WRAPPED_PUPable_abstract(GaugeCondition); // NOLINT 35 : 36 0 : virtual std::unique_ptr<GaugeCondition> get_clone() const = 0; 37 : 38 0 : virtual bool is_harmonic() const { return false; } 39 : }; 40 : } // namespace gauges 41 : } // namespace gh