8#ifndef PACKAGES_MUELU_SRC_MUECENTRAL_MUELU_TOPRAPFACTORY_DEF_HPP_
9#define PACKAGES_MUELU_SRC_MUECENTRAL_MUELU_TOPRAPFACTORY_DEF_HPP_
17#include "MueLu_TopRAPFactory.hpp"
30 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
32 PFact_ (parentFactoryManager->GetFactory(
"P")),
33 RFact_ (parentFactoryManager->GetFactory(
"R")),
34 AcFact_(parentFactoryManager->GetFactory(
"A"))
37 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
39 PFact_ (parentFactoryManagerCoarse->GetFactory(
"P")),
40 RFact_ (parentFactoryManagerCoarse->GetFactory(
"R")),
41 AcFact_(parentFactoryManagerCoarse->GetFactory(
"A"))
44 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
47 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
49 if (PFact_ != Teuchos::null) coarseLevel.
DeclareInput(
"P", PFact_.get());
50 if (RFact_ != Teuchos::null) coarseLevel.
DeclareInput(
"R", RFact_.get());
54 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
57 RCP<Operator> oP = coarseLevel.
Get<RCP<Operator> >(
"P", PFact_.get());
60 if (oP == Teuchos::null)
return;
61 RCP<Matrix> P = rcp_dynamic_cast<Matrix>(oP);
70 RCP<Operator> oR = coarseLevel.
Get<RCP<Operator> >(
"R", RFact_.get());
71 RCP<Matrix> R = rcp_dynamic_cast<Matrix>(oR);
79 RCP<Operator> oA = coarseLevel.
Get<RCP<Operator> >(
"A", AcFact_.get());
80 RCP<Matrix> A = rcp_dynamic_cast<Matrix>(oA);
Class that holds all level-specific information.
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
void RemoveKeepFlag(const std::string &ename, const FactoryBase *factory, KeepType keep=MueLu::All)
void AddKeepFlag(const std::string &ename, const FactoryBase *factory=NoFactory::get(), KeepType keep=MueLu::Keep)
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access)....
void Set(const std::string &ename, const T &entry, const FactoryBase *factory=NoFactory::get())
static const RCP< const NoFactory > getRCP()
Static Get() functions.
static const NoFactory * get()
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
TopRAPFactory(RCP< const FactoryManagerBase > parentFactoryManager)
Namespace for MueLu classes and methods.
@ Final
Keep data only for this run. Used to keep data useful for Hierarchy::Iterate(). Data will be deleted ...
@ UserData
User data are always kept. This flag is set automatically when Level::Set("data", data) is used....