SpECTRE
v2021.04.06
Documentation
Introduction
Releases
Installation
User Tutorials
Dev Guide
Code of Conduct
Contributing Guide
Code Reference
Topics
Namespaces
Files
Bibliography
View on GitHub
src
ParallelAlgorithms
LinearSolver
Richardson
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>
17
struct
RelaxationParameter
{
18
using
type = double;
19
using
group = OptionsGroup;
20
static
constexpr
Options::String
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>
32
struct
RelaxationParameter
:
db::SimpleTag
{
33
static
std::string
name() noexcept {
34
return
"RelaxationParameter("
+ Options::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
Mark a struct as a simple tag by inheriting from this.
Definition:
Tag.hpp:36
LinearSolver::Richardson::Tags::RelaxationParameter
The Richardson relaxation parameter .
Definition:
Tags.hpp:32
LinearSolver::Richardson
Items related to the Richardson linear solver.
Definition:
Richardson.hpp:33
Options::String
const char *const String
The string used in option structs.
Definition:
Options.hpp:32
TMPL.hpp
LinearSolver::Richardson::OptionTags::RelaxationParameter
Definition:
Tags.hpp:17
string
© Copyright 2017 - 2021
SXS Collaboration
,
Distributed under the
MIT License