Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <memory>
8 :
9 : #include "DataStructures/DataBox/Prefixes.hpp"
10 : #include "Evolution/Systems/ScalarTensor/Tags.hpp"
11 : #include "Options/String.hpp"
12 : #include "PointwiseFunctions/ConstraintDamping/DampingFunction.hpp"
13 :
14 : /// \cond
15 : namespace ScalarTensor::OptionTags {
16 : struct Group;
17 : } // namespace ScalarTensor::OptionTags
18 : /// \endcond
19 :
20 : namespace ScalarTensor {
21 : namespace OptionTags {
22 : /*!
23 : * \brief A DampingFunction to compute the constraint damping parameter
24 : * \f$\gamma_1\f$.
25 : */
26 : template <size_t VolumeDim, typename Fr>
27 1 : struct DampingFunctionGamma1 {
28 0 : using type =
29 : std::unique_ptr<::ConstraintDamping::DampingFunction<VolumeDim, Fr>>;
30 0 : static constexpr Options::String help{
31 : "DampingFunction for damping parameter gamma1"};
32 0 : using group = ::ScalarTensor::OptionTags::Group;
33 : };
34 :
35 : /*!
36 : * \brief A DampingFunction to compute the constraint damping parameter
37 : * \f$\gamma_2\f$.
38 : */
39 : template <size_t VolumeDim, typename Fr>
40 1 : struct DampingFunctionGamma2 {
41 0 : using type =
42 : std::unique_ptr<::ConstraintDamping::DampingFunction<VolumeDim, Fr>>;
43 0 : static constexpr Options::String help{
44 : "DampingFunction for damping parameter gamma2"};
45 0 : using group = ::ScalarTensor::OptionTags::Group;
46 : };
47 : } // namespace OptionTags
48 :
49 : namespace Tags {
50 : /// \copydoc ScalarTensor::OptionTags::DampingFunctionGamma1
51 : template <size_t VolumeDim, typename Fr>
52 1 : struct DampingFunctionGamma1 : db::SimpleTag {
53 0 : using DampingFunctionType =
54 : ::ConstraintDamping::DampingFunction<VolumeDim, Fr>;
55 0 : using type = std::unique_ptr<DampingFunctionType>;
56 0 : using option_tags = tmpl::list<
57 : ::ScalarTensor::OptionTags::DampingFunctionGamma1<VolumeDim, Fr>>;
58 :
59 0 : static constexpr bool pass_metavariables = false;
60 0 : static type create_from_options(const type& damping_function) {
61 : return damping_function->get_clone();
62 : }
63 : };
64 :
65 : /// \copydoc ScalarTensor::OptionTags::DampingFunctionGamma2
66 : template <size_t VolumeDim, typename Fr>
67 1 : struct DampingFunctionGamma2 : db::SimpleTag {
68 0 : using DampingFunctionType =
69 : ::ConstraintDamping::DampingFunction<VolumeDim, Fr>;
70 0 : using type = std::unique_ptr<DampingFunctionType>;
71 0 : using option_tags = tmpl::list<
72 : ::ScalarTensor::OptionTags::DampingFunctionGamma2<VolumeDim, Fr>>;
73 :
74 0 : static constexpr bool pass_metavariables = false;
75 0 : static type create_from_options(const type& damping_function) {
76 : return damping_function->get_clone();
77 : }
78 : };
79 : } // namespace Tags
80 : } // namespace ScalarTensor
|