Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <ostream>
7 :
8 : namespace Options {
9 : class Option;
10 : template <typename T>
11 : struct create_from_yaml;
12 : } // namespace Options
13 :
14 : namespace fd::reconstruction {
15 : /*!
16 : * \ingroup FiniteDifferenceGroup
17 : * \brief Possible types of reconstruction routines to fall back to from
18 : * higher-order reconstruction when using adaptive method.
19 : *
20 : * \note FD reconstructions with input arguments or options (e.g. AoWeno,
21 : * Wcns5z, ..) are currently not supported as fallback types. We _may_ need it
22 : * at some point in the future but it would require using a different option
23 : * parsing method (e.g. factory creation).
24 : *
25 : */
26 0 : enum class FallbackReconstructorType { Minmod, MonotonisedCentral, None };
27 :
28 0 : std::ostream& operator<<(
29 : std::ostream& os,
30 : fd::reconstruction::FallbackReconstructorType recons_type);
31 : } // namespace fd::reconstruction
32 :
33 : template <>
34 0 : struct Options::create_from_yaml<
35 : fd::reconstruction::FallbackReconstructorType> {
36 : template <typename Metavariables>
37 0 : static fd::reconstruction::FallbackReconstructorType create(
38 : const Options::Option& options) {
39 : return create<void>(options);
40 : }
41 : };
42 : template <>
43 0 : fd::reconstruction::FallbackReconstructorType
44 : Options::create_from_yaml<fd::reconstruction::FallbackReconstructorType>::
45 : create<void>(const Options::Option& options);
|