Type.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <iosfwd>
7 
8 namespace evolution::BoundaryConditions {
9 /*!
10  * \brief The type of boundary condition.
11  *
12  * There are generally two categories or types of boundary conditions. Those
13  * that:
14  *
15  * 1. set up additional cells or elements (called ghost cells or ghost elements)
16  * outside the computational domain and then apply boundary corrections the
17  * same way that is done in the the interior. For example, in a discontinuous
18  * Galerkin scheme these would impose boundary conditions through a numerical
19  * flux boundary correction term.
20  *
21  * 2. change the time derivatives at the external boundary
22  */
23 enum class Type {
24  /// Impose boundary conditions by setting values on ghost cells/elements.
25  ///
26  /// The ghost cell values can come either from internal data or from an
27  /// analytic prescription
28  Ghost,
29  /// Impose boundary conditions on the time derivative of the evolved
30  /// variables.
31  ///
32  /// These are imposed after all internal and external boundaries using a ghost
33  /// cell prescription have been handled.
34  TimeDerivative,
35  /// Impose ghost boundary conditions on some of the evolved variables and time
36  /// derivative boundary conditions on others.
37  GhostAndTimeDerivative,
38  /// Impose outflow boundary conditions on the boundary.
39  ///
40  /// Typically the outflow boundary conditions should only check that all
41  /// characteristic speeds are out of the domain.
42  Outflow
43 };
44 
45 std::ostream& operator<<(std::ostream& os,
46  Type boundary_condition_type) noexcept;
47 } // namespace evolution::BoundaryConditions
iosfwd
std::ostream