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 <memory> 8 : #include <pup.h> 9 : 10 : #include "Utilities/Serialization/CharmPupable.hpp" 11 : #include "Utilities/TMPL.hpp" 12 : 13 : /// Boundary corrections/numerical fluxes 14 1 : namespace gh::BoundaryCorrections { 15 : /// \cond 16 : template <size_t Dim> 17 : class UpwindPenalty; 18 : /// \endcond 19 : 20 : /*! 21 : * \brief The base class used to make boundary corrections factory createable so 22 : * they can be specified in the input file. 23 : */ 24 : template <size_t Dim> 25 1 : class BoundaryCorrection : public PUP::able { 26 : public: 27 0 : BoundaryCorrection() = default; 28 0 : BoundaryCorrection(const BoundaryCorrection&) = default; 29 0 : BoundaryCorrection& operator=(const BoundaryCorrection&) = default; 30 0 : BoundaryCorrection(BoundaryCorrection&&) = default; 31 0 : BoundaryCorrection& operator=(BoundaryCorrection&&) = default; 32 0 : ~BoundaryCorrection() override = default; 33 : 34 : /// \cond 35 : explicit BoundaryCorrection(CkMigrateMessage* msg) : PUP::able(msg) {} 36 : WRAPPED_PUPable_abstract(BoundaryCorrection<Dim>); // NOLINT 37 : /// \endcond 38 : 39 0 : using creatable_classes = tmpl::list<UpwindPenalty<Dim>>; 40 : 41 0 : virtual std::unique_ptr<BoundaryCorrection<Dim>> get_clone() const = 0; 42 : }; 43 : } // namespace gh::BoundaryCorrections