10 #ifndef MUELU_RFROMP_OR_TRANSP_DEF_HPP
11 #define MUELU_RFROMP_OR_TRANSP_DEF_HPP
23 #include "MueLu_PFactory.hpp"
24 #include "MueLu_PgPFactory.hpp"
25 #include "MueLu_TogglePFactory.hpp"
27 #include "MueLu_PerfUtils.hpp"
28 #include "MueLu_Utilities.hpp"
32 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
40 norecurse.disableRecursiveValidation();
41 validParamList->
set<
ParameterList>(
"matrixmatrix: kernel params", norecurse,
"MatrixMatrix kernel parameters");
43 return validParamList;
46 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
48 Input(coarseLevel,
"RfromPfactory");
65 if (PFact == Teuchos::null) {
66 PFact = GetFactory(
"P");
70 if (myToggleFact != Teuchos::null) {
71 for (
size_t ii = 0; ii < myToggleFact->NumProlongatorFactories(); ii++) {
73 if (actualPFact != Teuchos::null) {
87 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
96 if (pL.isSublist(
"matrixmatrix: kernel params"))
102 Tparams->
set(
"compute global constants: temporaries", Tparams->
get(
"compute global constants: temporaries",
false));
103 Tparams->
set(
"compute global constants", Tparams->
get(
"compute global constants",
false));
107 if (PFact == Teuchos::null) {
108 PFact = GetFactory(
"P");
114 std::string strType = coarseLevel.
GetTypeName(
"RfromPfactory", PFact.
get());
120 if (strType ==
"int") {
123 if (myToggleFact != Teuchos::null) {
125 RCP<PFactory> actualPFact = Teuchos::rcp_const_cast<
PFactory>(rcp_dynamic_cast<
const PFactory>(myToggleFact->getProlongatorFactory((
size_t)coarseLevel.
Get<
int>(
"RfromPfactory", PFact.
get()))));
141 params->
set(
"printLoadBalancingInfo",
true);
142 params->
set(
"printCommInfo",
true);
146 Set(coarseLevel,
"R", R);
149 if (P->IsView(
"stridedMaps"))
150 R->CreateView(
"stridedMaps", P,
true);
156 #endif // MUELU_RFROMP_OR_TRANSP_DEF_HPP
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access). Usage: Level->Get< RCP<Matrix> >("A", factory) if factory == NULL => use default factory.
void DeclareDependencies(const FactoryBase *factory, bool bRequestOnly=false, bool bReleaseOnly=false)
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput() to declare factory depe...
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
T & get(const std::string &name, T def_value)
Timer to be used in factories. Similar to Monitor but with additional timers.
void setRestrictionMode(bool bRestrictionMode=false)
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Print even more statistics.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
std::string GetTypeName(const std::string &ename, const FactoryBase *factory=NoFactory::get())
GetTypeName returns type string of variable stored using ename and factory.
Prolongator factory which allows switching between two different prolongator strategies.
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(), const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
bool isRestrictionModeSet()
returns restrictionMode flag
static std::string PrintMatrixInfo(const Matrix &A, const std::string &msgTag, RCP< const Teuchos::ParameterList > params=Teuchos::null)
An exception safe way to call the method TwoLevelFactoryBase::DisableMultipleCallCheck.
const RCP< const FactoryManagerBase > GetFactoryManager()
returns the current factory manager
int GetLevelID() const
Return level number.
Factory that provides an interface for a concrete implementation of a prolongation operator...
Factory for building Petrov-Galerkin Smoothed Aggregation prolongators.
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
std::string toString(const T &t)
bool IsAvailable(const std::string &ename, const FactoryBase *factory=NoFactory::get()) const
Test whether a need's value has been saved.