46 #include <Teuchos_XMLParameterListCoreHelpers.hpp> 82 if (name ==
"verbosity") {
83 std::string verb =
"none";
84 if (value ==
"\"0\"") verb =
"none";
85 if (value ==
"\"1\"" || value ==
"\"2\"" || value ==
"\"3\"") verb =
"low";
86 if (value ==
"\"4\"" || value ==
"\"5\"" || value ==
"\"6\"") verb =
"medium";
87 if (value ==
"\"7\"" || value ==
"\"8\"") verb =
"high";
88 if (value ==
"\"9\"") verb =
"extreme";
89 if (value ==
"\"10\"") verb =
"test";
90 verb =
"\"" + verb +
"\"";
91 ss <<
"<Parameter name=\"verbosity\" type=\"string\" value=" << verb <<
"/>";
95 if (name ==
"cycle type") {
96 std::stringstream temp1; temp1 <<
"\"" <<
"MGV" <<
"\"";
97 std::stringstream temp2; temp2 <<
"\"" <<
"MGV" <<
"\"";
98 if (value == temp1.str() ) { ss <<
"<Parameter name=\"cycle type\" type=\"string\" value=\"V\"/>";
return ss.str(); }
99 else if (value == temp2.str()) { ss <<
"<Parameter name=\"cycle type\" type=\"string\" value=\"W\"/>";
return ss.str(); }
101 <<
"The parameter " << value <<
" is not supported by MueLu.");
106 if (name ==
"multigrid algorithm") {
107 std::stringstream temp; temp <<
"\"" <<
"1" <<
"\"";
108 if (value == temp.str() ) { ss <<
"<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"pg\"/>";
return ss.str(); }
111 if (name ==
"repartition: enable") {
112 std::stringstream temp1; temp1 <<
"\"" <<
"1" <<
"\"";
113 if (value == temp1.str()) {
114 RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
115 *out <<
"WARNING: repartitioning in MueLu is different to MLs. Please refer to the MueLu users Manual for more information." << std::endl;
122 if (name ==
"number of equations") { ss <<
"<Parameter name=\"number of equations\" type=\"int\" value=" << value <<
"/>";
return ss.str(); }
123 if (name ==
"max levels") { ss <<
"<Parameter name=\"max levels\" type=\"int\" value=" << value <<
"/>";
return ss.str(); }
124 if (name ==
"problem: symmetric") { ss <<
"<Parameter name=\"problem: symmetric\" type=\"bool\" value=" << value <<
"/>";
return ss.str(); }
125 if (name ==
"aggregation: drop tol") { ss <<
"<Parameter name=\"aggregation: drop tol\" type=\"double\" value=" << value <<
"/>";
return ss.str(); }
126 if (name ==
"print initial parameters") { ss <<
"<Parameter name=\"print initial parameters\" type=\"bool\" value=" << value <<
"/>";
return ss.str(); }
127 if (name ==
"print unused parameters") { ss <<
"<Parameter name=\"print unused parameters\" type=\"bool\" value=" << value <<
"/>";
return ss.str(); }
128 if (name ==
"sa: damping factor") { ss <<
"<Parameter name=\"sa: damping factor\" type=\"double\" value=" << value <<
"/>";
return ss.str(); }
129 if (name ==
"sa: eigenvalue estimate num iterations") { ss <<
"<Parameter name=\"sa: eigenvalue estimate num iterations\" type=\"int\" value=" << value <<
"/>";
return ss.str(); }
130 if (name ==
"repartition: enable") { ss <<
"<Parameter name=\"repartition: enable\" type=\"bool\" value=" << value <<
"/>";
return ss.str(); }
131 if (name ==
"repartition: start level") { ss <<
"<Parameter name=\"repartition: start level\" type=\"int\" value=" << value <<
"/>";
return ss.str(); }
132 if (name ==
"repartition: min rows per proc") { ss <<
"<Parameter name=\"repartition: min rows per proc\" type=\"int\" value=" << value <<
"/>";
return ss.str(); }
133 if (name ==
"repartition: max imbalance") { ss <<
"<Parameter name=\"repartition: max imbalance\" type=\"double\" value=" << value <<
"/>";
return ss.str(); }
134 if (name ==
"use external multigrid package") { ss <<
"<Parameter name=\"use external multigrid package\" type=\"string\" value=" << value <<
"/>";
return ss.str(); }
142 "<ParameterList name=\"MueLu\">" 143 "<Parameter name=\"problem: type\" type=\"string\" value=\"unknown\"/>" 144 "<Parameter name=\"verbosity\" type=\"string\" value=\"high\"/>" 145 "<Parameter name=\"number of equations\" type=\"int\" value=\"1\"/>" 146 "<Parameter name=\"max levels\" type=\"int\" value=\"10\"/>" 147 "<Parameter name=\"cycle type\" type=\"string\" value=\"V\"/>" 148 "<Parameter name=\"problem: symmetric\" type=\"bool\" value=\"true\"/>" 149 "<Parameter name=\"xml parameter file\" type=\"string\" value=\"\"/>" 150 "<Parameter name=\"parameterlist: syntax\" type=\"string\" value=\"muelu\"/>" 151 "<Parameter name=\"smoother: pre or post\" type=\"string\" value=\"both\"/>" 152 "<Parameter name=\"smoother: type\" type=\"string\" value=\"RELAXATION\"/>" 153 "<Parameter name=\"smoother: pre type\" type=\"string\" value=\"RELAXATION\"/>" 154 "<Parameter name=\"smoother: post type\" type=\"string\" value=\"RELAXATION\"/>" 155 "<ParameterList name=\"smoother: params\"/>" 156 "<ParameterList name=\"smoother: pre params\"/>" 157 "<ParameterList name=\"smoother: post params\"/>" 158 "<Parameter name=\"smoother: overlap\" type=\"int\" value=\"0\"/>" 159 "<Parameter name=\"smoother: pre overlap\" type=\"int\" value=\"0\"/>" 160 "<Parameter name=\"smoother: post overlap\" type=\"int\" value=\"0\"/>" 161 "<Parameter name=\"coarse: max size\" type=\"int\" value=\"2000\"/>" 162 "<Parameter name=\"coarse: type\" type=\"string\" value=\"SuperLU\"/>" 163 "<ParameterList name=\"coarse: params\"/>" 164 "<Parameter name=\"coarse: overlap\" type=\"int\" value=\"0\"/>" 165 "<Parameter name=\"aggregation: type\" type=\"string\" value=\"uncoupled\"/>" 166 "<Parameter name=\"aggregation: ordering\" type=\"string\" value=\"natural\"/>" 167 "<Parameter name=\"aggregation: drop scheme\" type=\"string\" value=\"classical\"/>" 168 "<Parameter name=\"aggregation: drop tol\" type=\"double\" value=\"0.0\"/>" 169 "<Parameter name=\"aggregation: min agg size\" type=\"int\" value=\"2\"/>" 170 "<Parameter name=\"aggregation: max agg size\" type=\"int\" value=\"-1\"/>" 171 "<Parameter name=\"aggregation: brick x size\" type=\"int\" value=\"2\"/>" 172 "<Parameter name=\"aggregation: brick y size\" type=\"int\" value=\"2\"/>" 173 "<Parameter name=\"aggregation: brick z size\" type=\"int\" value=\"2\"/>" 174 "<Parameter name=\"aggregation: max selected neighbors\" type=\"int\" value=\"0\"/>" 175 "<Parameter name=\"aggregation: Dirichlet threshold\" type=\"double\" value=\"0.0\"/>" 176 "<Parameter name=\"aggregation: enable phase 1\" type=\"bool\" value=\"true\"/>" 177 "<Parameter name=\"aggregation: enable phase 2a\" type=\"bool\" value=\"true\"/>" 178 "<Parameter name=\"aggregation: enable phase 2b\" type=\"bool\" value=\"true\"/>" 179 "<Parameter name=\"aggregation: enable phase 3\" type=\"bool\" value=\"true\"/>" 180 "<Parameter name=\"aggregation: preserve Dirichlet points\" type=\"bool\" value=\"false\"/>" 181 "<Parameter name=\"aggregation: allow user-specified singletons\" type=\"bool\" value=\"false\"/>" 182 "<Parameter name=\"aggregation: export visualization data\" type=\"bool\" value=\"false\"/>" 183 "<Parameter name=\"aggregation: output filename\" type=\"string\" value=\"\"/>" 184 "<Parameter name=\"aggregation: output file: time step\" type=\"int\" value=\"0\"/>" 185 "<Parameter name=\"aggregation: output file: iter\" type=\"int\" value=\"0\"/>" 186 "<Parameter name=\"aggregation: output file: agg style\" type=\"string\" value=\"Point Cloud\"/>" 187 "<Parameter name=\"aggregation: output file: fine graph edges\" type=\"bool\" value=\"false\"/>" 188 "<Parameter name=\"aggregation: output file: coarse graph edges\" type=\"bool\" value=\"false\"/>" 189 "<Parameter name=\"aggregation: output file: build colormap\" type=\"bool\" value=\"false\"/>" 190 "<ParameterList name=\"aggregation: params\"/>" 191 "<ParameterList name=\"strength-of-connection: params\"/>" 192 "<ParameterList name=\"export data\"/>" 193 "<Parameter name=\"print initial parameters\" type=\"bool\" value=\"true\"/>" 194 "<Parameter name=\"print unused parameters\" type=\"bool\" value=\"true\"/>" 195 "<Parameter name=\"transpose: use implicit\" type=\"bool\" value=\"false\"/>" 196 "<Parameter name=\"use kokkos refactor\" type=\"bool\" value=\"false\"/>" 197 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"sa\"/>" 198 "<Parameter name=\"toggle: mode\" type=\"string\" value=\"semicoarsen\"/>" 199 "<Parameter name=\"semicoarsen: coarsen rate\" type=\"int\" value=\"3\"/>" 200 "<Parameter name=\"semicoarsen: number of levels\" type=\"int\" value=\"3\"/>" 201 "<Parameter name=\"linedetection: orientation\" type=\"string\" value=\"vertical\"/>" 202 "<Parameter name=\"linedetection: num layers\" type=\"int\" value=\"-1\"/>" 203 "<Parameter name=\"sa: damping factor\" type=\"double\" value=\"1.33\"/>" 204 "<Parameter name=\"sa: use filtered matrix\" type=\"bool\" value=\"true\"/>" 205 "<Parameter name=\"sa: calculate eigenvalue estimate\" type=\"bool\" value=\"false\"/>" 206 "<Parameter name=\"sa: eigenvalue estimate num iterations\" type=\"int\" value=\"10\"/>" 207 "<ParameterList name=\"transfer: params\"/>" 208 "<Parameter name=\"filtered matrix: use lumping\" type=\"bool\" value=\"true\"/>" 209 "<Parameter name=\"filtered matrix: reuse eigenvalue\" type=\"bool\" value=\"true\"/>" 210 "<Parameter name=\"filtered matrix: reuse graph\" type=\"bool\" value=\"true\"/>" 211 "<Parameter name=\"emin: iterative method\" type=\"string\" value=\"cg\"/>" 212 "<Parameter name=\"emin: num iterations\" type=\"int\" value=\"2\"/>" 213 "<Parameter name=\"emin: num reuse iterations\" type=\"int\" value=\"1\"/>" 214 "<Parameter name=\"emin: pattern\" type=\"string\" value=\"AkPtent\"/>" 215 "<Parameter name=\"emin: pattern order\" type=\"int\" value=\"1\"/>" 216 "<Parameter name=\"repartition: enable\" type=\"bool\" value=\"false\"/>" 217 "<Parameter name=\"repartition: partitioner\" type=\"string\" value=\"zoltan2\"/>" 218 "<ParameterList name=\"repartition: params\"/>" 219 "<Parameter name=\"repartition: start level\" type=\"int\" value=\"2\"/>" 220 "<Parameter name=\"repartition: min rows per proc\" type=\"int\" value=\"800\"/>" 221 "<Parameter name=\"repartition: max imbalance\" type=\"double\" value=\"1.2\"/>" 222 "<Parameter name=\"repartition: remap parts\" type=\"bool\" value=\"true\"/>" 223 "<Parameter name=\"repartition: remap num values\" type=\"int\" value=\"4\"/>" 224 "<Parameter name=\"repartition: print partition distribution\" type=\"bool\" value=\"false\"/>" 225 "<Parameter name=\"repartition: rebalance P and R\" type=\"bool\" value=\"false\"/>" 226 "<Parameter name=\"repartition: use subcommunicators\" type=\"bool\" value=\"true\"/>" 227 "<Parameter name=\"reuse: type\" type=\"string\" value=\"none\"/>" 228 "<Parameter name=\"use external multigrid package\" type=\"string\" value=\"none\"/>" 229 "<ParameterList name=\"amgx:params\"/>" 230 "<Parameter name=\"debug: graph level\" type=\"int\" value=\"-1\"/>" 236 "<ParameterList name=\"MueLu\">" 238 "<Parameter name=\"number of equations\" type=\"int\" value=\"1\"/>" 240 "<Parameter name=\"smoother: type\" type=\"string\" value=\"CHEBYSHEV\"/>" 242 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"sa\"/>" 248 "<ParameterList name=\"MueLu\">" 250 "<Parameter name=\"number of equations\" type=\"int\" value=\"1\"/>" 252 "<Parameter name=\"smoother: type\" type=\"string\" value=\"CHEBYSHEV\"/>" 254 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"sa\"/>" 260 "<ParameterList name=\"MueLu\">" 262 "<Parameter name=\"number of equations\" type=\"int\" value=\"2\"/>" 264 "<Parameter name=\"smoother: type\" type=\"string\" value=\"CHEBYSHEV\"/>" 266 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"sa\"/>" 272 "<ParameterList name=\"MueLu\">" 274 "<Parameter name=\"number of equations\" type=\"int\" value=\"3\"/>" 276 "<Parameter name=\"smoother: type\" type=\"string\" value=\"CHEBYSHEV\"/>" 278 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"sa\"/>" 284 "<ParameterList name=\"MueLu\">" 286 "<Parameter name=\"smoother: type\" type=\"string\" value=\"SCHWARZ\"/>" 288 "<ParameterList name=\"smoother: params\">" 290 "<Parameter name=\"schwarz: overlap level\" type=\"int\" value=\"1\"/>" 292 "<Parameter name=\"schwarz: combine mode\" type=\"string\" value=\"Zero\"/>" 294 "<Parameter name=\"schwarz: use reordering\" type=\"bool\" value=\"false\"/>" 296 "<Parameter name=\"subdomain solver name\" type=\"string\" value=\"RILUK\"/>" 298 "<ParameterList name=\"subdomain solver parameters\">" 300 "<Parameter name=\"fact: iluk level-of-fill\" type=\"int\" value=\"0\"/>" 302 "<Parameter name=\"fact: absolute threshold\" type=\"double\" value=\"0.\"/>" 304 "<Parameter name=\"fact: relative threshold\" type=\"double\" value=\"1.\"/>" 306 "<Parameter name=\"fact: relax value\" type=\"double\" value=\"0.\"/>" 312 "<Parameter name=\"transpose: use implicit\" type=\"bool\" value=\"true\"/>" 314 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"unsmoothed\"/>" 318 (
"ConvectionDiffusion",
320 "<ParameterList name=\"MueLu\">" 322 "<Parameter name=\"problem: symmetric\" type=\"bool\" value=\"false\"/>" 324 "<Parameter name=\"smoother: type\" type=\"string\" value=\"RELAXATION\"/>" 326 "<ParameterList name=\"smoother: params\">" 328 "<Parameter name=\"relaxation: type\" type=\"string\" value=\"Gauss-Seidel\"/>" 332 "<Parameter name=\"multigrid algorithm\" type=\"string\" value=\"pg\"/>" 334 "<Parameter name=\"sa: use filtered matrix\" type=\"bool\" value=\"true\"/>" 341 (
"default values",
"problem: type")
343 (
"ML output",
"verbosity")
345 (
"PDE equations",
"number of equations")
347 (
"max levels",
"max levels")
349 (
"prec type",
"cycle type")
351 (
"problem: symmetric",
"problem: symmetric")
353 (
"xml parameter file",
"xml parameter file")
355 (
"parameterlist: syntax",
"parameterlist: syntax")
357 (
"smoother: pre or post",
"smoother: pre or post")
359 (
"smoother: type",
"smoother: type")
361 (
"smoother: pre type",
"smoother: pre type")
363 (
"smoother: post type",
"smoother: post type")
365 (
"smoother: params",
"smoother: params")
367 (
"smoother: pre params",
"smoother: pre params")
369 (
"smoother: post params",
"smoother: post params")
371 (
"smoother: overlap",
"smoother: overlap")
373 (
"smoother: pre overlap",
"smoother: pre overlap")
375 (
"smoother: post overlap",
"smoother: post overlap")
377 (
"max size",
"coarse: max size")
379 (
"coarse: type",
"coarse: type")
381 (
"coarse: params",
"coarse: params")
383 (
"coarse: overlap",
"coarse: overlap")
385 (
"aggregation: type",
"aggregation: type")
387 (
"aggregation: ordering",
"aggregation: ordering")
389 (
"aggregation: drop scheme",
"aggregation: drop scheme")
391 (
"aggregation: threshold",
"aggregation: drop tol")
393 (
"aggregation: min agg size",
"aggregation: min agg size")
395 (
"aggregation: max agg size",
"aggregation: max agg size")
397 (
"aggregation: brick x size",
"aggregation: brick x size")
399 (
"aggregation: brick y size",
"aggregation: brick y size")
401 (
"aggregation: brick z size",
"aggregation: brick z size")
403 (
"aggregation: max selected neighbors",
"aggregation: max selected neighbors")
405 (
"aggregation: Dirichlet threshold",
"aggregation: Dirichlet threshold")
407 (
"aggregation: enable phase 1",
"aggregation: enable phase 1")
409 (
"aggregation: enable phase 2a",
"aggregation: enable phase 2a")
411 (
"aggregation: enable phase 2b",
"aggregation: enable phase 2b")
413 (
"aggregation: enable phase 3",
"aggregation: enable phase 3")
415 (
"aggregation: preserve Dirichlet points",
"aggregation: preserve Dirichlet points")
417 (
"aggregation: allow user-specified singletons",
"aggregation: allow user-specified singletons")
419 (
"aggregation: export visualization data",
"aggregation: export visualization data")
421 (
"aggregation: output filename",
"aggregation: output filename")
423 (
"aggregation: output file: time step",
"aggregation: output file: time step")
425 (
"aggregation: output file: iter",
"aggregation: output file: iter")
427 (
"aggregation: output file: agg style",
"aggregation: output file: agg style")
429 (
"aggregation: output file: fine graph edges",
"aggregation: output file: fine graph edges")
431 (
"aggregation: output file: coarse graph edges",
"aggregation: output file: coarse graph edges")
433 (
"aggregation: output file: build colormap",
"aggregation: output file: build colormap")
435 (
"aggregation: params",
"aggregation: params")
437 (
"strength-of-connection: params",
"strength-of-connection: params")
439 (
"export data",
"export data")
441 (
"ML print initial list",
"print initial parameters")
443 (
"print unused",
"print unused parameters")
445 (
"transpose: use implicit",
"transpose: use implicit")
447 (
"use kokkos refactor",
"use kokkos refactor")
449 (
"energy minimization: enable",
"multigrid algorithm")
451 (
"toggle: mode",
"toggle: mode")
453 (
"semicoarsen: coarsen rate",
"semicoarsen: coarsen rate")
455 (
"semicoarsen: number of levels",
"semicoarsen: number of levels")
457 (
"linedetection: orientation",
"linedetection: orientation")
459 (
"linedetection: num layers",
"linedetection: num layers")
461 (
"aggregation: damping factor",
"sa: damping factor")
463 (
"sa: use filtered matrix",
"sa: use filtered matrix")
465 (
"sa: calculate eigenvalue estimate",
"sa: calculate eigenvalue estimate")
467 (
"eigen-analysis: iterations",
"sa: eigenvalue estimate num iterations")
469 (
"transfer: params",
"transfer: params")
471 (
"filtered matrix: use lumping",
"filtered matrix: use lumping")
473 (
"filtered matrix: reuse eigenvalue",
"filtered matrix: reuse eigenvalue")
475 (
"filtered matrix: reuse graph",
"filtered matrix: reuse graph")
477 (
"emin: iterative method",
"emin: iterative method")
479 (
"emin: num iterations",
"emin: num iterations")
481 (
"emin: num reuse iterations",
"emin: num reuse iterations")
483 (
"emin: pattern",
"emin: pattern")
485 (
"emin: pattern order",
"emin: pattern order")
487 (
"repartition: enable",
"repartition: enable")
489 (
"repartition: partitioner",
"repartition: partitioner")
491 (
"repartition: params",
"repartition: params")
493 (
"repartition: start level",
"repartition: start level")
495 (
"repartition: min per proc",
"repartition: min rows per proc")
497 (
"repartition: max min ratio",
"repartition: max imbalance")
499 (
"repartition: remap parts",
"repartition: remap parts")
501 (
"repartition: remap num values",
"repartition: remap num values")
503 (
"repartition: print partition distribution",
"repartition: print partition distribution")
505 (
"repartition: rebalance P and R",
"repartition: rebalance P and R")
507 (
"repartition: use subcommunicators",
"repartition: use subcommunicators")
509 (
"reuse: type",
"reuse: type")
511 (
"use external multigrid package",
"use external multigrid package")
513 (
"amgx:params",
"amgx:params")
515 (
"debug: graph level",
"debug: graph level")
static std::map< std::string, std::string > ML2MueLuLists_
Map of ML parameter strings to corresponding MueLu parametes.
static const std::string stringList_
String equivalent of the masterList_.
static Teuchos::RCP< Teuchos::ParameterList > problemSpecificList_
A ParameterList that holds all valid parameters and their default values for a particular problem typ...
static std::string interpretParameterName(const std::string &name, const std::string &value)
Namespace for MueLu classes and methods.
static Teuchos::RCP< Teuchos::ParameterList > masterList_
A ParameterList that holds all valid parameters and their default values.
static Teuchos::RCP< Teuchos::ParameterList > GetProblemSpecificList(std::string const &problemType)
Return default parameter settings for the specified problem type.
Exception throws to report errors in the internal logical of the program.
static Teuchos::RCP< const Teuchos::ParameterList > List()
Return a "master" list of all valid parameters and their default values.
Helper class to initialize DefaultProblemTypeLists_ in class MasterList.
static std::map< std::string, std::string > DefaultProblemTypeLists_
Map of string equivalents of the problemSpecificList_. The first entry is the problem type...
static std::string problemType_
The problem type associated with the current problem-specific ParameterList.