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 fd {
17 : /// Controls which FD derivative order is used.
18 1 : enum class DerivativeOrder : int {
19 : /// \brief Use one order high derivative.
20 : ///
21 : /// For example, if fifth order reconstruction is used, then a sixth-order
22 : /// derivative is used.
23 : OneHigherThanRecons = -1,
24 : /// \brief Same as `OneHigherThanRecons` except uses a fourth-order derivative
25 : /// if fifth-order reconstruction was used.
26 : OneHigherThanReconsButFiveToFour = -2,
27 : /// \brief Use 2nd order derivatives
28 : Two = 2,
29 : /// \brief Use 4th order derivatives
30 : Four = 4,
31 : /// \brief Use 6th order derivatives
32 : Six = 6,
33 : /// \brief Use 8th order derivatives
34 : Eight = 8,
35 : /// \brief Use 10th order derivatives
36 : Ten = 10
37 : };
38 :
39 0 : std::ostream& operator<<(std::ostream& os, DerivativeOrder der_order);
40 : } // namespace fd
41 :
42 : template <>
43 0 : struct Options::create_from_yaml<fd::DerivativeOrder> {
44 : template <typename Metavariables>
45 0 : static fd::DerivativeOrder create(const Options::Option& options) {
46 : return create<void>(options);
47 : }
48 : };
49 :
50 : template <>
51 0 : fd::DerivativeOrder
52 : Options::create_from_yaml<fd::DerivativeOrder>::create<void>(
53 : const Options::Option& options);
|