Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstdint>
7 : #include <iosfwd>
8 :
9 : /// \cond
10 : namespace Options {
11 : class Option;
12 : template <typename T>
13 : struct create_from_yaml;
14 : } // namespace Options
15 : /// \endcond
16 :
17 : namespace amr::Criteria {
18 :
19 : /// \ingroup AmrGroup
20 : /// \brief Type of mesh refinement
21 1 : enum class Type : uint8_t {
22 : h, /**< Used to split or join elements */
23 : p /**< used to change the extents of a Mesh in an Element */
24 : };
25 :
26 : /// Output operator for a Type.
27 1 : std::ostream& operator<<(std::ostream& os, const Type& type);
28 : } // namespace amr::Criteria
29 :
30 : template <>
31 0 : struct Options::create_from_yaml<amr::Criteria::Type> {
32 : template <typename Metavariables>
33 0 : static amr::Criteria::Type create(const Options::Option& options) {
34 : return create<void>(options);
35 : }
36 : };
37 :
38 : template <>
39 0 : amr::Criteria::Type
40 : Options::create_from_yaml<amr::Criteria::Type>::create<void>(
41 : const Options::Option& options);
|