48 std::pair<std::string, bool>
60 if (candidateAlias ==
"GMRES") {
61 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
63 else if (candidateAlias ==
"BLOCK GMRES") {
64 return std::make_pair (std::string (
"BLOCK GMRES"),
true);
66 else if (candidateAlias ==
"FLEXIBLE GMRES") {
67 return std::make_pair (std::string (
"BLOCK GMRES"),
true);
69 else if (candidateAlias ==
"CG") {
70 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
72 else if (candidateAlias ==
"PSEUDOBLOCKCG") {
73 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
75 else if (candidateAlias ==
"STOCHASTIC CG") {
76 return std::make_pair (std::string (
"PSEUDOBLOCK STOCHASTIC CG"),
true);
78 else if (candidateAlias ==
"RECYCLING CG") {
79 return std::make_pair (std::string (
"RCG"),
true);
81 else if (candidateAlias ==
"RECYCLING GMRES") {
82 return std::make_pair (std::string (
"GCRODR"),
true);
85 else if (candidateAlias ==
"PSEUDO BLOCK GMRES") {
86 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
88 else if (candidateAlias ==
"PSEUDOBLOCKGMRES") {
89 return std::make_pair (std::string (
"PSEUDOBLOCK GMRES"),
true);
91 else if (candidateAlias ==
"PSEUDO BLOCK CG") {
92 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
94 else if (candidateAlias ==
"PSEUDOBLOCKCG") {
95 return std::make_pair (std::string (
"PSEUDOBLOCK CG"),
true);
97 else if (candidateAlias ==
"TRANSPOSE-FREE QMR") {
98 return std::make_pair (std::string (
"TFQMR"),
true);
100 else if (candidateAlias ==
"PSEUDO BLOCK TFQMR") {
101 return std::make_pair (std::string (
"PSEUDOBLOCK TFQMR"),
true);
103 else if (candidateAlias ==
"PSEUDO BLOCK TRANSPOSE-FREE QMR") {
104 return std::make_pair (std::string (
"PSEUDOBLOCK TFQMR"),
true);
106 else if (candidateAlias ==
"GMRESPOLY") {
107 return std::make_pair (std::string (
"HYBRID BLOCK GMRES"),
true);
109 else if (candidateAlias ==
"SEED GMRES") {
110 return std::make_pair (std::string (
"HYBRID BLOCK GMRES"),
true);
112 else if (candidateAlias ==
"CGPOLY") {
113 return std::make_pair (std::string (
"PCPG"),
true);
115 else if (candidateAlias ==
"SEED CG") {
116 return std::make_pair (std::string (
"PCPG"),
true);
118 else if (candidateAlias ==
"FIXED POINT") {
119 return std::make_pair (std::string (
"FIXED POINT"),
true);
121 else if (candidateAlias ==
"BICGSTAB") {
122 return std::make_pair (std::string (
"BICGSTAB"),
true);
125 return std::make_pair (candidateAlias,
false);
129 std::vector<std::string>
132 #ifdef HAVE_TEUCHOSCORE_CXX11
142 {
"PSEUDO BLOCK GMRES"},
143 {
"PSEUDOBLOCKGMRES"},
146 {
"TRANSPOSE-FREE QMR"},
147 {
"PSEUDO BLOCK TFQMR"},
148 {
"PSEUDO BLOCK TRANSPOSE-FREE QMR"},
156 #else // NOT HAVE_TEUCHOSCORE_CXX11
157 std::vector<std::string> names;
159 names.push_back (
"GMRES");
160 names.push_back (
"BLOCK GMRES");
161 names.push_back (
"FLEXIBLE GMRES");
162 names.push_back (
"CG");
163 names.push_back (
"PSEUDOBLOCKCG");
164 names.push_back (
"STOCHASTIC CG");
165 names.push_back (
"RECYCLING CG");
166 names.push_back (
"RECYCLING GMRES");
167 names.push_back (
"PSEUDO BLOCK GMRES");
168 names.push_back (
"PSEUDOBLOCKGMRES");
169 names.push_back (
"PSEUDO BLOCK CG");
170 names.push_back (
"PSEUDOBLOCKCG");
171 names.push_back (
"TRANSPOSE-FREE QMR");
172 names.push_back (
"PSEUDO BLOCK TFQMR");
173 names.push_back (
"PSEUDO BLOCK TRANSPOSE-FREE QMR");
174 names.push_back (
"GMRESPOLY");
175 names.push_back (
"SEED GMRES");
176 names.push_back (
"CGPOLY");
177 names.push_back (
"SEED CG");
178 names.push_back (
"FIXED POINT");
179 names.push_back (
"BICGSTAB");
182 #endif // HAVE_TEUCHOSCORE_CXX11
185 std::vector<std::string>
190 {
"PSEUDOBLOCK GMRES"},
193 {
"PSEUDOBLOCK STOCHASTIC CG"},
199 {
"PSEUDOBLOCK TFQMR"},
200 {
"HYBRID BLOCK GMRES"},
216 if (aliasName ==
"FLEXIBLE GMRES") {
220 solverParams.
set (
"Flexible Gmres",
true);
ParameterList & set(std::string const &name, T const &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.