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/Burgers/BoundaryConditions/BoundaryCondition.hpp"
17 #include "Evolution/Systems/Burgers/Tags.hpp"
18 #include "Options/Options.hpp"
20 #include "Utilities/Gsl.hpp"
21 #include "Utilities/TMPL.hpp"
22 
24 class Outflow final : public BoundaryCondition {
25  public:
26  using options = tmpl::list<>;
27  static constexpr Options::String help{
28  "Outflow boundary condition that only verifies the characteristic speeds "
29  "are all directed out of the domain."};
30  static std::string name() noexcept { return "Outflow"; }
31 
32  Outflow() = default;
33  Outflow(Outflow&&) noexcept = default;
34  Outflow& operator=(Outflow&&) noexcept = default;
35  Outflow(const Outflow&) = default;
36  Outflow& operator=(const Outflow&) = default;
37  ~Outflow() override = default;
38 
39  explicit Outflow(CkMigrateMessage* msg) noexcept;
40 
41  WRAPPED_PUPable_decl_base_template(
43 
44  auto get_clone() const noexcept -> std::unique_ptr<
46 
47  static constexpr evolution::BoundaryConditions::Type bc_type =
48  evolution::BoundaryConditions::Type::Outflow;
49 
50  void pup(PUP::er& p) override;
51 
52  using dg_interior_evolved_variables_tags = tmpl::list<Tags::U>;
53  using dg_interior_temporary_tags = tmpl::list<>;
54  using dg_gridless_tags = tmpl::list<>;
55 
56  static std::optional<std::string> dg_outflow(
57  const std::optional<tnsr::I<DataVector, 1, Frame::Inertial>>&
58  face_mesh_velocity,
59  const tnsr::i<DataVector, 1, Frame::Inertial>&
60  outward_directed_normal_covector,
61  const Scalar<DataVector>& u) noexcept;
62 };
63 } // namespace Burgers::BoundaryConditions
std::string
CharmPupable.hpp
domain::BoundaryConditions::BoundaryCondition
Base class from which all system-specific base classes must inherit.
Definition: BoundaryCondition.hpp:18
Options.hpp
Burgers::BoundaryConditions
Boundary conditions for the Burgers system.
Definition: BoundaryCondition.cpp:10
memory
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
Burgers::BoundaryConditions::BoundaryCondition
The base class off of which all boundary conditions must inherit.
Definition: BoundaryCondition.hpp:23
optional
Burgers::BoundaryConditions::Outflow
Definition: Outflow.hpp:24
std::unique_ptr
Prefixes.hpp
type_traits
TMPL.hpp
string