Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <iosfwd> 7 : 8 : /// \cond 9 : namespace Options { 10 : class Option; 11 : template <typename T> 12 : struct create_from_yaml; 13 : } // namespace Options 14 : /// \endcond 15 : 16 : namespace dg { 17 : /*! 18 : * \ingroup DiscontinuousGalerkinGroup 19 : * \brief The DG formulation to use 20 : * 21 : * - The `StrongInertial` formulation is also known as the integrate then 22 : * transform formulation. The "Inertial" part of the name refers to the fact 23 : * that the integration is done over the physical/inertial coordinates, while 24 : * the "strong" part refers to the fact that the boundary correction terms are 25 : * zero if the solution is continuous at the interfaces. 26 : * See \cite Teukolsky2015ega for an overview. 27 : * - The `WeakInertial` formulation is also known as the integrate then 28 : * transform formulation. The "Inertial" part of the name refers to the fact 29 : * that the integration is done over the physical/inertial coordinates, while 30 : * the "weak" part refers to the fact that the boundary correction terms are 31 : * non-zero even if the solution is continuous at the interfaces. 32 : * See \cite Teukolsky2015ega for an overview. 33 : */ 34 0 : enum class Formulation { StrongInertial, WeakInertial }; 35 : 36 0 : std::ostream& operator<<(std::ostream& os, Formulation t); 37 : } // namespace dg 38 : 39 : /// \cond 40 : template <> 41 : struct Options::create_from_yaml<dg::Formulation> { 42 : template <typename Metavariables> 43 : static dg::Formulation create(const Options::Option& options) { 44 : return create<void>(options); 45 : } 46 : }; 47 : 48 : template <> 49 : dg::Formulation Options::create_from_yaml<dg::Formulation>::create<void>( 50 : const Options::Option& options); 51 : /// \endcond