46 #ifndef MUELU_PATTERNFACTORY_DEF_HPP
47 #define MUELU_PATTERNFACTORY_DEF_HPP
49 #include <Xpetra_Matrix.hpp>
50 #include <Xpetra_MatrixMatrix.hpp>
60 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
64 #define SET_VALID_ENTRY(name) validParamList->setEntry(name, MasterList::getEntry(name))
66 #undef SET_VALID_ENTRY
69 validParamList->
set<
RCP<const FactoryBase> >(
"P", Teuchos::null,
"Generating factory for the matrix providing nonzero graph");
71 return validParamList;
74 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
76 Input(coarseLevel,
"P");
79 if (pL.
get<
int>(
"emin: pattern order") > 0)
80 Input(fineLevel,
"A");
83 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
87 RCP<Matrix> P = Get< RCP<Matrix> >(coarseLevel,
"P");
90 int k = pL.get<
int>(
"emin: pattern order");
96 bool doFillComplete =
true;
97 bool optimizeStorage =
true;
99 for (
int i = 0; i < k; i++) {
100 AP = Xpetra::MatrixMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Multiply(*A,
false, *P,
false, GetOStream(
Statistics2), doFillComplete, optimizeStorage);
105 Set(coarseLevel,
"Ppattern", P->getCrsGraph());
111 #endif // MUELU_PATTERNFACTORY_DEF_HPP
#define SET_VALID_ENTRY(name)
T & get(const std::string &name, T def_value)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Timer to be used in factories. Similar to Monitor but with additional timers.
void swap(RCP< T > &r_ptr)
void Build(Level &fineLevel, Level &coarseLevel) const
Build method.
Print even more statistics.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.