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 <optional> 8 : #include <pup.h> 9 : #include <string> 10 : #include <type_traits> 11 : 12 : #include "DataStructures/DataBox/Prefixes.hpp" 13 : #include "DataStructures/DataVector.hpp" 14 : #include "DataStructures/Tensor/Tensor.hpp" 15 : #include "Evolution/BoundaryConditions/Type.hpp" 16 : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/BoundaryCondition.hpp" 17 : #include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/Tags.hpp" 18 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp" 19 : #include "Options/String.hpp" 20 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp" 21 : #include "Utilities/Gsl.hpp" 22 : #include "Utilities/Serialization/CharmPupable.hpp" 23 : #include "Utilities/TMPL.hpp" 24 : 25 : namespace gh::BoundaryConditions { 26 : /// A `BoundaryCondition` that only verifies that all characteristic speeds are 27 : /// directed out of the domain; no boundary data is altered by this boundary 28 : /// condition. 29 : template <size_t Dim> 30 1 : class DemandOutgoingCharSpeeds final : public BoundaryCondition<Dim> { 31 : public: 32 0 : using options = tmpl::list<>; 33 0 : static constexpr Options::String help{ 34 : "A boundary condition that only verifies the characteristic speeds are " 35 : "all directed out of the domain."}; 36 : 37 0 : DemandOutgoingCharSpeeds() = default; 38 0 : DemandOutgoingCharSpeeds(DemandOutgoingCharSpeeds&&) = default; 39 0 : DemandOutgoingCharSpeeds& operator=(DemandOutgoingCharSpeeds&&) = default; 40 0 : DemandOutgoingCharSpeeds(const DemandOutgoingCharSpeeds&) = default; 41 0 : DemandOutgoingCharSpeeds& operator=(const DemandOutgoingCharSpeeds&) = 42 : default; 43 0 : ~DemandOutgoingCharSpeeds() override = default; 44 : 45 0 : explicit DemandOutgoingCharSpeeds(CkMigrateMessage* msg); 46 : 47 0 : WRAPPED_PUPable_decl_base_template( 48 : domain::BoundaryConditions::BoundaryCondition, DemandOutgoingCharSpeeds); 49 : 50 0 : auto get_clone() const -> std::unique_ptr< 51 : domain::BoundaryConditions::BoundaryCondition> override; 52 : 53 0 : static constexpr evolution::BoundaryConditions::Type bc_type = 54 : evolution::BoundaryConditions::Type::DemandOutgoingCharSpeeds; 55 : 56 0 : void pup(PUP::er& p) override; 57 : 58 0 : using dg_interior_evolved_variables_tags = tmpl::list<>; 59 0 : using dg_interior_temporary_tags = 60 : tmpl::list<::gh::ConstraintDamping::Tags::ConstraintGamma1, 61 : gr::Tags::Lapse<DataVector>, gr::Tags::Shift<DataVector, Dim>>; 62 0 : using dg_gridless_tags = tmpl::list<>; 63 0 : using dg_interior_primitive_variables_tags = tmpl::list<>; 64 : 65 0 : static std::optional<std::string> dg_demand_outgoing_char_speeds( 66 : const std::optional<tnsr::I<DataVector, Dim, Frame::Inertial>>& 67 : face_mesh_velocity, 68 : const tnsr::i<DataVector, Dim, Frame::Inertial>& 69 : outward_directed_normal_covector, 70 : const tnsr::I<DataVector, Dim, Frame::Inertial>& 71 : /*outward_directed_normal_vector*/, 72 : 73 : const Scalar<DataVector>& gamma_1, const Scalar<DataVector>& lapse, 74 : const tnsr::I<DataVector, Dim, Frame::Inertial>& shift); 75 : }; 76 : } // namespace gh::BoundaryConditions