46#ifndef MUELU_FACTORYMANAGER_DECL_HPP
47#define MUELU_FACTORYMANAGER_DECL_HPP
113#undef MUELU_FACTORYMANAGER_SHORT
124# ifdef HAVE_MUELU_SERIAL
125 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
128# ifdef HAVE_MUELU_OPENMP
129 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
132# ifdef HAVE_MUELU_CUDA
133 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
136# ifdef HAVE_MUELU_HIP
137 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosHIPWrapperNode).name())
143 FactoryManager(
const std::map<std::string, RCP<const FactoryBase> >& factoryTable) {
146# ifdef HAVE_MUELU_SERIAL
147 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
150# ifdef HAVE_MUELU_OPENMP
151 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
154# ifdef HAVE_MUELU_CUDA
155 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
158# ifdef HAVE_MUELU_HIP
159 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosHIPWrapperNode).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
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that provides default factories within Needs class.
void SetIgnoreUserData(bool bIgnoreUserData=false)
set IgnoreUserData flag
This class specifies the default factory that should generate some data on a Level if the data does n...
const RCP< const FactoryBase > GetDefaultFactory(const std::string &varName) const
void SetKokkosRefactor(const bool useKokkos)
const RCP< const FactoryBase > SetAndReturnDefaultFactory(const std::string &varName, const RCP< const FactoryBase > &factory) const
bool useKokkos_
Whether or not to use kokkos factories.
std::map< std::string, RCP< const FactoryBase > > defaultFactoryTable_
Table that holds default factories.
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Set Factory.
bool hasFactory(const std::string &varName) const
Check.
bool GetKokkosRefactor() const
std::map< std::string, RCP< const FactoryBase > > factoryTable_
User-defined factories.
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Get factory associated with a particular data name.
FactoryManager()
Constructor.
FactoryManager(const std::map< std::string, RCP< const FactoryBase > > &factoryTable)
Constructor used by HierarchyFactory (temporary, will be removed)
virtual ~FactoryManager()
Destructor.
const RCP< FactoryBase > GetFactoryNonConst(const std::string &varName)
Get factory associated with a particular data name (NONCONST version)
Namespace for MueLu classes and methods.
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar