16 std::pair<std::string, bool>
28 if (candidateAlias ==
"GMRES") {
29 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
31 else if (candidateAlias ==
"BLOCK GMRES") {
32 return std::make_pair (std::string (
"BLOCK GMRES"),
true);
34 else if (candidateAlias ==
"FLEXIBLE GMRES") {
35 return std::make_pair (std::string (
"BLOCK GMRES"),
true);
37 else if (candidateAlias ==
"CG") {
38 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
40 else if (candidateAlias ==
"PSEUDOBLOCKCG") {
41 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
43 else if (candidateAlias ==
"STOCHASTIC CG") {
44 return std::make_pair (std::string (
"PSEUDOBLOCK STOCHASTIC CG"),
true);
46 else if (candidateAlias ==
"RECYCLING CG") {
47 return std::make_pair (std::string (
"RCG"),
true);
49 else if (candidateAlias ==
"RECYCLING GMRES") {
50 return std::make_pair (std::string (
"GCRODR"),
true);
53 else if (candidateAlias ==
"PSEUDO BLOCK GMRES") {
54 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
56 else if (candidateAlias ==
"PSEUDOBLOCKGMRES") {
57 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
59 else if (candidateAlias ==
"PSEUDO BLOCK CG") {
60 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
62 else if (candidateAlias ==
"PSEUDOBLOCKCG") {
63 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
65 else if (candidateAlias ==
"TRANSPOSE-FREE QMR") {
66 return std::make_pair (std::string (
"TFQMR"),
true);
68 else if (candidateAlias ==
"PSEUDO BLOCK TFQMR") {
69 return std::make_pair (std::string (
"PSEUDOBLOCK TFQMR"),
true);
71 else if (candidateAlias ==
"PSEUDO BLOCK TRANSPOSE-FREE QMR") {
72 return std::make_pair (std::string (
"PSEUDOBLOCK TFQMR"),
true);
74 else if (candidateAlias ==
"GMRESPOLY") {
75 return std::make_pair (std::string (
"HYBRID BLOCK GMRES"),
true);
77 else if (candidateAlias ==
"SEED GMRES") {
78 return std::make_pair (std::string (
"HYBRID BLOCK GMRES"),
true);
80 else if (candidateAlias ==
"CGPOLY") {
81 return std::make_pair (std::string (
"PCPG"),
true);
83 else if (candidateAlias ==
"SEED CG") {
84 return std::make_pair (std::string (
"PCPG"),
true);
86 else if (candidateAlias ==
"FIXED POINT") {
87 return std::make_pair (std::string (
"FIXED POINT"),
true);
89 else if (candidateAlias ==
"BICGSTAB") {
90 return std::make_pair (std::string (
"BICGSTAB"),
true);
93 return std::make_pair (candidateAlias,
false);
97 std::vector<std::string>
100 #ifdef HAVE_TEUCHOSCORE_CXX11
110 {
"PSEUDO BLOCK GMRES"},
111 {
"PSEUDOBLOCKGMRES"},
114 {
"TRANSPOSE-FREE QMR"},
115 {
"PSEUDO BLOCK TFQMR"},
116 {
"PSEUDO BLOCK TRANSPOSE-FREE QMR"},
124 #else // NOT HAVE_TEUCHOSCORE_CXX11
125 std::vector<std::string> names;
127 names.push_back (
"GMRES");
128 names.push_back (
"BLOCK GMRES");
129 names.push_back (
"FLEXIBLE GMRES");
130 names.push_back (
"CG");
131 names.push_back (
"PSEUDOBLOCKCG");
132 names.push_back (
"STOCHASTIC CG");
133 names.push_back (
"RECYCLING CG");
134 names.push_back (
"RECYCLING GMRES");
135 names.push_back (
"PSEUDO BLOCK GMRES");
136 names.push_back (
"PSEUDOBLOCKGMRES");
137 names.push_back (
"PSEUDO BLOCK CG");
138 names.push_back (
"PSEUDOBLOCKCG");
139 names.push_back (
"TRANSPOSE-FREE QMR");
140 names.push_back (
"PSEUDO BLOCK TFQMR");
141 names.push_back (
"PSEUDO BLOCK TRANSPOSE-FREE QMR");
142 names.push_back (
"GMRESPOLY");
143 names.push_back (
"SEED GMRES");
144 names.push_back (
"CGPOLY");
145 names.push_back (
"SEED CG");
146 names.push_back (
"FIXED POINT");
147 names.push_back (
"BICGSTAB");
150 #endif // HAVE_TEUCHOSCORE_CXX11
153 std::vector<std::string>
158 {
"PSEUDOBLOCK GMRES"},
161 {
"PSEUDOBLOCK STOCHASTIC CG"},
167 {
"PSEUDOBLOCK TFQMR"},
168 {
"HYBRID BLOCK GMRES"},
184 if (aliasName ==
"FLEXIBLE GMRES") {
188 solverParams.
set (
"Flexible Gmres",
true);
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Declaration of alias functions for solver names.
std::vector< std::string > solverNameAliases()
List of supported aliases (to canonical solver names).
int numSupportedSolvers()
Number of Belos solvers supported for any linear algebra implementation ("generically").
std::pair< std::string, bool > getCanonicalNameFromAlias(const std::string &candidateAlias)
Get the candidate canonical name for a given candidate alias.
void reviseParameterListForAlias(const std::string &aliasName, Teuchos::ParameterList &solverParams)
Modify the input ParameterList appropriately for the given solver alias.
std::vector< std::string > canonicalSolverNames()
List of canonical solver names.