Tags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <string>
7 
8 #include "DataStructures/DataBox/Tag.hpp"
9 #include "Options/Options.hpp"
10 #include "Utilities/TMPL.hpp"
11 
12 namespace LinearSolver::Richardson {
13 
14 namespace OptionTags {
15 
16 template <typename OptionsGroup>
18  using type = double;
19  using group = OptionsGroup;
20  static constexpr OptionString help =
21  "The weight for the residual in the scheme";
22 };
23 
24 } // namespace OptionTags
25 
26 namespace Tags {
27 
28 /// The Richardson relaxation parameter \f$\omega\f$
29 ///
30 /// \see `LinearSolver::Richardson::Richardson`
31 template <typename OptionsGroup>
33  static std::string name() noexcept {
34  return "RelaxationParameter(" + option_name<OptionsGroup>() + ")";
35  }
36  using type = double;
37 
38  static constexpr bool pass_metavariables = false;
39  using option_tags = tmpl::list<OptionTags::RelaxationParameter<OptionsGroup>>;
40  static double create_from_options(const double value) noexcept {
41  return value;
42  }
43 };
44 
45 } // namespace Tags
46 
47 } // namespace LinearSolver::Richardson
std::string
Options.hpp
db::SimpleTag
Tags for the DataBox inherit from this type.
Definition: Tag.hpp:23
LinearSolver::Richardson::Tags::RelaxationParameter
The Richardson relaxation parameter .
Definition: Tags.hpp:32
LinearSolver::Richardson
Items related to the Richardson linear solver.
Definition: Richardson.hpp:28
OptionString
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:30
TMPL.hpp
LinearSolver::Richardson::OptionTags::RelaxationParameter
Definition: Tags.hpp:17
string