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/GrMhd/ValenciaDivClean/BoundaryConditions/BoundaryCondition.hpp"
17 #include "Options/Options.hpp"
19 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
20 #include "Utilities/Gsl.hpp"
21 #include "Utilities/TMPL.hpp"
22 
24 /// A `BoundaryCondition` that only verifies that all characteristic speeds are
25 /// directed out of the domain; no boundary data is altered by this boundary
26 /// condition.
27 class Outflow final : public BoundaryCondition {
28  public:
29  using options = tmpl::list<>;
30  static constexpr Options::String help{
31  "Outflow boundary condition that only verifies the characteristic speeds "
32  "are all directed out of the domain."};
33 
34  Outflow() = default;
35  Outflow(Outflow&&) noexcept = default;
36  Outflow& operator=(Outflow&&) noexcept = default;
37  Outflow(const Outflow&) = default;
38  Outflow& operator=(const Outflow&) = default;
39  ~Outflow() override = default;
40 
41  explicit Outflow(CkMigrateMessage* msg) noexcept;
42 
43  WRAPPED_PUPable_decl_base_template(
45 
46  auto get_clone() const noexcept -> std::unique_ptr<
48 
49  static constexpr evolution::BoundaryConditions::Type bc_type =
50  evolution::BoundaryConditions::Type::Outflow;
51 
52  void pup(PUP::er& p) override;
53 
54  using dg_interior_evolved_variables_tags = tmpl::list<>;
55  using dg_interior_temporary_tags =
56  tmpl::list<gr::Tags::Shift<3, Frame::Inertial, DataVector>,
58  using dg_gridless_tags = tmpl::list<>;
59  using dg_interior_primitive_variables_tags = tmpl::list<>;
60 
61  static std::optional<std::string> dg_outflow(
62  const std::optional<tnsr::I<DataVector, 3, Frame::Inertial>>&
63  face_mesh_velocity,
64  const tnsr::i<DataVector, 3, Frame::Inertial>&
65  outward_directed_normal_covector,
66  const tnsr::I<DataVector, 3, Frame::Inertial>&
67  /*outward_directed_normal_vector*/,
68 
69  const tnsr::I<DataVector, 3, Frame::Inertial>& shift,
70  const Scalar<DataVector>& lapse) noexcept;
71 };
72 } // namespace grmhd::ValenciaDivClean::BoundaryConditions
CharmPupable.hpp
domain::BoundaryConditions::BoundaryCondition
Base class from which all system-specific base classes must inherit.
Definition: BoundaryCondition.hpp:18
Options.hpp
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.
memory
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
optional
std::unique_ptr
Prefixes.hpp
grmhd::ValenciaDivClean::BoundaryConditions::BoundaryCondition
The base class off of which all boundary conditions must inherit.
Definition: BoundaryCondition.hpp:22
type_traits
gr::Tags::Lapse
Definition: Tags.hpp:52
TMPL.hpp
grmhd::ValenciaDivClean::BoundaryConditions
Boundary conditions for the GRMHD Valencia Divergence Cleaning system.
Definition: BoundaryCondition.hpp:20
string
grmhd::ValenciaDivClean::BoundaryConditions::Outflow
A BoundaryCondition that only verifies that all characteristic speeds are directed out of the domain;...
Definition: Outflow.hpp:27