8 #ifndef PACKAGES_MUELU_ADAPTERS_XPETRA_MUELU_CREATEXPETRAPRECONDITIONER_HPP_
9 #define PACKAGES_MUELU_ADAPTERS_XPETRA_MUELU_CREATEXPETRAPRECONDITIONER_HPP_
21 #include <MueLu_Hierarchy.hpp>
23 #include <MueLu_MLParameterListInterpreter.hpp>
24 #include <MueLu_ParameterListInterpreter.hpp>
25 #include <MueLu_Utilities.hpp>
26 #include <MueLu_HierarchyUtils.hpp>
41 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
53 std::string timerName =
"MueLu setup time";
57 bool hasParamList = inParamList.
numParams();
65 std::string syntaxStr =
"parameterlist: syntax";
66 if (hasParamList && paramList.
isParameter(syntaxStr) && paramList.
get<std::string>(syntaxStr) ==
"ml") {
67 paramList.
remove(syntaxStr);
75 if (hasParamList && paramList.
isParameter(
"hierarchy label")) {
76 label = paramList.
get<std::string>(
"hierarchy label");
77 paramList.
remove(
"hierarchy label");
79 label = op->getObjectLabel();
81 H->
setlib(op->getDomainMap()->lib());
90 if (coords != Teuchos::null)
91 H->
GetLevel(0)->Set(
"Coordinates", coords);
94 if (nullspace != Teuchos::null)
95 H->
GetLevel(0)->Set(
"Nullspace", nullspace);
103 const bool alwaysWriteLocal =
true;
104 const bool writeGlobalStats =
true;
105 const bool writeZeroTimers =
false;
106 const bool ignoreZeroTimers =
true;
107 const std::string filter = timerName;
109 writeZeroTimers, Teuchos::Union, filter, ignoreZeroTimers);
117 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
128 std::string timerName =
"MueLu setup time";
132 bool hasParamList = inParamList.
numParams();
140 std::string syntaxStr =
"parameterlist: syntax";
141 if (hasParamList && paramList.
isParameter(syntaxStr) && paramList.
get<std::string>(syntaxStr) ==
"ml") {
142 paramList.
remove(syntaxStr);
150 H->
setlib(op->getDomainMap()->lib());
164 const bool alwaysWriteLocal =
true;
165 const bool writeGlobalStats =
true;
166 const bool writeZeroTimers =
false;
167 const bool ignoreZeroTimers =
true;
168 const std::string filter = timerName;
170 writeZeroTimers, Teuchos::Union, filter, ignoreZeroTimers);
185 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
188 std::string timerName =
"MueLu setup time";
193 typedef LocalOrdinal
LO;
194 typedef GlobalOrdinal
GO;
201 "MueLu::ReuseXpetraPreconditioner: Hierarchy has no levels in it");
203 "MueLu::ReuseXpetraPreconditioner: Hierarchy has no fine level operator");
207 RCP<Matrix> A0 = Teuchos::rcp_dynamic_cast<Matrix>(O0);
213 A->SetFixedBlockSize(A0->GetFixedBlockSize());
223 const bool alwaysWriteLocal =
true;
224 const bool writeGlobalStats =
true;
225 const bool writeZeroTimers =
false;
226 const bool ignoreZeroTimers =
true;
227 const std::string filter = timerName;
229 writeZeroTimers, Teuchos::Union, filter, ignoreZeroTimers);
237 #define XPETRA_CREATEXPETRAPRECONDITIONER_SHORT