Outflow.hpp
1 // 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 
13 #include "DataStructures/DataVector.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/Options.hpp"
21 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
22 #include "Utilities/Gsl.hpp"
23 #include "Utilities/TMPL.hpp"
24 
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 class Outflow final : public BoundaryCondition<Dim> {
31  public:
32  using options = tmpl::list<>;
33  static constexpr Options::String help{
34  "Outflow boundary condition that only verifies the characteristic speeds "
35  "are all directed out of the domain."};
36 
37  Outflow() = default;
38  Outflow(Outflow&&) noexcept = default;
39  Outflow& operator=(Outflow&&) noexcept = default;
40  Outflow(const Outflow&) = default;
41  Outflow& operator=(const Outflow&) = default;
42  ~Outflow() override = default;
43 
44  explicit Outflow(CkMigrateMessage* msg) noexcept;
45 
46  WRAPPED_PUPable_decl_base_template(
48 
49  auto get_clone() const noexcept -> std::unique_ptr<
51 
52  static constexpr evolution::BoundaryConditions::Type bc_type =
53  evolution::BoundaryConditions::Type::Outflow;
54 
55  void pup(PUP::er& p) override;
56 
57  using dg_interior_evolved_variables_tags = tmpl::list<>;
58  using dg_interior_temporary_tags = tmpl::list<
62  using dg_gridless_tags = tmpl::list<>;
63  using dg_interior_primitive_variables_tags = tmpl::list<>;
64 
65  static std::optional<std::string> dg_outflow(
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) noexcept;
75 };
76 } // namespace GeneralizedHarmonic::BoundaryConditions
CharmPupable.hpp
domain::BoundaryConditions::BoundaryCondition
Base class from which all system-specific base classes must inherit.
Definition: BoundaryCondition.hpp:18
Options.hpp
GeneralizedHarmonic::BoundaryConditions
Boundary conditions for the generalized harmonic system.
Definition: Bjorhus.hpp:38
gr::lapse
Scalar< DataType > lapse(const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute lapse from shift and spacetime metric.
GeneralizedHarmonic::BoundaryConditions::Outflow
A BoundaryCondition that only verifies that all characteristic speeds are directed out of the domain;...
Definition: Outflow.hpp:30
memory
gr::Tags::Shift
Definition: Tags.hpp:48
gr::shift
tnsr::I< DataType, SpatialDim, Frame > shift(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) noexcept
Compute shift from spacetime metric and inverse spatial metric.
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
Gsl.hpp
Options::String
const char *const String
The string used in option structs.
Definition: Options.hpp:32
Tensor.hpp
GeneralizedHarmonic::BoundaryConditions::BoundaryCondition
The base class off of which all boundary conditions must inherit.
Definition: BoundaryCondition.hpp:27
optional
GeneralizedHarmonic::ConstraintDamping::Tags::ConstraintGamma1
Constraint dammping parameter for the generalized harmonic system (cf. ).
Definition: Tags.hpp:62
std::unique_ptr
Prefixes.hpp
type_traits
gr::Tags::Lapse
Definition: Tags.hpp:52
TMPL.hpp
string