46 #ifndef MUELU_PARAMETERLISTINTERPRETER_DEF_HPP 47 #define MUELU_PARAMETERLISTINTERPRETER_DEF_HPP 49 #include <Teuchos_XMLParameterListHelpers.hpp> 51 #include <Xpetra_Matrix.hpp> 59 #include "MueLu_Hierarchy.hpp" 60 #include "MueLu_FactoryManager.hpp" 62 #include "MueLu_AggregationExportFactory.hpp" 63 #include "MueLu_BrickAggregationFactory.hpp" 64 #include "MueLu_CoalesceDropFactory.hpp" 65 #include "MueLu_CoarseMapFactory.hpp" 66 #include "MueLu_ConstraintFactory.hpp" 67 #include "MueLu_CoordinatesTransferFactory.hpp" 68 #include "MueLu_CoupledAggregationFactory.hpp" 69 #include "MueLu_DirectSolver.hpp" 70 #include "MueLu_EminPFactory.hpp" 72 #include "MueLu_FactoryFactory.hpp" 73 #include "MueLu_FilteredAFactory.hpp" 74 #include "MueLu_GenericRFactory.hpp" 75 #include "MueLu_LineDetectionFactory.hpp" 77 #include "MueLu_NullspaceFactory.hpp" 78 #include "MueLu_PatternFactory.hpp" 79 #include "MueLu_PgPFactory.hpp" 80 #include "MueLu_RAPFactory.hpp" 81 #include "MueLu_RebalanceAcFactory.hpp" 82 #include "MueLu_RebalanceTransferFactory.hpp" 83 #include "MueLu_RepartitionFactory.hpp" 84 #include "MueLu_SaPFactory.hpp" 85 #include "MueLu_SemiCoarsenPFactory.hpp" 86 #include "MueLu_SmootherFactory.hpp" 87 #include "MueLu_TentativePFactory.hpp" 88 #include "MueLu_TogglePFactory.hpp" 89 #include "MueLu_ToggleCoordinatesTransferFactory.hpp" 90 #include "MueLu_TransPFactory.hpp" 91 #include "MueLu_UncoupledAggregationFactory.hpp" 92 #include "MueLu_ZoltanInterface.hpp" 93 #include "MueLu_Zoltan2Interface.hpp" 95 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 96 #include "MueLu_CoalesceDropFactory_kokkos.hpp" 97 #include "MueLu_CoarseMapFactory_kokkos.hpp" 98 #include "MueLu_CoordinatesTransferFactory_kokkos.hpp" 99 #include "MueLu_NullspaceFactory_kokkos.hpp" 100 #include "MueLu_SaPFactory_kokkos.hpp" 101 #include "MueLu_TentativePFactory_kokkos.hpp" 102 #include "MueLu_UncoupledAggregationFactory_kokkos.hpp" 105 #ifdef HAVE_MUELU_MATLAB 106 #include "../matlab/src/MueLu_MatlabSmoother_decl.hpp" 107 #include "../matlab/src/MueLu_MatlabSmoother_def.hpp" 108 #include "../matlab/src/MueLu_TwoLevelMatlabFactory_decl.hpp" 109 #include "../matlab/src/MueLu_TwoLevelMatlabFactory_def.hpp" 110 #include "../matlab/src/MueLu_SingleLevelMatlabFactory_decl.hpp" 111 #include "../matlab/src/MueLu_SingleLevelMatlabFactory_def.hpp" 120 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
123 if(paramList.isParameter(
"xml parameter file")){
124 std::string filename = paramList.get(
"xml parameter file",
"");
125 if(filename.length()!=0) {
126 if(comm.is_null())
throw Exceptions::RuntimeError(
"xml parameter file requires a valid comm");
127 Teuchos::ParameterList paramList2 = paramList;
128 Teuchos::updateParametersFromXmlFileAndBroadcast(filename, Teuchos::Ptr<Teuchos::ParameterList>(¶mList2),*comm);
129 SetParameterList(paramList2);
132 SetParameterList(paramList);
135 SetParameterList(paramList);
138 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
140 ParameterList paramList;
141 Teuchos::updateParametersFromXmlFileAndBroadcast(xmlFileName, Teuchos::Ptr<ParameterList>(¶mList), comm);
145 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
151 if (paramList.isSublist(
"Hierarchy")) {
156 ParameterList validList, nonSerialList;
168 static inline bool areSame(
const ParameterList& list1,
const ParameterList& list2);
173 #define MUELU_SET_VAR_2LIST(paramList, defaultList, paramName, paramType, varName) \ 175 if (paramList.isParameter(paramName)) varName = paramList.get<paramType>(paramName); \ 176 else if (defaultList.isParameter(paramName)) varName = defaultList.get<paramType>(paramName); \ 177 else varName = MasterList::getDefault<paramType>(paramName); 179 #define MUELU_TEST_AND_SET_VAR(paramList, paramName, paramType, varName) \ 180 (paramList.isParameter(paramName) ? varName = paramList.get<paramType>(paramName), true : false) 184 #define MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, paramName, paramType, listWrite) \ 186 if (paramList .isParameter(paramName)) listWrite.set(paramName, paramList .get<paramType>(paramName)); \ 187 else if (defaultList.isParameter(paramName)) listWrite.set(paramName, defaultList.get<paramType>(paramName)); \ 189 catch(Teuchos::Exceptions::InvalidParameterType) { \ 190 TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true, Teuchos::Exceptions::InvalidParameterType, \ 191 "Error: parameter \"" << paramName << "\" must be of type " << Teuchos::TypeNameTraits<paramType>::name()); \ 194 #define MUELU_TEST_PARAM_2LIST(paramList, defaultList, paramName, paramType, cmpValue) \ 196 paramList.isParameter(paramName) ? paramList .get<paramType>(paramName) : ( \ 197 defaultList.isParameter(paramName) ? defaultList.get<paramType>(paramName) : \ 198 MasterList::getDefault<paramType>(paramName) ) ) ) 200 #ifndef HAVE_MUELU_KOKKOS_REFACTOR 201 #define MUELU_KOKKOS_FACTORY(varName, oldFactory, newFactory) \ 202 RCP<Factory> varName = rcp(new oldFactory()); 203 #define MUELU_KOKKOS_FACTORY_NO_DECL(varName, oldFactory, newFactory) \ 204 varName = rcp(new oldFactory()); 206 #define MUELU_KOKKOS_FACTORY(varName, oldFactory, newFactory) \ 207 RCP<Factory> varName; \ 208 if (!useKokkos) varName = rcp(new oldFactory()); \ 209 else varName = rcp(new newFactory()); 210 #define MUELU_KOKKOS_FACTORY_NO_DECL(varName, oldFactory, newFactory) \ 211 if (!useKokkos) varName = rcp(new oldFactory()); \ 212 else varName = rcp(new newFactory()); 215 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
217 ParameterList paramList;
219 MUELU_SET_VAR_2LIST(constParamList, constParamList,
"problem: type", std::string, problemType);
220 if (problemType !=
"unknown") {
222 paramList.setParameters(constParamList);
226 paramList = constParamList;
230 if (paramList.isParameter(
"cycle type")) {
231 std::map<std::string,CycleType> cycleMap;
235 std::string cycleType = paramList.get<std::string>(
"cycle type");
236 TEUCHOS_TEST_FOR_EXCEPTION(cycleMap.count(cycleType) == 0,
Exceptions::RuntimeError,
"Invalid cycle type: \"" << cycleType <<
"\"");
237 Cycle_ = cycleMap[cycleType];
240 this->
maxCoarseSize_ = paramList.get<
int> (
"coarse: max size", MasterList::getDefault<int>(
"coarse: max size"));
241 this->
numDesiredLevel_ = paramList.get<
int> (
"max levels", MasterList::getDefault<int>(
"max levels"));
242 blockSize_ = paramList.get<
int> (
"number of equations", MasterList::getDefault<int>(
"number of equations"));
247 if (paramList.isSublist(
"export data")) {
248 ParameterList printList = paramList.sublist(
"export data");
250 if (printList.isParameter(
"A"))
251 this->
matricesToPrint_ = Teuchos::getArrayFromStringParameter<int>(printList,
"A");
252 if (printList.isParameter(
"P"))
254 if (printList.isParameter(
"R"))
260 std::map<std::string,MsgType> verbMap;
261 verbMap[
"none"] =
None;
262 verbMap[
"low"] =
Low;
263 verbMap[
"medium"] =
Medium;
264 verbMap[
"high"] =
High;
266 verbMap[
"test"] =
Test;
271 "Invalid verbosity level: \"" << verbosityLevel <<
"\"");
284 MUELU_TEST_PARAM_2LIST(paramList, paramList,
"aggregation: drop scheme", std::string,
"distance laplacian") ||
291 std::string levelStr =
"level " +
toString(levelID);
293 if (paramList.isSublist(levelStr)) {
294 const ParameterList& levelList = paramList.sublist(levelStr);
297 MUELU_TEST_PARAM_2LIST(levelList, paramList,
"aggregation: drop scheme", std::string,
"distance laplacian") ||
318 defaultManager->SetVerbLevel(this->
verbosity_);
321 std::vector<keep_pair> keeps0;
331 RCP<FactoryManager> levelManager = rcp(
new FactoryManager(*defaultManager));
332 levelManager->SetVerbLevel(defaultManager->GetVerbLevel());
334 std::vector<keep_pair> keeps;
335 if (paramList.isSublist(
"level " +
toString(levelID))) {
337 ParameterList& levelList = paramList.sublist(
"level " +
toString(levelID),
true);
341 ParameterList levelList;
345 this->
keep_[levelID] = keeps;
357 ParameterList unusedParamList;
360 for (ParameterList::ConstIterator it = paramList.begin(); it != paramList.end(); it++) {
361 const ParameterEntry& entry = paramList.entry(it);
363 if (!entry.isList() && !entry.isUsed())
364 unusedParamList.setEntry(paramList.name(it), entry);
369 std::string levelStr =
"level " +
toString(levelID);
371 if (paramList.isSublist(levelStr)) {
372 const ParameterList& levelList = paramList.sublist(levelStr);
374 for (ParameterList::ConstIterator itr = levelList.begin(); itr != levelList.end(); ++itr) {
375 const ParameterEntry& entry = levelList.entry(itr);
377 if (!entry.isList() && !entry.isUsed())
378 unusedParamList.sublist(levelStr).setEntry(levelList.name(itr), entry);
383 if (unusedParamList.numParams() > 0) {
384 std::ostringstream unusedParamsStream;
386 unusedParamList.print(unusedParamsStream, indent);
388 this->
GetOStream(
Warnings1) <<
"The following parameters were not used:\n" << unusedParamsStream.str() << std::endl;
394 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
396 const ParameterList& defaultList,
FactoryManager& manager,
int levelID, std::vector<keep_pair>& keeps)
const {
401 if (paramList.numParams() == 0 && defaultList.numParams() > 0)
402 paramList = ParameterList(defaultList);
405 TEUCHOS_TEST_FOR_EXCEPTION(reuseType !=
"none" && reuseType !=
"tP" && reuseType !=
"RP" && reuseType !=
"emin" && reuseType !=
"RAP" && reuseType !=
"full",
408 MUELU_SET_VAR_2LIST(paramList, defaultList,
"multigrid algorithm", std::string, multigridAlgo);
409 TEUCHOS_TEST_FOR_EXCEPTION(multigridAlgo !=
"unsmoothed" && multigridAlgo !=
"sa" && multigridAlgo !=
"pg" && multigridAlgo !=
"emin" && multigridAlgo !=
"matlab",
Exceptions::RuntimeError,
"Unknown \"multigrid algorithm\" value: \"" << multigridAlgo <<
"\". Please consult User's Guide.");
410 #ifndef HAVE_MUELU_MATLAB 411 if(multigridAlgo ==
"matlab")
412 throw std::runtime_error(
"Cannot use matlab for multigrid algorithm - MueLu was not configured with MATLAB support.");
416 if (reuseType ==
"none" || reuseType ==
"RP" || reuseType ==
"RAP") {
419 }
else if (reuseType ==
"tP" && (multigridAlgo !=
"sa" && multigridAlgo !=
"unsmoothed")) {
421 this->
GetOStream(
Warnings0) <<
"Ignoring \"tP\" reuse option as it is only compatible with \"sa\", or \"unsmoothed\" multigrid algorithms" << std::endl;
423 }
else if (reuseType ==
"emin" && multigridAlgo !=
"emin") {
425 this->
GetOStream(
Warnings0) <<
"Ignoring \"emin\" reuse option it is only compatible with \"emin\" multigrid algorithm" << std::endl;
433 bool have_userA =
false, have_userP =
false, have_userR =
false, have_userNS =
false, have_userCO =
false;
434 if (paramList.isParameter(
"A") && !paramList.get<RCP<Matrix> > (
"A") .is_null()) have_userA =
true;
435 if (paramList.isParameter(
"P") && !paramList.get<RCP<Matrix> > (
"P") .is_null()) have_userP =
true;
436 if (paramList.isParameter(
"R") && !paramList.get<RCP<Matrix> > (
"R") .is_null()) have_userR =
true;
437 if (paramList.isParameter(
"Nullspace") && !paramList.get<RCP<MultiVector> >(
"Nullspace") .is_null()) have_userNS =
true;
438 if (paramList.isParameter(
"Coordinates") && !paramList.get<RCP<MultiVector> >(
"Coordinates").is_null()) have_userCO =
true;
442 bool isCustomSmoother =
443 paramList.isParameter(
"smoother: pre or post") ||
444 paramList.isParameter(
"smoother: type") || paramList.isParameter(
"smoother: pre type") || paramList.isParameter(
"smoother: post type") ||
445 paramList.isSublist (
"smoother: params") || paramList.isSublist (
"smoother: pre params") || paramList.isSublist (
"smoother: post params") ||
446 paramList.isParameter(
"smoother: sweeps") || paramList.isParameter(
"smoother: pre sweeps") || paramList.isParameter(
"smoother: post sweeps") ||
447 paramList.isParameter(
"smoother: overlap") || paramList.isParameter(
"smoother: pre overlap") || paramList.isParameter(
"smoother: post overlap");
450 manager.
SetFactory(
"Smoother", Teuchos::null);
452 }
else if (isCustomSmoother) {
456 #define TEST_MUTUALLY_EXCLUSIVE(arg1,arg2) \ 457 TEUCHOS_TEST_FOR_EXCEPTION(paramList.isParameter(#arg1) && paramList.isParameter(#arg2), \ 458 Exceptions::InvalidArgument, "You cannot specify both \""#arg1"\" and \""#arg2"\""); 459 #define TEST_MUTUALLY_EXCLUSIVE_S(arg1,arg2) \ 460 TEUCHOS_TEST_FOR_EXCEPTION(paramList.isSublist(#arg1) && paramList.isSublist(#arg2), \ 461 Exceptions::InvalidArgument, "You cannot specify both \""#arg1"\" and \""#arg2"\""); 471 TEUCHOS_TEST_FOR_EXCEPTION(
PreOrPost ==
"both" && (paramList.isParameter(
"smoother: pre type") != paramList.isParameter(
"smoother: post type")),
476 ParameterList defaultSmootherParams;
477 defaultSmootherParams.set(
"relaxation: type",
"Symmetric Gauss-Seidel");
478 defaultSmootherParams.set(
"relaxation: sweeps", Teuchos::OrdinalTraits<LO>::one());
479 defaultSmootherParams.set(
"relaxation: damping factor", Teuchos::ScalarTraits<Scalar>::one());
481 RCP<SmootherFactory> preSmoother = Teuchos::null, postSmoother = Teuchos::null;
482 std::string preSmootherType, postSmootherType;
483 ParameterList preSmootherParams, postSmootherParams;
485 if (paramList.isParameter(
"smoother: overlap"))
486 overlap = paramList.get<
int>(
"smoother: overlap");
489 if (paramList.isParameter(
"smoother: pre type")) {
490 preSmootherType = paramList.get<std::string>(
"smoother: pre type");
492 MUELU_SET_VAR_2LIST(paramList, defaultList,
"smoother: type", std::string, preSmootherTypeTmp);
493 preSmootherType = preSmootherTypeTmp;
495 if (paramList.isParameter(
"smoother: pre overlap"))
496 overlap = paramList.get<
int>(
"smoother: pre overlap");
498 if (paramList.isSublist(
"smoother: pre params"))
499 preSmootherParams = paramList.sublist(
"smoother: pre params");
500 else if (paramList.isSublist(
"smoother: params"))
501 preSmootherParams = paramList.sublist(
"smoother: params");
502 else if (defaultList.isSublist(
"smoother: params"))
503 preSmootherParams = defaultList.sublist(
"smoother: params");
504 else if (preSmootherType ==
"RELAXATION")
505 preSmootherParams = defaultSmootherParams;
506 #ifdef HAVE_MUELU_MATLAB 507 if(preSmootherType ==
"matlab")
515 if (paramList.isParameter(
"smoother: post type"))
516 postSmootherType = paramList.get<std::string>(
"smoother: post type");
518 MUELU_SET_VAR_2LIST(paramList, defaultList,
"smoother: type", std::string, postSmootherTypeTmp);
519 postSmootherType = postSmootherTypeTmp;
522 if (paramList.isSublist(
"smoother: post params"))
523 postSmootherParams = paramList.sublist(
"smoother: post params");
524 else if (paramList.isSublist(
"smoother: params"))
525 postSmootherParams = paramList.sublist(
"smoother: params");
526 else if (defaultList.isSublist(
"smoother: params"))
527 postSmootherParams = defaultList.sublist(
"smoother: params");
528 else if (postSmootherType ==
"RELAXATION")
529 postSmootherParams = defaultSmootherParams;
530 if (paramList.isParameter(
"smoother: post overlap"))
531 overlap = paramList.get<
int>(
"smoother: post overlap");
533 if (postSmootherType == preSmootherType &&
areSame(preSmootherParams, postSmootherParams))
534 postSmoother = preSmoother;
536 #ifdef HAVE_MUELU_MATLAB 537 if(postSmootherType ==
"matlab")
544 if (preSmoother == postSmoother)
547 manager.
SetFactory(
"PreSmoother", preSmoother);
548 manager.
SetFactory(
"PostSmoother", postSmoother);
551 if ((reuseType ==
"RAP" && levelID) || (reuseType ==
"full")) {
563 bool isCustomCoarseSolver =
564 paramList.isParameter(
"coarse: type") ||
565 paramList.isParameter(
"coarse: params");
567 manager.
SetFactory(
"CoarseSolver", Teuchos::null);
569 }
else if (isCustomCoarseSolver) {
576 if (paramList.isParameter(
"coarse: overlap"))
577 overlap = paramList.get<
int>(
"coarse: overlap");
579 ParameterList coarseParams;
580 if (paramList.isSublist(
"coarse: params"))
581 coarseParams = paramList.sublist(
"coarse: params");
582 else if (defaultList.isSublist(
"coarse: params"))
583 coarseParams = defaultList.sublist(
"coarse: params");
585 RCP<SmootherPrototype> coarseSmoother;
589 if (coarseType ==
"RELAXATION" || coarseType ==
"CHEBYSHEV" ||
590 coarseType ==
"ILUT" || coarseType ==
"ILU" || coarseType ==
"RILUK" || coarseType ==
"SCHWARZ" ||
591 coarseType ==
"Amesos" ||
592 coarseType ==
"LINESMOOTHING_BANDEDRELAXATION" ||
593 coarseType ==
"LINESMOOTHING_BANDED_RELAXATION" ||
594 coarseType ==
"LINESMOOTHING_BANDED RELAXATION")
595 coarseSmoother = rcp(
new TrilinosSmoother(coarseType, coarseParams, overlap));
597 #ifdef HAVE_MUELU_MATLAB 598 if(coarseType ==
"matlab")
602 coarseSmoother = rcp(
new DirectSolver(coarseType, coarseParams));
606 if ((reuseType ==
"RAP" && levelID) || (reuseType ==
"full")) {
615 RCP<Factory> dropFactory;
618 #ifdef HAVE_MUELU_MATLAB 620 ParameterList socParams = paramList.sublist(
"strength-of-connection: params");
621 dropFactory->SetParameterList(socParams);
623 throw std::runtime_error(
"Cannot use MATLAB evolutionary strength-of-connection - MueLu was not configured with MATLAB support.");
627 ParameterList dropParams;
628 dropParams.set(
"lightweight wrap",
true);
632 dropFactory->SetParameterList(dropParams);
638 TEUCHOS_TEST_FOR_EXCEPTION(aggType !=
"uncoupled" && aggType !=
"coupled" && aggType !=
"brick" && aggType !=
"matlab",
640 #ifndef HAVE_MUELU_MATLAB 641 if(aggType ==
"matlab")
642 throw std::runtime_error(
"Cannot use MATLAB aggregation - MueLu was not configured with MATLAB support.");
644 RCP<Factory> aggFactory;
645 if (aggType ==
"uncoupled") {
647 ParameterList aggParams;
658 aggFactory->SetParameterList(aggParams);
660 aggFactory->SetFactory(
"DofsPerNode", manager.
GetFactory(
"Graph"));
661 aggFactory->SetFactory(
"Graph", manager.
GetFactory(
"Graph"));
662 }
else if (aggType ==
"coupled") {
664 aggFactory->SetFactory(
"Graph", manager.
GetFactory(
"Graph"));
665 }
else if (aggType ==
"brick") {
667 ParameterList aggParams;
671 aggFactory->SetParameterList(aggParams);
676 aggFactory->SetFactory(
"Coordinates", this->
GetFactoryManager(levelID-1)->GetFactory(
"Coordinates"));
679 #ifdef HAVE_MUELU_MATLAB 680 else if(aggType ==
"matlab") {
681 ParameterList aggParams = paramList.sublist(
"aggregation: params");
683 aggFactory->SetParameterList(aggParams);
690 coarseMap->SetFactory(
"Aggregates", manager.
GetFactory(
"Aggregates"));
695 Ptent->SetFactory(
"Aggregates", manager.
GetFactory(
"Aggregates"));
696 Ptent->SetFactory(
"CoarseMap", manager.
GetFactory(
"CoarseMap"));
700 if (reuseType ==
"tP") {
708 nullSpace->SetFactory(
"Nullspace", manager.
GetFactory(
"Ptent"));
713 TEUCHOS_TEST_FOR_EXCEPTION(multigridAlgo !=
"unsmoothed" && multigridAlgo !=
"sa" && multigridAlgo !=
"pg" && multigridAlgo !=
"emin" && multigridAlgo !=
"matlab",
Exceptions::RuntimeError,
"Unknown multigrid algorithm: \"" << multigridAlgo <<
"\". Please consult User's Guide.");
714 #ifndef HAVE_MUELU_MATLAB 715 if(multigridAlgo ==
"matlab")
716 throw std::runtime_error(
"Cannot use MATLAB prolongator factory - MueLu was not configured with MATLAB support.");
721 }
else if (multigridAlgo ==
"unsmoothed") {
724 }
else if (multigridAlgo ==
"sa") {
727 ParameterList Pparams;
729 #if REUSE_MATRIX_GRAPHS 730 if (reuseType ==
"tP" &&
MUELU_TEST_PARAM_2LIST(paramList, defaultList,
"sa: use filtered matrix",
bool,
false)) {
733 Pparams.set(
"Keep AP Pattern",
true);
736 P->SetParameterList(Pparams);
741 ParameterList fParams;
745 filterFactory->SetParameterList(fParams);
746 filterFactory->SetFactory(
"Graph", manager.
GetFactory(
"Graph"));
748 filterFactory->SetFactory(
"Filtering", manager.
GetFactory(
"Graph"));
749 P->SetFactory(
"A", filterFactory);
752 P->SetFactory(
"P", manager.
GetFactory(
"Ptent"));
755 }
else if (multigridAlgo ==
"emin") {
758 "Invalid pattern name: \"" << patternType <<
"\". Valid options: \"AkPtent\"");
761 ParameterList patternParams;
763 patternFactory->SetParameterList(patternParams);
764 patternFactory->SetFactory(
"P", manager.
GetFactory(
"Ptent"));
765 manager.
SetFactory(
"Ppattern", patternFactory);
769 constraintFactory->SetFactory(
"Ppattern", manager.
GetFactory(
"Ppattern"));
770 constraintFactory->SetFactory(
"CoarseNullspace", manager.
GetFactory(
"Ptent"));
771 manager.
SetFactory(
"Constraint", constraintFactory);
775 ParameterList Pparams;
778 if (reuseType ==
"emin") {
780 Pparams.set(
"Keep P0",
true);
781 Pparams.set(
"Keep Constraint0",
true);
783 P->SetParameterList(Pparams);
784 P->SetFactory(
"P", manager.
GetFactory(
"Ptent"));
785 P->SetFactory(
"Constraint", manager.
GetFactory(
"Constraint"));
788 }
else if (multigridAlgo ==
"pg") {
790 "Implicit transpose not supported with Petrov-Galerkin smoothed transfer operators: Set \"transpose: use implicit\" to false!\n" \
791 "Petrov-Galerkin transfer operator smoothing for non-symmetric problems requires a separate handling of the restriction operator which " \
792 "does not allow the usage of implicit transpose easily.");
796 P->SetFactory(
"P", manager.
GetFactory(
"Ptent"));
799 #ifdef HAVE_MUELU_MATLAB 800 else if(multigridAlgo ==
"matlab") {
801 ParameterList Pparams = paramList.sublist(
"transfer: params");
803 P->SetParameterList(Pparams);
804 P->SetFactory(
"P",manager.
GetFactory(
"Ptent"));
810 RCP<SemiCoarsenPFactory> semicoarsenFactory = Teuchos::null;
811 if (paramList.isParameter(
"semicoarsen: number of levels") &&
812 paramList.get<
int>(
"semicoarsen: number of levels") > 0) {
814 ParameterList togglePParams;
815 ParameterList semicoarsenPParams;
816 ParameterList linedetectionParams;
826 linedetectionFactory->SetParameterList(linedetectionParams);
827 semicoarsenFactory->SetParameterList(semicoarsenPParams);
828 togglePFactory->SetParameterList(togglePParams);
829 togglePFactory->AddCoarseNullspaceFactory(semicoarsenFactory);
830 togglePFactory->AddProlongatorFactory(semicoarsenFactory);
831 togglePFactory->AddPtentFactory(semicoarsenFactory);
832 togglePFactory->AddCoarseNullspaceFactory(manager.
GetFactory(
"Ptent"));
833 togglePFactory->AddProlongatorFactory(manager.
GetFactory(
"P"));
834 togglePFactory->AddPtentFactory(manager.
GetFactory(
"Ptent"));
836 manager.
SetFactory(
"CoarseNumZLayers", linedetectionFactory);
837 manager.
SetFactory(
"LineDetection_Layers", linedetectionFactory);
838 manager.
SetFactory(
"LineDetection_VertLineIds", linedetectionFactory);
842 manager.
SetFactory(
"Nullspace", togglePFactory);
848 if (isSymmetric ==
false && (multigridAlgo ==
"unsmoothed" || multigridAlgo ==
"emin")) {
849 this->
GetOStream(
Warnings0) <<
"Switching \"problem: symmetric\" parameter to symmetric as multigrid algorithm. " << multigridAlgo <<
" is primarily supposed to be used for symmetric problems." << std::endl << std::endl;
850 this->
GetOStream(
Warnings0) <<
"Please note: if you are using \"unsmoothed\" transfer operators the \"problem: symmetric\" parameter has no real mathematical meaning, i.e. you can use it for non-symmetric" << std::endl;
851 this->
GetOStream(
Warnings0) <<
"problems, too. With \"problem: symmetric\"=\"symmetric\" you can use implicit transpose for building the restriction operators which may drastically reduce the amount of consumed memory." << std::endl;
855 "Petrov-Galerkin smoothed transfer operators are only allowed for non-symmetric problems: Set \"problem: symmetric\" to false!\n" \
856 "While PG smoothed transfer operators generally would also work for symmetric problems this is an unusual use case. " \
857 "You can use the factory-based xml interface though if you need PG-AMG for symmetric problems.");
881 ParameterList RAPparams;
883 #if REUSE_MATRIX_GRAPHS 886 if (reuseType ==
"RP") {
887 RAPparams.set(
"Keep AP Pattern",
true);
888 RAPparams.set(
"Keep RAP Pattern",
true);
891 RAP->SetParameterList(RAPparams);
892 RAP->SetFactory(
"P", manager.
GetFactory(
"P"));
894 RAP->SetFactory(
"R", manager.
GetFactory(
"R"));
895 if (
MUELU_TEST_PARAM_2LIST(paramList, defaultList,
"aggregation: export visualization data",
bool,
true)) {
897 ParameterList aggExportParams;
905 aggExport->SetParameterList(aggExportParams);
906 aggExport->SetFactory(
"DofsPerNode", manager.
GetFactory(
"DofsPerNode"));
907 RAP->AddTransferFactory(aggExport);
919 coords->SetFactory(
"Aggregates", manager.
GetFactory(
"Aggregates"));
920 coords->SetFactory(
"CoarseMap", manager.
GetFactory(
"CoarseMap"));
923 if (paramList.isParameter(
"semicoarsen: number of levels")) {
925 tf->SetFactory(
"Chosen P", manager.
GetFactory(
"P"));
926 tf->AddCoordTransferFactory(semicoarsenFactory);
927 tf->AddCoordTransferFactory(coords);
931 RAP->AddTransferFactory(manager.
GetFactory(
"Coordinates"));
935 if (reuseType ==
"RP" || reuseType ==
"RAP" || reuseType ==
"full")
938 if (reuseType ==
"RP") {
943 if ((reuseType ==
"tP" || reuseType ==
"RP" || reuseType ==
"emin") &&
useCoordinates_)
986 "Reuse types \"tP\" and \"PR\" require \"repartition: rebalance P and R\" set to \"false\"");
989 "Aggregation type \"brick\" requires \"repartition: enable\" set to \"false\"");
991 MUELU_SET_VAR_2LIST(paramList, defaultList,
"repartition: partitioner", std::string, partName);
993 "Invalid partitioner name: \"" << partName <<
"\". Valid options: \"zoltan\", \"zoltan2\"");
995 RCP<Factory> partitioner;
996 if (partName ==
"zoltan") {
997 #ifdef HAVE_MUELU_ZOLTAN 1003 }
else if (partName ==
"zoltan2") {
1004 #ifdef HAVE_MUELU_ZOLTAN2 1006 ParameterList partParams;
1007 RCP<const ParameterList> partpartParams = rcp(
new ParameterList(paramList.sublist(
"repartition: params",
false)));
1008 partParams.set(
"ParameterList", partpartParams);
1009 partitioner->SetParameterList(partParams);
1014 partitioner->SetFactory(
"A", manager.
GetFactory(
"A"));
1015 partitioner->SetFactory(
"Coordinates", manager.
GetFactory(
"Coordinates"));
1016 manager.
SetFactory(
"Partition", partitioner);
1020 ParameterList repartParams;
1028 repartFactory->SetParameterList(repartParams);
1029 repartFactory->SetFactory(
"A", manager.
GetFactory(
"A"));
1030 repartFactory->SetFactory(
"Partition", manager.
GetFactory(
"Partition"));
1031 manager.
SetFactory(
"Importer", repartFactory);
1032 if (reuseType !=
"none")
1037 ParameterList rebAcParams;
1039 newA->SetParameterList(rebAcParams);
1040 newA->SetFactory(
"A", manager.
GetFactory(
"A"));
1041 newA->SetFactory(
"Importer", manager.
GetFactory(
"Importer"));
1046 ParameterList newPparams;
1047 newPparams.set(
"type",
"Interpolation");
1049 newPparams.set(
"repartition: rebalance P and R", this->
doPRrebalance_);
1052 newP-> SetFactory(
"Importer", manager.
GetFactory(
"Importer"));
1053 newP-> SetFactory(
"P", manager.
GetFactory(
"P"));
1054 if (!paramList.isParameter(
"semicoarsen: number of levels"))
1055 newP-> SetFactory(
"Nullspace", manager.
GetFactory(
"Ptent"));
1057 newP-> SetFactory(
"Nullspace", manager.
GetFactory(
"P"));
1058 newP-> SetFactory(
"Coordinates", manager.
GetFactory(
"Coordinates"));
1064 ParameterList newRparams;
1065 newRparams.set(
"type",
"Restriction");
1068 newRparams.set(
"repartition: rebalance P and R", this->
doPRrebalance_);
1072 newR-> SetFactory(
"Importer", manager.
GetFactory(
"Importer"));
1074 newR->SetFactory(
"R", manager.
GetFactory(
"R"));
1084 nullSpace->SetFactory(
"Nullspace", newP);
1089 if (reuseType ==
"RAP" || reuseType ==
"full") {
1096 #undef MUELU_SET_VAR_2LIST 1097 #undef MUELU_TEST_AND_SET_VAR 1098 #undef MUELU_TEST_AND_SET_PARAM_2LIST 1099 #undef MUELU_TEST_PARAM_2LIST 1103 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1105 ParameterList paramList = constParamList;
1108 const int maxLevels = 100;
1111 std::vector<ParameterList> paramLists;
1112 for (
int levelID = 0; levelID < maxLevels; levelID++) {
1113 std::string sublistName =
"level " +
toString(levelID);
1114 if (paramList.isSublist(sublistName)) {
1115 paramLists.push_back(paramList.sublist(sublistName));
1117 paramList.remove(sublistName);
1120 paramLists.push_back(paramList);
1123 #ifdef HAVE_MUELU_MATLAB 1124 for (
size_t i = 0; i < paramLists.size(); i++) {
1125 std::vector<std::string> customVars;
1127 for(Teuchos::ParameterList::ConstIterator it = paramLists[i].begin(); it != paramLists[i].end(); it++) {
1128 std::string paramName = paramLists[i].name(it);
1131 customVars.push_back(paramName);
1135 for (
size_t j = 0; j < customVars.size(); j++)
1136 paramLists[i].
remove(customVars[j],
false);
1140 const int maxDepth = 0;
1141 for (
size_t i = 0; i < paramLists.size(); i++) {
1144 paramLists[i].validateParameters(validList, maxDepth);
1146 }
catch (
const Teuchos::Exceptions::InvalidParameterName& e) {
1147 std::string eString = e.what();
1150 size_t nameStart = eString.find_first_of(
'"') + 1;
1151 size_t nameEnd = eString.find_first_of(
'"', nameStart);
1152 std::string name = eString.substr(nameStart, nameEnd - nameStart);
1154 int bestScore = 100;
1155 std::string bestName =
"";
1156 for (ParameterList::ConstIterator it = validList.begin(); it != validList.end(); it++) {
1157 const std::string& pName = validList.name(it);
1159 int score =
LevenshteinDistance(name.c_str(), name.length(), pName.c_str(), pName.length());
1161 if (score < bestScore) {
1166 if (bestScore < 10 && bestName !=
"") {
1167 TEUCHOS_TEST_FOR_EXCEPTION(
true, Teuchos::Exceptions::InvalidParameterName,
1168 eString <<
"The parameter name \"" + name +
"\" is not valid. Did you mean \"" + bestName <<
"\"?\n");
1171 TEUCHOS_TEST_FOR_EXCEPTION(
true, Teuchos::Exceptions::InvalidParameterName,
1172 eString <<
"The parameter name \"" + name +
"\" is not valid.\n");
1181 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1185 ParameterList paramList = constParamList;
1192 if (paramList.isSublist(
"Matrix")) {
1193 blockSize_ = paramList.sublist(
"Matrix").get<
int>(
"number of equations", MasterList::getDefault<int>(
"number of equations"));
1194 dofOffset_ = paramList.sublist(
"Matrix").get<GlobalOrdinal>(
"DOF offset", 0);
1210 if (paramList.isSublist(
"Factories"))
1211 this->
BuildFactoryMap(paramList.sublist(
"Factories"), factoryMap, factoryMap, factoryManagers);
1225 if (paramList.isSublist(
"Hierarchy")) {
1226 ParameterList hieraList = paramList.sublist(
"Hierarchy");
1229 if (hieraList.isParameter(
"max levels")) {
1231 hieraList.remove(
"max levels");
1234 if (hieraList.isParameter(
"coarse: max size")) {
1236 hieraList.remove(
"coarse: max size");
1239 if (hieraList.isParameter(
"repartition: rebalance P and R")) {
1240 this->
doPRrebalance_ = hieraList.get<
bool>(
"repartition: rebalance P and R");
1241 hieraList.remove(
"repartition: rebalance P and R");
1244 if (hieraList.isParameter(
"transpose: use implicit")) {
1246 hieraList.remove(
"transpose: use implicit");
1250 std::map<std::string,MsgType> verbMap;
1252 verbMap[
"Errors"] =
Errors;
1269 verbMap[
"Debug"] =
Debug;
1270 verbMap[
"Test"] =
Test;
1272 verbMap[
"None"] =
None;
1273 verbMap[
"Low"] =
Low;
1274 verbMap[
"Medium"] =
Medium;
1275 verbMap[
"High"] =
High;
1277 if (hieraList.isParameter(
"verbosity")) {
1278 std::string vl = hieraList.get<std::string>(
"verbosity");
1279 hieraList.remove(
"verbosity");
1281 if (verbMap.find(vl) != verbMap.end())
1284 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::ParameterListInterpreter():: invalid verbosity level");
1287 if (hieraList.isParameter(
"dependencyOutputLevel"))
1291 if (hieraList.isParameter(
"reuse"))
1294 if (hieraList.isSublist(
"DataToWrite")) {
1297 ParameterList foo = hieraList.sublist(
"DataToWrite");
1298 std::string dataName =
"Matrices";
1299 if (foo.isParameter(dataName))
1300 this->
matricesToPrint_ = Teuchos::getArrayFromStringParameter<int>(foo,dataName);
1301 dataName =
"Prolongators";
1302 if (foo.isParameter(dataName))
1304 dataName =
"Restrictors";
1305 if (foo.isParameter(dataName))
1310 for (ParameterList::ConstIterator param = hieraList.begin(); param != hieraList.end(); ++param) {
1311 const std::string & paramName = hieraList.name(param);
1313 if (paramName !=
"DataToWrite" && hieraList.isSublist(paramName)) {
1314 ParameterList levelList = hieraList.sublist(paramName);
1316 int startLevel = 0;
if(levelList.isParameter(
"startLevel")) { startLevel = levelList.get<
int>(
"startLevel"); levelList.remove(
"startLevel"); }
1317 int numDesiredLevel = 1;
if(levelList.isParameter(
"numDesiredLevel")) { numDesiredLevel = levelList.get<
int>(
"numDesiredLevel"); levelList.remove(
"numDesiredLevel"); }
1330 BuildFactoryMap(levelList, factoryMap, levelFactoryMap, factoryManagers);
1332 RCP<FactoryManagerBase> m = rcp(
new FactoryManager(levelFactoryMap));
1334 if (startLevel >= 0)
1337 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::ParameterListInterpreter():: invalid level id");
1356 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1359 for (ParameterList::ConstIterator param = paramList.begin(); param != paramList.end(); ++param) {
1360 const std::string & paramName = paramList.name(param);
1361 const Teuchos::ParameterEntry & paramValue = paramList.entry(param);
1368 if (paramValue.isList()) {
1369 ParameterList paramList1 = Teuchos::getValue<ParameterList>(paramValue);
1370 if (paramList1.isParameter(
"factory")) {
1371 factoryMapOut[paramName] =
factFact_->BuildFactory(paramValue, factoryMapIn, factoryManagers);
1373 }
else if (paramList1.isParameter(
"group")) {
1374 std::string groupType = paramList1.get<std::string>(
"group");
1375 TEUCHOS_TEST_FOR_EXCEPTION(groupType!=
"FactoryManager",
Exceptions::RuntimeError,
"group must be of type \"FactoryManager\".");
1377 ParameterList groupList = paramList1;
1378 groupList.remove(
"group");
1381 BuildFactoryMap(groupList, factoryMapIn, groupFactoryMap, factoryManagers);
1385 RCP<FactoryManagerBase> m = rcp(
new FactoryManager(groupFactoryMap));
1387 factoryManagers[paramName] = m;
1390 this->
GetOStream(
Warnings0) <<
"Could not interpret parameter list " << paramList1 << std::endl;
1391 TEUCHOS_TEST_FOR_EXCEPTION(
false,
Exceptions::RuntimeError,
"XML Parameter list must either be of type \"factory\" or of type \"group\".");
1395 factoryMapOut[paramName] =
factFact_->BuildFactory(paramValue, factoryMapIn, factoryManagers);
1403 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1406 Matrix& A =
dynamic_cast<Matrix&
>(Op);
1409 <<
"instead of " << A.GetFixedBlockSize() <<
" (provided matrix)." << std::endl;
1413 }
catch (std::bad_cast& e) {
1414 this->
GetOStream(
Warnings0) <<
"Skipping setting block size as the operator is not a matrix" << std::endl;
1418 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1424 static bool compare(
const ParameterList& list1,
const ParameterList& list2) {
1427 for (ParameterList::ConstIterator it = list1.begin(); it != list1.end(); it++) {
1428 const std::string& name = it->first;
1429 const Teuchos::ParameterEntry& entry1 = it->second;
1431 const Teuchos::ParameterEntry *entry2 = list2.getEntryPtr(name);
1434 if (entry1.isList() && entry2->isList()) {
1435 compare(Teuchos::getValue<ParameterList>(entry1), Teuchos::getValue<ParameterList>(*entry2));
1438 if (entry1.getAny(
false) != entry2->getAny(
false))
1445 static inline bool areSame(
const ParameterList& list1,
const ParameterList& list2) {
1451 #define MUELU_PARAMETERLISTINTERPRETER_SHORT Important warning messages (one line)
Generic Smoother Factory for generating the smoothers of the MG hierarchy.
This class specifies the default factory that should generate some data on a Level if the data does n...
Teuchos::Array< int > matricesToPrint_
void SetupHierarchy(Hierarchy &H) const
Call the SetupHierarchy routine from the HiearchyManager object.
High level timing information (use Teuchos::TimeMonitor::summarize() to print)
#define MUELU_KOKKOS_FACTORY_NO_DECL(varName, oldFactory, newFactory)
Factory for generating coarse level map. Used by TentativePFactory.
bool changedPRrebalance_
Easy interpreter stuff.
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
void SetVerbLevel(const VerbLevel verbLevel)
Set the verbosity level of this object.
void UpdateFactoryManager(Teuchos::ParameterList ¶mList, const Teuchos::ParameterList &defaultList, FactoryManager &manager, int levelID, std::vector< keep_pair > &keeps) const
Factory that can generate other factories from.
int LevenshteinDistance(const char *s, size_t len_s, const char *t, size_t len_t)
Print external lib objects.
Class that encapsulates external library smoothers.
static void DisableMultipleCheckGlobally()
#define MUELU_TEST_AND_SET_VAR(paramList, paramName, paramType, varName)
Factory for building permutation matrix that can be be used to shuffle data (matrices, vectors) among processes.
Print additional debugging information.
void AddFactoryManager(int startLevel, int numDesiredLevel, RCP< FactoryManagerBase > manager)
One-liner description of what is happening.
void SetCycle(CycleType Cycle)
Supports VCYCLE and WCYCLE types.
Namespace for MueLu classes and methods.
#define MUELU_KOKKOS_FACTORY(varName, oldFactory, newFactory)
Interface to Zoltan library.
bool IsParamMuemexVariable(const std::string &name)
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Get factory associated with a particular data name.
std::map< std::string, RCP< FactoryManagerBase > > FactoryManagerMap
std::map< std::string, RCP< const FactoryBase > > FactoryMap
Print skeleton for the run, i.e. factory calls and used parameters.
Factory for building tentative prolongator.
#define TEST_MUTUALLY_EXCLUSIVE(arg1, arg2)
Class that encapsulates direct solvers. Autoselection of AmesosSmoother or Amesos2Smoother according ...
Factory for coarsening a graph with uncoupled aggregation.
virtual void SetupOperator(Operator &A) const
Setup Operator object.
Prolongator factory performing semi-coarsening.
Factory for building restriction operators using a prolongator factory.
int blockSize_
block size of matrix (fixed block size)
Important warning messages (more verbose)
Print statistics that do not involve significant additional computation.
Teuchos::RCP< FactoryFactory > factFact_
Internal factory for factories.
#define MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, paramName, paramType, listWrite)
static bool compare(const ParameterList &list1, const ParameterList &list2)
static CycleType GetDefaultCycle()
Detailed timing information (use Teuchos::TimeMonitor::summarize() to print)
Factory for interacting with Matlab.
Factory for interacting with Matlab.
Factory for building line detection information.
bool changedImplicitTranspose_
void SetFactoryParameterList(const Teuchos::ParameterList ¶mList)
Factory interpreter stuff.
std::pair< std::string, const FactoryBase * > keep_pair
Factory to export aggregation info or visualize aggregates using VTK.
Interface to Zoltan2 library.
Prolongator factory which allows switching between two different prolongator strategies.
By default, enabled timers appears in the teuchos time monitor summary. Use this option if you do not...
RCP< FactoryManagerBase > GetFactoryManager(int levelID) const
Factory for building the constraint operator.
ParameterListInterpreter(Teuchos::ParameterList ¶mList, Teuchos::RCP< const Teuchos::Comm< int > > comm=Teuchos::null, Teuchos::RCP< FactoryFactory > factFact=Teuchos::null)
Constructor that accepts a user-provided ParameterList.
Applies permutation to grid transfer operators.
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Set Factory.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Timers that are enabled (using Timings0/Timings1) will be printed during the execution.
GlobalOrdinal dofOffset_
global offset variable describing offset of DOFs in operator
Record timing information level by level. Must be used in combinaison with Timings0/Timings1.
Factory for creating a graph base on a given matrix.
Teuchos::Array< int > prolongatorsToPrint_
void BuildFactoryMap(const Teuchos::ParameterList ¶mList, const FactoryMap &factoryMapIn, FactoryMap &factoryMapOut, FactoryManagerMap &factoryManagers) const
Class that encapsulates Matlab smoothers.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameter list for Parameter list interpreter.
Class for transferring coordinates from a finer level to a coarser one.
Factory for building nonzero patterns for energy minimization.
static Teuchos::RCP< Teuchos::ParameterList > GetProblemSpecificList(std::string const &problemType)
Return default parameter settings for the specified problem type.
Class for transferring coordinates from a finer level to a coarser one.
Factory for building restriction operators.
Factory for building Energy Minimization prolongators.
static bool areSame(const ParameterList &list1, const ParameterList &list2)
Helper functions to compare two paramter lists.
std::map< int, std::vector< keep_pair > > keep_
#define TEST_MUTUALLY_EXCLUSIVE_S(arg1, arg2)
void Validate(const Teuchos::ParameterList ¶mList) const
#define MUELU_TEST_PARAM_2LIST(paramList, defaultList, paramName, paramType, cmpValue)
Print class parameters (more parameters, more verbose)
Factory for building coarse matrices.
Exception throws to report errors in the internal logical of the program.
Factory for building filtered matrices using filtered graphs.
std::pair< std::string, const FactoryBase * > keep_pair
Description of what is happening (more verbose)
Factory for building coarse matrices.
Factory for building Petrov-Galerkin Smoothed Aggregation prolongators.
Factory for building Smoothed Aggregation prolongators.Input/output of SaPFactory
Xpetra::global_size_t maxCoarseSize_
Factory for building uncoupled aggregates.
static Teuchos::RCP< const Teuchos::ParameterList > List()
Return a "master" list of all valid parameters and their default values.
#define MUELU_SET_VAR_2LIST(paramList, defaultList, paramName, paramType, varName)
Teuchos::Array< int > restrictorsToPrint_
void SetEasyParameterList(const Teuchos::ParameterList ¶mList)
Provides methods to build a multigrid hierarchy and apply multigrid cycles.
Factory for generating nullspace.
long ExtractNonSerializableData(const Teuchos::ParameterList &inList, Teuchos::ParameterList &serialList, Teuchos::ParameterList &nonSerialList)
virtual void SetupHierarchy(Hierarchy &H) const
Setup Hierarchy object.
Exception throws to report invalid user entry.
static const RCP< const NoFactory > getRCP()
Static Get() functions.
CycleType Cycle_
multigrid cycle type (V-cycle or W-cycle)