9 #include "DataStructures/DataBox/Tag.hpp"
10 #include "NumericalAlgorithms/Convergence/Criteria.hpp"
11 #include "NumericalAlgorithms/Convergence/HasConverged.hpp"
17 namespace OptionTags {
19 template <
typename OptionsGroup>
21 static std::string name() noexcept {
return "ConvergenceCriteria"; }
23 "Determine convergence of the algorithm";
25 using group = OptionsGroup;
28 template <
typename OptionsGroup>
31 "Number of iterations to run the algorithm";
33 using group = OptionsGroup;
42 template <
typename OptionsGroup>
45 return "ConvergenceCriteria(" + Options::name<OptionsGroup>() +
")";
49 using option_tags = tmpl::list<OptionTags::Criteria<OptionsGroup>>;
50 static constexpr
bool pass_metavariables =
false;
53 return convergence_criteria;
58 template <
typename OptionsGroup>
61 return "Iterations(" + Options::name<OptionsGroup>() +
")";
65 static constexpr
bool pass_metavariables =
false;
66 using option_tags = tmpl::list<OptionTags::Iterations<OptionsGroup>>;
67 static size_t create_from_options(
const size_t max_iterations) noexcept {
68 return max_iterations;
73 template <
typename Label>
76 return "IterationId(" + pretty_type::short_name<Label>() +
")";
85 template <
typename Label>
88 return "HasConverged(" + pretty_type::short_name<Label>() +
")";
Criteria that determine an iterative algorithm has converged.
Definition: Criteria.hpp:35
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
Signals convergence of the algorithm.
Definition: HasConverged.hpp:68
Items related to checking the convergence of numerical algorithms.
Definition: Convergence.hpp:10
const char *const String
The string used in option structs.
Definition: Options.hpp:32