46 #ifndef MUELU_TRANSPFACTORY_DEF_HPP 47 #define MUELU_TRANSPFACTORY_DEF_HPP 49 #include <Teuchos_ParameterList.hpp> 50 #include <Teuchos_Time.hpp> 60 #include "MueLu_PerfUtils.hpp" 61 #include "MueLu_Utilities.hpp" 65 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
67 RCP<ParameterList> validParamList = rcp(
new ParameterList());
68 validParamList->set< RCP<const FactoryBase> >(
"P", Teuchos::null,
"Generating factory of the matrix P");
69 return validParamList;
72 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
74 Input(coarseLevel,
"P");
77 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
82 RCP<Matrix> P = Get< RCP<Matrix> >(coarseLevel,
"P");
86 RCP<ParameterList> params = rcp(
new ParameterList());;
87 params->set(
"printLoadBalancingInfo",
true);
88 params->set(
"printCommInfo",
true);
92 Set(coarseLevel,
"R", R);
95 if (P->IsView(
"stridedMaps"))
96 R->CreateView(
"stridedMaps", P,
true);
103 #endif // MUELU_TRANSPFACTORY_DEF_HPP RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
static RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Transpose(Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, bool optimizeTranspose=false, const std::string &label=std::string())
Timer to be used in factories. Similar to Monitor but with additional timers.
Namespace for MueLu classes and methods.
int GetLevelID() const
Return level number.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
Class that holds all level-specific information.
static std::string PrintMatrixInfo(const Matrix &A, const std::string &msgTag, RCP< const Teuchos::ParameterList > params=Teuchos::null)
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.