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_HierarchyHelpers.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_RepartitionFactory.hpp" 89 #include "MueLu_RebalanceTransferFactory.hpp" 90 #include "MueLu_RepartitionInterface.hpp" 91 #include "MueLu_RebalanceAcFactory.hpp" 101 #define MUELU_READ_PARAM(paramList, paramStr, varType, defaultValue, varName) \ 102 varType varName = defaultValue; if (paramList.isParameter(paramStr)) varName = paramList.get<varType>(paramStr); 105 #define MUELU_COPY_PARAM(paramList, paramStr, varType, defaultValue, outParamList, outParamStr) \ 106 if (paramList.isParameter(paramStr)) \ 107 outParamList.set(outParamStr, paramList.get<varType>(paramStr)); \ 108 else outParamList.set(outParamStr, static_cast<varType>(defaultValue)); \ 112 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
113 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) {
115 if(paramList.isParameter(
"xml parameter file")){
116 std::string filename = paramList.get(
"xml parameter file",
"");
117 if(filename.length()!=0) {
119 Teuchos::ParameterList paramList2 = paramList;
120 Teuchos::updateParametersFromXmlFileAndBroadcast(filename, Teuchos::Ptr<Teuchos::ParameterList>(¶mList2),*comm);
121 paramList2.remove(
"xml parameter file");
131 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
133 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::getParametersFromXmlFile(xmlFileName);
137 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
139 Teuchos::ParameterList paramList = paramList_in;
141 RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
154 MUELU_READ_PARAM(paramList,
"aggregation: type", std::string,
"Uncoupled", agg_type);
156 MUELU_READ_PARAM(paramList,
"aggregation: damping factor",
double, (
double)4/(
double)3, agg_damping);
158 MUELU_READ_PARAM(paramList,
"aggregation: nodes per aggregate",
int, 1, minPerAgg);
159 MUELU_READ_PARAM(paramList,
"aggregation: keep Dirichlet bcs",
bool,
false, bKeepDirichletBcs);
160 MUELU_READ_PARAM(paramList,
"aggregation: max neighbours already aggregated",
int, 0, maxNbrAlreadySelected);
161 MUELU_READ_PARAM(paramList,
"aggregation: aux: enable",
bool,
false, agg_use_aux);
162 MUELU_READ_PARAM(paramList,
"aggregation: aux: threshold",
double,
false, agg_aux_thresh);
164 MUELU_READ_PARAM(paramList,
"null space: type", std::string,
"default vectors", nullspaceType);
165 MUELU_READ_PARAM(paramList,
"null space: dimension",
int, -1, nullspaceDim);
166 MUELU_READ_PARAM(paramList,
"null space: vectors",
double*, NULL, nullspaceVec);
168 MUELU_READ_PARAM(paramList,
"energy minimization: enable",
bool,
false, bEnergyMinimization);
170 MUELU_READ_PARAM(paramList,
"RAP: fix diagonal",
bool,
false, bFixDiagonal);
186 ParameterList paramListWithSubList;
188 paramList = paramListWithSubList;
198 bool validate = paramList.get(
"ML validate parameter list",
true);
201 #if defined(HAVE_MUELU_ML) && defined(HAVE_MUELU_EPETRA) 203 int depth = paramList.get(
"ML validate depth", 5);
205 "ERROR: ML's Teuchos::ParameterList contains incorrect parameter!");
208 *out <<
"Warning: MueLu_ENABLE_ML=OFF. The parameter list cannot be validated." << std::endl;
209 paramList.set(
"ML validate parameter list",
false);
211 #endif // HAVE_MUELU_ML 229 if (verbosityLevel == 0) eVerbLevel =
None;
230 if (verbosityLevel >= 1) eVerbLevel =
Low;
231 if (verbosityLevel >= 5) eVerbLevel =
Medium;
232 if (verbosityLevel >= 10) eVerbLevel =
High;
233 if (verbosityLevel >= 11) eVerbLevel =
Extreme;
234 if (verbosityLevel >= 42) eVerbLevel =
Test;
238 TEUCHOS_TEST_FOR_EXCEPTION(agg_type !=
"Uncoupled" && agg_type !=
"Coupled",
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter::Setup(): parameter \"aggregation: type\": only 'Uncoupled' or 'Coupled' aggregation is supported.");
243 dropFact->SetParameter(
"aggregation: drop scheme",Teuchos::ParameterEntry(std::string(
"distance laplacian")));
244 dropFact->SetParameter(
"aggregation: drop tol",Teuchos::ParameterEntry(agg_aux_thresh));
247 RCP<FactoryBase> AggFact = Teuchos::null;
248 if(agg_type ==
"Uncoupled") {
251 MyUncoupledAggFact->SetFactory(
"Graph", dropFact);
252 MyUncoupledAggFact->SetFactory(
"DofsPerNode", dropFact);
253 MyUncoupledAggFact->SetParameter(
"aggregation: preserve Dirichlet points", Teuchos::ParameterEntry(bKeepDirichletBcs));
254 MyUncoupledAggFact->SetParameter(
"aggregation: ordering", Teuchos::ParameterEntry(std::string(
"natural")));
255 MyUncoupledAggFact->SetParameter(
"aggregation: max selected neighbors", Teuchos::ParameterEntry(maxNbrAlreadySelected));
256 MyUncoupledAggFact->SetParameter(
"aggregation: min agg size", Teuchos::ParameterEntry(minPerAgg));
258 AggFact = MyUncoupledAggFact;
262 CoupledAggFact2->SetMinNodesPerAggregate(minPerAgg);
263 CoupledAggFact2->SetMaxNeighAlreadySelected(maxNbrAlreadySelected);
264 CoupledAggFact2->SetOrdering(
"natural");
265 CoupledAggFact2->SetPhase3AggCreation(0.5);
266 CoupledAggFact2->SetFactory(
"Graph", dropFact);
267 CoupledAggFact2->SetFactory(
"DofsPerNode", dropFact);
268 AggFact = CoupledAggFact2;
270 if (verbosityLevel > 3) {
271 *out <<
"========================= Aggregate option summary =========================" << std::endl;
272 *out <<
"min Nodes per aggregate : " << minPerAgg << std::endl;
273 *out <<
"min # of root nbrs already aggregated : " << maxNbrAlreadySelected << std::endl;
274 *out <<
"aggregate ordering : natural" << std::endl;
275 *out <<
"=============================================================================" << std::endl;
281 if (agg_damping == 0.0 && bEnergyMinimization ==
false) {
285 }
else if (agg_damping != 0.0 && bEnergyMinimization ==
false) {
287 RCP<SaPFactory> SaPFact = rcp(
new SaPFactory() );
288 SaPFact->SetParameter(
"sa: damping factor", ParameterEntry(agg_damping));
291 }
else if (bEnergyMinimization ==
true) {
297 RCP<RAPFactory> AcFact = rcp(
new RAPFactory() );
298 AcFact->SetParameter(
"RepairMainDiagonal", Teuchos::ParameterEntry(bFixDiagonal));
306 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 307 Teuchos::RCP<Factory> RebalancedPFact = Teuchos::null;
308 Teuchos::RCP<Factory> RebalancedRFact = Teuchos::null;
309 Teuchos::RCP<Factory> RepartitionFact = Teuchos::null;
310 Teuchos::RCP<RebalanceAcFactory> RebalancedAFact = Teuchos::null;
313 if (bDoRepartition == 1) {
316 RFact->SetFactory(
"P", PFact);
318 AcFact->SetFactory(
"P", PFact);
319 AcFact->SetFactory(
"R", RFact);
323 rebAmalgFact->SetFactory(
"A", AcFact);
325 MUELU_READ_PARAM(paramList,
"repartition: max min ratio",
double, 1.3, maxminratio);
326 MUELU_READ_PARAM(paramList,
"repartition: min per proc",
int, 512, minperproc);
330 isoInterface->SetFactory(
"A", AcFact);
331 isoInterface->SetFactory(
"UnAmalgamationInfo", rebAmalgFact);
335 repInterface->SetFactory(
"A", AcFact);
336 repInterface->SetFactory(
"AmalgamatedPartition", isoInterface);
342 Teuchos::ParameterList paramListRepFact;
343 paramListRepFact.set(
"repartition: min rows per proc", minperproc);
344 paramListRepFact.set(
"repartition: max imbalance", maxminratio);
345 RepartitionFact->SetParameterList(paramListRepFact);
347 RepartitionFact->SetFactory(
"A", AcFact);
348 RepartitionFact->SetFactory(
"Partition", repInterface);
352 RebalancedPFact->SetParameter(
"type", Teuchos::ParameterEntry(std::string(
"Interpolation")));
353 RebalancedPFact->SetFactory(
"P", PFact);
354 RebalancedPFact->SetFactory(
"Nullspace", PtentFact);
355 RebalancedPFact->SetFactory(
"Importer", RepartitionFact);
358 RebalancedRFact->SetParameter(
"type", Teuchos::ParameterEntry(std::string(
"Restriction")));
359 RebalancedRFact->SetFactory(
"R", RFact);
360 RebalancedRFact->SetFactory(
"Importer", RepartitionFact);
364 RebalancedAFact->SetFactory(
"A", AcFact);
366 #else // #ifdef HAVE_MUELU_ISORROPIA 380 if (nullspaceType !=
"default vectors") {
381 TEUCHOS_TEST_FOR_EXCEPTION(nullspaceType !=
"pre-computed",
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no valid nullspace (no pre-computed null space). error.");
382 TEUCHOS_TEST_FOR_EXCEPTION(nullspaceDim == -1,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no valid nullspace (nullspace dim == -1). error.");
383 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\'");
389 Teuchos::RCP<NullspaceFactory> nspFact = Teuchos::rcp(
new NullspaceFactory(
"Nullspace"));
390 nspFact->SetFactory(
"Nullspace", PtentFact);
411 ParameterList& coarseList = paramList.sublist(
"coarse: list");
413 if(!coarseList.isParameter(
"smoother: type"))
414 coarseList.set(
"smoother: type",
"Amesos-KLU");
426 for (
int levelID=0; levelID < maxLevels; levelID++) {
442 ParameterList levelSmootherParam =
GetMLSubList(paramList,
"smoother", levelID);
447 RCP<SmootherFactory> smootherFact =
GetSmootherFactory(levelSmootherParam, Teuchos::null);
449 manager->SetFactory(
"Smoother", smootherFact);
456 manager->SetFactory(
"CoarseSolver", coarseFact);
457 manager->SetFactory(
"Graph", dropFact);
458 manager->SetFactory(
"Aggregates", AggFact);
459 manager->SetFactory(
"DofsPerNode", dropFact);
460 manager->SetFactory(
"Ptent", PtentFact);
462 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 463 if(bDoRepartition == 1) {
464 manager->SetFactory(
"A", RebalancedAFact);
465 manager->SetFactory(
"P", RebalancedPFact);
466 manager->SetFactory(
"R", RebalancedRFact);
467 manager->SetFactory(
"Nullspace", RebalancedPFact);
468 manager->SetFactory(
"Importer", RepartitionFact);
470 #endif // #ifdef HAVE_MUELU_ISORROPIA 471 manager->SetFactory(
"Nullspace", nspFact);
472 manager->SetFactory(
"A", AcFact);
473 manager->SetFactory(
"P", PFact);
474 manager->SetFactory(
"R", RFact);
475 #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) 484 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
489 RCP<Level> fineLevel = H.
GetLevel(0);
490 RCP<Operator> Op = fineLevel->Get<RCP<Operator> >(
"A");
491 RCP<Matrix> A = rcp_dynamic_cast<Matrix>(Op);
493 const RCP<const Map> rowMap = fineLevel->Get< RCP<Matrix> >(
"A")->getRowMap();
494 RCP<MultiVector> nullspace = MultiVectorFactory::Build(rowMap,
nullspaceDim_,
true);
496 for (
size_t i=0; i < Teuchos::as<size_t>(
nullspaceDim_); i++) {
497 Teuchos::ArrayRCP<Scalar> nullspacei = nullspace->getDataNonConst(i);
498 const size_t myLength = nullspace->getLocalLength();
500 for (
size_t j = 0; j < myLength; j++) {
505 fineLevel->Set(
"Nullspace", nullspace);
510 size_t num_coords = 0;
511 double * coordPTR[3];
525 Teuchos::RCP<Level> fineLevel = H.
GetLevel(0);
526 Teuchos::RCP<Operator> Op = fineLevel->Get<RCP<Operator> >(
"A");
527 Teuchos::RCP<Matrix> A = rcp_dynamic_cast<Matrix>(Op);
529 const Teuchos::RCP<const Map> rowMap = fineLevel->Get< RCP<Matrix> >(
"A")->getRowMap();
530 Teuchos::RCP<MultiVector> coordinates = MultiVectorFactory::Build(rowMap, num_coords,
true);
532 for (
size_t i=0; i < num_coords; i++) {
533 Teuchos::ArrayRCP<Scalar> coordsi = coordinates->getDataNonConst(i);
534 const size_t myLength = coordinates->getLocalLength();
535 for (
size_t j = 0; j < myLength; j++) {
536 coordsi[j] = coordPTR[0][j];
539 fineLevel->Set(
"Coordinates",coordinates);
547 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
548 RCP<MueLu::SmootherFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
551 const RCP<FactoryBase> & AFact)
553 std::string type =
"symmetric Gauss-Seidel";
575 if (paramList.isParameter(
"smoother: type")) type = paramList.get<std::string>(
"smoother: type");
576 TEUCHOS_TEST_FOR_EXCEPTION(type.empty(),
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no \"smoother: type\" in the smoother parameter list" << std::endl << paramList);
582 RCP<SmootherPrototype> smooProto;
583 std::string ifpackType;
584 Teuchos::ParameterList smootherParamList;
586 if (type ==
"Jacobi" || type ==
"Gauss-Seidel" || type ==
"symmetric Gauss-Seidel") {
587 if (type ==
"symmetric Gauss-Seidel") type =
"Symmetric Gauss-Seidel";
589 ifpackType =
"RELAXATION";
590 smootherParamList.set(
"relaxation: type", type);
592 MUELU_COPY_PARAM(paramList,
"smoother: sweeps",
int, 2, smootherParamList,
"relaxation: sweeps");
593 MUELU_COPY_PARAM(paramList,
"smoother: damping factor",
double, 1.0, smootherParamList,
"relaxation: damping factor");
596 smooProto->SetFactory(
"A", AFact);
598 }
else if (type ==
"Chebyshev" || type ==
"MLS") {
600 ifpackType =
"CHEBYSHEV";
602 MUELU_COPY_PARAM(paramList,
"smoother: sweeps",
int, 2, smootherParamList,
"chebyshev: degree");
603 if(paramList.isParameter(
"smoother: MLS alpha")) {
604 MUELU_COPY_PARAM(paramList,
"smoother: MLS alpha",
double, 20, smootherParamList,
"chebyshev: ratio eigenvalue");
606 MUELU_COPY_PARAM(paramList,
"smoother: Chebyshev alpha",
double, 20, smootherParamList,
"chebyshev: ratio eigenvalue");
611 smooProto->SetFactory(
"A", AFact);
613 }
else if (type ==
"IFPACK") {
615 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK) 616 ifpackType = paramList.get<std::string>(
"smoother: ifpack type");
618 if (ifpackType ==
"ILU") {
621 if (paramList.isParameter(
"smoother: ifpack level-of-fill"))
622 smootherParamList.set(
"fact: level-of-fill", Teuchos::as<int>(paramList.get<
double>(
"smoother: ifpack level-of-fill")));
623 else smootherParamList.set(
"fact: level-of-fill", as<int>(0));
625 MUELU_COPY_PARAM(paramList,
"smoother: ifpack overlap",
int, 2, smootherParamList,
"partitioner: overlap");
629 MueLu::GetIfpackSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node> (ifpackType,
631 paramList.get<
int> (
"smoother: ifpack overlap"));
632 smooProto->SetFactory(
"A", AFact);
634 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown ML smoother type " + type +
" (IFPACK) not supported by MueLu. Only ILU is supported.");
637 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: MueLu compiled without Ifpack support");
640 }
else if (type.length() > strlen(
"Amesos") && type.substr(0, strlen(
"Amesos")) ==
"Amesos") {
641 std::string solverType = type.substr(strlen(
"Amesos")+1);
645 const int validatorSize = 5;
646 std::string validator[validatorSize] = {
"Superlu",
"Superludist",
"KLU",
"UMFPACK"};
647 for (
int i=0; i < validatorSize; i++) {
if (validator[i] == solverType) valid =
true; }
648 TEUCHOS_TEST_FOR_EXCEPTION(!valid,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown smoother type. '" << type <<
"' not supported.");
651 std::transform(solverType.begin()+1, solverType.end(), solverType.begin()+1, ::tolower);
653 smooProto = Teuchos::rcp(
new DirectSolver(solverType, Teuchos::ParameterList()) );
654 smooProto->SetFactory(
"A", AFact);
658 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: unknown smoother type. '" << type <<
"' not supported by MueLu.");
661 TEUCHOS_TEST_FOR_EXCEPTION(smooProto == Teuchos::null,
Exceptions::RuntimeError,
"MueLu::MLParameterListInterpreter: no smoother prototype. fatal error.");
670 MUELU_READ_PARAM(paramList,
"smoother: pre or post", std::string,
"both", preOrPost);
671 if (preOrPost ==
"both") {
672 SmooFact->SetSmootherPrototypes(smooProto, smooProto);
673 }
else if (preOrPost ==
"pre") {
674 SmooFact->SetSmootherPrototypes(smooProto, Teuchos::null);
675 }
else if (preOrPost ==
"post") {
676 SmooFact->SetSmootherPrototypes(Teuchos::null, smooProto);
682 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
685 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!");
689 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
694 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
697 Matrix& A =
dynamic_cast<Matrix&
>(Op);
698 if (A.GetFixedBlockSize() !=
blksize_)
700 <<
"instead of " << A.GetFixedBlockSize() <<
" (provided matrix)." << std::endl;
704 }
catch (std::bad_cast& e) {
705 this->
GetOStream(
Warnings0) <<
"Skipping setting block size as the operator is not a matrix" << std::endl;
711 #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
MLParameterListInterpreter()
Constructor.
RCP< Level > & GetLevel(const int levelID=0)
Retrieve a certain level from hierarchy.
Class that encapsulates external library smoothers.
double * xcoord_
coordinates can be embedded in the ML parameter list
Interface to Isorropia package.
Factory for building permutation matrix that can be be used to shuffle data (matrices, vectors) among processes.
void AddFactoryManager(int startLevel, int numDesiredLevel, RCP< FactoryManagerBase > manager)
Namespace for MueLu classes and methods.
#define MUELU_READ_PARAM(paramList, paramStr, varType, defaultValue, varName)
int blksize_
Matrix configuration storage.
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.
Factory for building restriction operators using a prolongator factory.
virtual void SetupHierarchy(Hierarchy &H) const
Setup Hierarchy object.
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.
virtual void SetupOperator(Operator &Op) const
Setup Operator object.
Teuchos::RCP< Teuchos::ParameterList > ExtractSetOfParameters(const Teuchos::ParameterList ¶mList, const std::string &str)
size_t NumTransferFactories() const
Returns number of transfer factories.
int nullspaceDim_
nullspace can be embedded in the ML parameter list
AmalgamationFactory for subblocks of strided map based amalgamation data.
Applies permutation to grid transfer operators.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Factory for creating a graph base on a given matrix.
std::vector< RCP< FactoryBase > > TransferFacts_
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.
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
Xpetra::global_size_t maxCoarseSize_
Factory for building uncoupled aggregates.
Provides methods to build a multigrid hierarchy and apply multigrid cycles.
Factory for generating nullspace.
virtual void SetupHierarchy(Hierarchy &H) const
Setup Hierarchy object.