46 #ifndef MUELU_FACTORYMANAGER_DECL_HPP 47 #define MUELU_FACTORYMANAGER_DECL_HPP 77 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 113 #undef MUELU_FACTORYMANAGER_SHORT 124 #if !defined(HAVE_MUELU_KOKKOS_REFACTOR) 127 # ifdef HAVE_MUELU_SERIAL 128 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
131 # ifdef HAVE_MUELU_OPENMP 132 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
135 # ifdef HAVE_MUELU_CUDA 136 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
143 FactoryManager(
const std::map<std::string, RCP<const FactoryBase> >& factoryTable) {
146 #if !defined(HAVE_MUELU_KOKKOS_REFACTOR) 149 # ifdef HAVE_MUELU_SERIAL 150 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
153 # ifdef HAVE_MUELU_OPENMP 154 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
157 # ifdef HAVE_MUELU_CUDA 158 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
179 void SetFactory(
const std::string & varName,
const RCP<const FactoryBase>& factory);
186 const RCP<const FactoryBase>
GetFactory(
const std::string& varName)
const;
197 bool hasFactory(
const std::string& varName)
const;
201 const RCP<const FactoryBase>
GetDefaultFactory(
const std::string& varName)
const;
213 #ifdef HAVE_MUELU_DEBUG 214 void ResetDebugData()
const;
229 const RCP<const FactoryBase>
SetAndReturnDefaultFactory(
const std::string& varName,
const RCP<const FactoryBase>& factory)
const;
257 #define MUELU_FACTORYMANAGER_SHORT 258 #endif // MUELU_FACTORYMANAGER_DECL_HPP
This class specifies the default factory that should generate some data on a Level if the data does n...
MueLu::DefaultLocalOrdinal LocalOrdinal
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
bool GetKokkosRefactor() const
bool hasFactory(const std::string &varName) const
Check.
virtual ~FactoryManager()
Destructor.
FactoryManager()
Constructor.
void SetIgnoreUserData(bool bIgnoreUserData=false)
set IgnoreUserData flag
void SetKokkosRefactor(const bool useKokkos)
Namespace for MueLu classes and methods.
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
const RCP< const FactoryBase > SetAndReturnDefaultFactory(const std::string &varName, const RCP< const FactoryBase > &factory) const
Class that provides default factories within Needs class.
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Set Factory.
const RCP< FactoryBase > GetFactoryNonConst(const std::string &varName)
Get factory associated with a particular data name (NONCONST version)
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Get factory associated with a particular data name.
std::map< std::string, RCP< const FactoryBase > > factoryTable_
User-defined factories.
std::map< std::string, RCP< const FactoryBase > > defaultFactoryTable_
Table that holds default factories.
FactoryManager(const std::map< std::string, RCP< const FactoryBase > > &factoryTable)
Constructor used by HierarchyFactory (temporary, will be removed)
const RCP< const FactoryBase > GetDefaultFactory(const std::string &varName) const
bool useKokkos_
Whether or not to use kokkos factories.