46 #ifndef MUELU_MLPARAMETERLISTINTERPRETER_DEF_HPP 47 #define MUELU_MLPARAMETERLISTINTERPRETER_DEF_HPP 49 #include <Teuchos_XMLParameterListHelpers.hpp> 52 #if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) 53 #include <ml_ValidateParameters.h> 56 #include <Xpetra_Matrix.hpp> 57 #include <Xpetra_MultiVector.hpp> 58 #include <Xpetra_MultiVectorFactory.hpp> 59 #include <Xpetra_Operator.hpp> 64 #include "MueLu_Hierarchy.hpp" 65 #include "MueLu_FactoryManager.hpp" 67 #include "MueLu_TentativePFactory.hpp" 68 #include "MueLu_SaPFactory.hpp" 69 #include "MueLu_PgPFactory.hpp" 70 #include "MueLu_AmalgamationFactory.hpp" 71 #include "MueLu_TransPFactory.hpp" 72 #include "MueLu_GenericRFactory.hpp" 73 #include "MueLu_SmootherPrototype.hpp" 74 #include "MueLu_SmootherFactory.hpp" 75 #include "MueLu_TrilinosSmoother.hpp" 77 #include "MueLu_DirectSolver.hpp" 78 #include "MueLu_HierarchyUtils.hpp" 79 #include "MueLu_RAPFactory.hpp" 80 #include "MueLu_CoalesceDropFactory.hpp" 81 #include "MueLu_CoupledAggregationFactory.hpp" 82 #include "MueLu_UncoupledAggregationFactory.hpp" 83 #include "MueLu_NullspaceFactory.hpp" 86 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 87 #include "MueLu_IsorropiaInterface.hpp" 88 #include "MueLu_RepartitionHeuristicFactory.hpp" 89 #include "MueLu_RepartitionFactory.hpp" 90 #include "MueLu_RebalanceTransferFactory.hpp" 91 #include "MueLu_RepartitionInterface.hpp" 92 #include "MueLu_RebalanceAcFactory.hpp" 102 #define MUELU_READ_PARAM(paramList, paramStr, varType, defaultValue, varName) \ 103 varType varName = defaultValue; if (paramList.isParameter(paramStr)) varName = paramList.get<varType>(paramStr); 106 #define MUELU_COPY_PARAM(paramList, paramStr, varType, defaultValue, outParamList, outParamStr) \ 107 if (paramList.isParameter(paramStr)) \ 108 outParamList.set(outParamStr, paramList.get<varType>(paramStr)); \ 109 else outParamList.set(outParamStr, static_cast<varType>(defaultValue)); \ 113 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
114 MLParameterListInterpreter<Scalar, LocalOrdinal, GlobalOrdinal, Node>::MLParameterListInterpreter(Teuchos::ParameterList & paramList, Teuchos::RCP<
const Teuchos::Comm<int> > comm, std::vector<RCP<FactoryBase> > factoryList) : nullspace_(NULL), xcoord_(NULL), ycoord_(NULL), zcoord_(NULL),TransferFacts_(factoryList), blksize_(1) {
116 if (paramList.isParameter(
"xml parameter file")){
117 std::string filename = paramList.get(
"xml parameter file",
"");
118 if (filename.length() != 0) {
120 Teuchos::ParameterList paramList2 = paramList;
121 Teuchos::updateParametersFromXmlFileAndBroadcast(filename, Teuchos::Ptr<Teuchos::ParameterList>(¶mList2),*comm);
122 paramList2.remove(
"xml parameter file");
132 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
134 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::getParametersFromXmlFile(xmlFileName);
138 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
140 Teuchos::ParameterList paramList = paramList_in;
153 MUELU_READ_PARAM(paramList,
"aggregation: type", std::string,
"Uncoupled", agg_type);
155 MUELU_READ_PARAM(paramList,
"aggregation: damping factor",
double, (
double)4/(
double)3, agg_damping);
157 MUELU_READ_PARAM(paramList,
"aggregation: nodes per aggregate",
int, 1, minPerAgg);
158 MUELU_READ_PARAM(paramList,
"aggregation: keep Dirichlet bcs",
bool,
false, bKeepDirichletBcs);
159 MUELU_READ_PARAM(paramList,
"aggregation: max neighbours already aggregated",
int, 0, maxNbrAlreadySelected);
160 MUELU_READ_PARAM(paramList,
"aggregation: aux: enable",
bool,
false, agg_use_aux);
161 MUELU_READ_PARAM(paramList,
"aggregation: aux: threshold",
double,
false, agg_aux_thresh);
163 MUELU_READ_PARAM(paramList,
"null space: type", std::string,
"default vectors", nullspaceType);
164 MUELU_READ_PARAM(paramList,
"null space: dimension",
int, -1, nullspaceDim);
165 MUELU_READ_PARAM(paramList,
"null space: vectors",
double*, NULL, nullspaceVec);
167 MUELU_READ_PARAM(paramList,
"energy minimization: enable",
bool,
false, bEnergyMinimization);
169 MUELU_READ_PARAM(paramList,
"RAP: fix diagonal",
bool,
false, bFixDiagonal);
182 ParameterList paramListWithSubList;
184 paramList = paramListWithSubList;
191 bool validate = paramList.get(
"ML validate parameter list",
true);
194 #if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) 196 int depth = paramList.get(
"ML validate depth", 5);
198 "ERROR: ML's Teuchos::ParameterList contains incorrect parameter!");
201 this->GetOStream(
Warnings0) <<
"Warning: MueLu_ENABLE_ML=OFF. The parameter list cannot be validated." << std::endl;
202 paramList.set(
"ML validate parameter list",
false);
204 #endif // HAVE_MUELU_ML 210 blksize_ = nDofsPerNode;
216 if (verbosityLevel == 0) eVerbLevel =
None;
217 if (verbosityLevel >= 1) eVerbLevel =
Low;
218 if (verbosityLevel >= 5) eVerbLevel =
Medium;
219 if (verbosityLevel >= 10) eVerbLevel =
High;
220 if (verbosityLevel >= 11) eVerbLevel =
Extreme;
221 if (verbosityLevel >= 42) eVerbLevel =
Test;
222 this->verbosity_ = eVerbLevel;
226 "MueLu::MLParameterListInterpreter::SetParameterList(): parameter \"aggregation: type\": only 'Uncoupled' or 'Coupled' aggregation is supported.");
231 dropFact->SetParameter(
"aggregation: drop scheme",Teuchos::ParameterEntry(std::string(
"distance laplacian")));
232 dropFact->SetParameter(
"aggregation: drop tol",Teuchos::ParameterEntry(agg_aux_thresh));
235 RCP<FactoryBase> AggFact = Teuchos::null;
236 if (agg_type ==
"Uncoupled") {
239 MyUncoupledAggFact->SetFactory(
"Graph", dropFact);
240 MyUncoupledAggFact->SetFactory(
"DofsPerNode", dropFact);
241 MyUncoupledAggFact->SetParameter(
"aggregation: preserve Dirichlet points", Teuchos::ParameterEntry(bKeepDirichletBcs));
242 MyUncoupledAggFact->SetParameter(
"aggregation: ordering", Teuchos::ParameterEntry(std::string(
"natural")));
243 MyUncoupledAggFact->SetParameter(
"aggregation: max selected neighbors", Teuchos::ParameterEntry(maxNbrAlreadySelected));
244 MyUncoupledAggFact->SetParameter(
"aggregation: min agg size", Teuchos::ParameterEntry(minPerAgg));
246 AggFact = MyUncoupledAggFact;
250 CoupledAggFact2->SetMinNodesPerAggregate(minPerAgg);
251 CoupledAggFact2->SetMaxNeighAlreadySelected(maxNbrAlreadySelected);
252 CoupledAggFact2->SetOrdering(
"natural");
253 CoupledAggFact2->SetPhase3AggCreation(0.5);
254 CoupledAggFact2->SetFactory(
"Graph", dropFact);
255 CoupledAggFact2->SetFactory(
"DofsPerNode", dropFact);
256 AggFact = CoupledAggFact2;
258 if (verbosityLevel > 3) {
259 std::ostringstream oss;
260 oss <<
"========================= Aggregate option summary =========================" << std::endl;
261 oss <<
"min Nodes per aggregate : " << minPerAgg << std::endl;
262 oss <<
"min # of root nbrs already aggregated : " << maxNbrAlreadySelected << std::endl;
263 oss <<
"aggregate ordering : natural" << std::endl;
264 oss <<
"=============================================================================" << std::endl;
265 this->GetOStream(
Runtime1) << oss.str();
271 if (agg_damping == 0.0 && bEnergyMinimization ==
false) {
275 }
else if (agg_damping != 0.0 && bEnergyMinimization ==
false) {
277 RCP<SaPFactory> SaPFact = rcp(
new SaPFactory() );
278 SaPFact->SetParameter(
"sa: damping factor", ParameterEntry(agg_damping));
281 }
else if (bEnergyMinimization ==
true) {
287 RCP<RAPFactory> AcFact = rcp(
new RAPFactory() );
288 AcFact->SetParameter(
"RepairMainDiagonal", Teuchos::ParameterEntry(bFixDiagonal));
289 for (
size_t i = 0; i<TransferFacts_.size(); i++) {
290 AcFact->AddTransferFactory(TransferFacts_[i]);
296 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 297 Teuchos::RCP<Factory> RebalancedPFact = Teuchos::null;
298 Teuchos::RCP<Factory> RebalancedRFact = Teuchos::null;
299 Teuchos::RCP<Factory> RepartitionFact = Teuchos::null;
300 Teuchos::RCP<RebalanceAcFactory> RebalancedAFact = Teuchos::null;
303 if (bDoRepartition == 1) {
306 RFact->SetFactory(
"P", PFact);
308 AcFact->SetFactory(
"P", PFact);
309 AcFact->SetFactory(
"R", RFact);
313 rebAmalgFact->SetFactory(
"A", AcFact);
315 MUELU_READ_PARAM(paramList,
"repartition: max min ratio",
double, 1.3, maxminratio);
316 MUELU_READ_PARAM(paramList,
"repartition: min per proc",
int, 512, minperproc);
321 Teuchos::ParameterList paramListRepFact;
322 paramListRepFact.set(
"repartition: min rows per proc", minperproc);
323 paramListRepFact.set(
"repartition: max imbalance", maxminratio);
324 RepartitionHeuristicFact->SetParameterList(paramListRepFact);
326 RepartitionHeuristicFact->SetFactory(
"A", AcFact);
330 isoInterface->SetFactory(
"A", AcFact);
331 isoInterface->SetFactory(
"number of partitions", RepartitionHeuristicFact);
332 isoInterface->SetFactory(
"UnAmalgamationInfo", rebAmalgFact);
336 repInterface->SetFactory(
"A", AcFact);
337 repInterface->SetFactory(
"number of partitions", RepartitionHeuristicFact);
338 repInterface->SetFactory(
"AmalgamatedPartition", isoInterface);
343 RepartitionFact->SetFactory(
"A", AcFact);
344 RepartitionFact->SetFactory(
"number of partitions", RepartitionHeuristicFact);
345 RepartitionFact->SetFactory(
"Partition", repInterface);
349 RebalancedPFact->SetParameter(
"type", Teuchos::ParameterEntry(std::string(
"Interpolation")));
350 RebalancedPFact->SetFactory(
"P", PFact);
351 RebalancedPFact->SetFactory(
"Nullspace", PtentFact);
352 RebalancedPFact->SetFactory(
"Importer", RepartitionFact);
355 RebalancedRFact->SetParameter(
"type", Teuchos::ParameterEntry(std::string(
"Restriction")));
356 RebalancedRFact->SetFactory(
"R", RFact);
357 RebalancedRFact->SetFactory(
"Importer", RepartitionFact);
361 RebalancedAFact->SetFactory(
"A", AcFact);
363 #else // #ifdef HAVE_MUELU_ISORROPIA 377 if (nullspaceType !=
"default vectors") {
378 TEUCHOS_TEST_FOR_EXCEPTION(nullspaceType !=
"pre-computed",
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no valid nullspace (no pre-computed null space). error.");
379 TEUCHOS_TEST_FOR_EXCEPTION(nullspaceDim == -1,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no valid nullspace (nullspace dim == -1). error.");
380 TEUCHOS_TEST_FOR_EXCEPTION(nullspaceVec == NULL,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no valid nullspace (nullspace == NULL). You have to provide a valid fine-level nullspace in \'null space: vectors\'");
382 nullspaceDim_ = nullspaceDim;
383 nullspace_ = nullspaceVec;
386 Teuchos::RCP<NullspaceFactory> nspFact = Teuchos::rcp(
new NullspaceFactory(
"Nullspace"));
387 nspFact->SetFactory(
"Nullspace", PtentFact);
402 this->numDesiredLevel_ = maxLevels;
403 this->maxCoarseSize_ = maxCoarseSize;
408 ParameterList& coarseList = paramList.sublist(
"coarse: list");
410 if (!coarseList.isParameter(
"smoother: type"))
411 coarseList.set(
"smoother: type",
"Amesos-KLU");
412 RCP<SmootherFactory> coarseFact = GetSmootherFactory(coarseList, Teuchos::null);
423 for (
int levelID=0; levelID < maxLevels; levelID++) {
439 ParameterList levelSmootherParam =
GetMLSubList(paramList,
"smoother", levelID);
444 RCP<SmootherFactory> smootherFact = GetSmootherFactory(levelSmootherParam, Teuchos::null);
446 manager->SetFactory(
"Smoother", smootherFact);
453 manager->SetFactory(
"CoarseSolver", coarseFact);
454 manager->SetFactory(
"Graph", dropFact);
455 manager->SetFactory(
"Aggregates", AggFact);
456 manager->SetFactory(
"DofsPerNode", dropFact);
457 manager->SetFactory(
"Ptent", PtentFact);
459 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 460 if (bDoRepartition == 1) {
461 manager->SetFactory(
"A", RebalancedAFact);
462 manager->SetFactory(
"P", RebalancedPFact);
463 manager->SetFactory(
"R", RebalancedRFact);
464 manager->SetFactory(
"Nullspace", RebalancedPFact);
465 manager->SetFactory(
"Importer", RepartitionFact);
467 #endif // #ifdef HAVE_MUELU_ISORROPIA 468 manager->SetFactory(
"Nullspace", nspFact);
469 manager->SetFactory(
"A", AcFact);
470 manager->SetFactory(
"P", PFact);
471 manager->SetFactory(
"R", RFact);
472 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 476 this->AddFactoryManager(levelID, 1, manager);
481 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
485 if (nullspace_ != NULL) {
486 RCP<Level> fineLevel = H.
GetLevel(0);
487 RCP<Operator> Op = fineLevel->Get<RCP<Operator> >(
"A");
488 RCP<Matrix> A = rcp_dynamic_cast<Matrix>(Op);
490 const RCP<const Map> rowMap = fineLevel->Get< RCP<Matrix> >(
"A")->getRowMap();
491 RCP<MultiVector> nullspace = MultiVectorFactory::Build(rowMap, nullspaceDim_,
true);
493 for (
size_t i=0; i < Teuchos::as<size_t>(nullspaceDim_); i++) {
494 Teuchos::ArrayRCP<Scalar> nullspacei = nullspace->getDataNonConst(i);
495 const size_t myLength = nullspace->getLocalLength();
497 for (
size_t j = 0; j < myLength; j++) {
498 nullspacei[j] = nullspace_[i*myLength + j];
502 fineLevel->Set(
"Nullspace", nullspace);
507 size_t num_coords = 0;
508 double * coordPTR[3];
510 coordPTR[0] = xcoord_;
513 coordPTR[1] = ycoord_;
516 coordPTR[2] = zcoord_;
522 Teuchos::RCP<Level> fineLevel = H.
GetLevel(0);
523 Teuchos::RCP<Operator> Op = fineLevel->Get<RCP<Operator> >(
"A");
524 Teuchos::RCP<Matrix> A = rcp_dynamic_cast<Matrix>(Op);
526 const Teuchos::RCP<const Map> rowMap = fineLevel->Get< RCP<Matrix> >(
"A")->getRowMap();
527 Teuchos::RCP<MultiVector> coordinates = MultiVectorFactory::Build(rowMap, num_coords,
true);
529 for (
size_t i=0; i < num_coords; i++) {
530 Teuchos::ArrayRCP<Scalar> coordsi = coordinates->getDataNonConst(i);
531 const size_t myLength = coordinates->getLocalLength();
532 for (
size_t j = 0; j < myLength; j++) {
533 coordsi[j] = coordPTR[0][j];
536 fineLevel->Set(
"Coordinates",coordinates);
544 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
545 RCP<MueLu::SmootherFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
548 const RCP<FactoryBase> & AFact)
550 std::string type =
"symmetric Gauss-Seidel";
572 if (paramList.isParameter(
"smoother: type")) type = paramList.get<std::string>(
"smoother: type");
573 TEUCHOS_TEST_FOR_EXCEPTION(type.empty(),
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no \"smoother: type\" in the smoother parameter list" << std::endl << paramList);
579 RCP<SmootherPrototype> smooProto;
580 std::string ifpackType;
581 Teuchos::ParameterList smootherParamList;
583 if (type ==
"Jacobi" || type ==
"Gauss-Seidel" || type ==
"symmetric Gauss-Seidel") {
584 if (type ==
"symmetric Gauss-Seidel") type =
"Symmetric Gauss-Seidel";
586 ifpackType =
"RELAXATION";
587 smootherParamList.set(
"relaxation: type", type);
589 MUELU_COPY_PARAM(paramList,
"smoother: sweeps",
int, 2, smootherParamList,
"relaxation: sweeps");
590 MUELU_COPY_PARAM(paramList,
"smoother: damping factor",
double, 1.0, smootherParamList,
"relaxation: damping factor");
593 smooProto->SetFactory(
"A", AFact);
595 }
else if (type ==
"Chebyshev" || type ==
"MLS") {
597 ifpackType =
"CHEBYSHEV";
599 MUELU_COPY_PARAM(paramList,
"smoother: sweeps",
int, 2, smootherParamList,
"chebyshev: degree");
600 if (paramList.isParameter(
"smoother: MLS alpha")) {
601 MUELU_COPY_PARAM(paramList,
"smoother: MLS alpha",
double, 20, smootherParamList,
"chebyshev: ratio eigenvalue");
603 MUELU_COPY_PARAM(paramList,
"smoother: Chebyshev alpha",
double, 20, smootherParamList,
"chebyshev: ratio eigenvalue");
608 smooProto->SetFactory(
"A", AFact);
610 }
else if (type ==
"IFPACK") {
612 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) 613 ifpackType = paramList.get<std::string>(
"smoother: ifpack type");
615 if (ifpackType ==
"ILU") {
618 if (paramList.isParameter(
"smoother: ifpack level-of-fill"))
619 smootherParamList.set(
"fact: level-of-fill", Teuchos::as<int>(paramList.get<
double>(
"smoother: ifpack level-of-fill")));
620 else smootherParamList.set(
"fact: level-of-fill", as<int>(0));
622 MUELU_COPY_PARAM(paramList,
"smoother: ifpack overlap",
int, 2, smootherParamList,
"partitioner: overlap");
626 MueLu::GetIfpackSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node> (ifpackType,
628 paramList.get<
int> (
"smoother: ifpack overlap"));
629 smooProto->SetFactory(
"A", AFact);
631 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown ML smoother type " + type +
" (IFPACK) not supported by MueLu. Only ILU is supported.");
634 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: MueLu compiled without Ifpack support");
637 }
else if (type.length() > strlen(
"Amesos") && type.substr(0, strlen(
"Amesos")) ==
"Amesos") {
638 std::string solverType = type.substr(strlen(
"Amesos")+1);
642 const int validatorSize = 5;
643 std::string validator[validatorSize] = {
"Superlu",
"Superludist",
"KLU",
"UMFPACK"};
644 for (
int i=0; i < validatorSize; i++) {
if (validator[i] == solverType) valid =
true; }
645 TEUCHOS_TEST_FOR_EXCEPTION(!valid,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown smoother type. '" << type <<
"' not supported.");
648 std::transform(solverType.begin()+1, solverType.end(), solverType.begin()+1, ::tolower);
650 smooProto = Teuchos::rcp(
new DirectSolver(solverType, Teuchos::ParameterList()) );
651 smooProto->SetFactory(
"A", AFact);
655 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown smoother type. '" << type <<
"' not supported by MueLu.");
658 TEUCHOS_TEST_FOR_EXCEPTION(smooProto == Teuchos::null,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no smoother prototype. fatal error.");
667 MUELU_READ_PARAM(paramList,
"smoother: pre or post", std::string,
"both", preOrPost);
668 if (preOrPost ==
"both") {
669 SmooFact->SetSmootherPrototypes(smooProto, smooProto);
670 }
else if (preOrPost ==
"pre") {
671 SmooFact->SetSmootherPrototypes(smooProto, Teuchos::null);
672 }
else if (preOrPost ==
"post") {
673 SmooFact->SetSmootherPrototypes(Teuchos::null, smooProto);
679 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
682 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::rcp_dynamic_cast<TwoLevelFactoryBase>(factory) == Teuchos::null,
Exceptions::BadCast,
"Transfer factory is not derived from TwoLevelFactoryBase. Since transfer factories will be handled by the RAPFactory they have to be derived from TwoLevelFactoryBase!");
683 TransferFacts_.push_back(factory);
686 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
688 return TransferFacts_.size();
691 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
694 Matrix& A =
dynamic_cast<Matrix&
>(Op);
695 if (A.GetFixedBlockSize() != blksize_)
696 this->GetOStream(
Warnings0) <<
"Setting matrix block size to " << blksize_ <<
" (value of the parameter in the list) " 697 <<
"instead of " << A.GetFixedBlockSize() <<
" (provided matrix)." << std::endl;
699 A.SetFixedBlockSize(blksize_);
701 }
catch (std::bad_cast& e) {
702 this->GetOStream(
Warnings0) <<
"Skipping setting block size as the operator is not a matrix" << std::endl;
708 #define MUELU_MLPARAMETERLISTINTERPRETER_SHORT Important warning messages (one line)
Generic Smoother Factory for generating the smoothers of the MG hierarchy.
Exception indicating invalid cast attempted.
This class specifies the default factory that should generate some data on a Level if the data does n...
void MergeParameterList(const Teuchos::ParameterList &source, Teuchos::ParameterList &dest, bool overWrite)
: merge two parameter lists
virtual void SetupOperator(Operator &Op) const
Setup Operator object.
MLParameterListInterpreter()
Constructor.
Factory for determing the number of partitions for rebalancing.
RCP< Level > & GetLevel(const int levelID=0)
Retrieve a certain level from hierarchy.
Class that encapsulates external library smoothers.
Interface to IsorropiaInterface to Isorropia allowing to access other rebalancing/repartitioning algo...
virtual void SetupHierarchy(Hierarchy &H) const
Setup Hierarchy object.
Factory for building permutation matrix that can be be used to shuffle data (matrices, vectors) among processes.
Namespace for MueLu classes and methods.
#define MUELU_READ_PARAM(paramList, paramStr, varType, defaultValue, varName)
const Teuchos::ParameterList & GetMLSubList(const Teuchos::ParameterList ¶mList, const std::string &type, int levelID)
Print skeleton for the run, i.e. factory calls and used parameters.
void AddTransferFactory(const RCP< FactoryBase > &factory)
Add transfer factory in the end of list of transfer factories for RAPFactory.
Factory for building tentative prolongator.
Class that encapsulates direct solvers. Autoselection of AmesosSmoother or Amesos2Smoother according ...
Factory for coarsening a graph with uncoupled aggregation.
virtual void SetupHierarchy(Hierarchy &H) const
Setup Hierarchy object.
Factory for building restriction operators using a prolongator factory.
void CreateSublists(const ParameterList &List, ParameterList &newList)
static RCP< SmootherFactory > GetSmootherFactory(const Teuchos::ParameterList ¶mList, const RCP< FactoryBase > &AFact=Teuchos::null)
Read smoother options and build the corresponding smoother factory.
Teuchos::RCP< Teuchos::ParameterList > ExtractSetOfParameters(const Teuchos::ParameterList ¶mList, const std::string &str)
AmalgamationFactory for subblocks of strided map based amalgamation data.
size_t NumTransferFactories() const
Returns number of transfer factories.
Applies permutation to grid transfer operators.
Factory for creating a graph base on a given matrix.
Helper class which transforms an "AmalgamatedPartition" array to an unamalgamated "Partition"...
void SetParameterList(const Teuchos::ParameterList ¶mList)
Factory for building restriction operators.
Factory for building coarse matrices.
Exception throws to report errors in the internal logical of the program.
Description of what is happening (more verbose)
Factory for building coarse matrices.
#define MUELU_COPY_PARAM(paramList, paramStr, varType, defaultValue, outParamList, outParamStr)
Factory for building Petrov-Galerkin Smoothed Aggregation prolongators.
Factory for building Smoothed Aggregation prolongators.Input/output of SaPFactory
Factory for building uncoupled aggregates.
Provides methods to build a multigrid hierarchy and apply multigrid cycles.
Factory for generating nullspace.