46#ifndef MUELU_FACTORYMANAGER_DECL_HPP
47#define MUELU_FACTORYMANAGER_DECL_HPP
111#undef MUELU_FACTORYMANAGER_SHORT
122# ifdef HAVE_MUELU_SERIAL
123 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosSerialWrapperNode).name())
126# ifdef HAVE_MUELU_OPENMP
127 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosOpenMPWrapperNode).name())
130# ifdef HAVE_MUELU_CUDA
131 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosCudaWrapperNode).name())
134# ifdef HAVE_MUELU_HIP
135 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosHIPWrapperNode).name())
138# ifdef HAVE_MUELU_SYCL
139 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosSYCLWrapperNode).name())
145 FactoryManager(
const std::map<std::string, RCP<const FactoryBase> >& factoryTable) {
148# ifdef HAVE_MUELU_SERIAL
149 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosSerialWrapperNode).name())
152# ifdef HAVE_MUELU_OPENMP
153 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosOpenMPWrapperNode).name())
156# ifdef HAVE_MUELU_CUDA
157 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosCudaWrapperNode).name())
160# ifdef HAVE_MUELU_HIP
161 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosHIPWrapperNode).name())
164# ifdef HAVE_MUELU_SYCL
165 if (
typeid(
Node).name() ==
typeid(Tpetra::KokkosCompat::KokkosSYCLWrapperNode).name())
185 void SetFactory(
const std::string & varName,
const RCP<const FactoryBase>& factory);
192 const RCP<const FactoryBase>
GetFactory(
const std::string& varName)
const;
203 bool hasFactory(
const std::string& varName)
const;
207 const RCP<const FactoryBase>
GetDefaultFactory(
const std::string& varName)
const;
219#ifdef HAVE_MUELU_DEBUG
220 void ResetDebugData()
const;
235 const RCP<const FactoryBase>
SetAndReturnDefaultFactory(
const std::string& varName,
const RCP<const FactoryBase>& factory)
const;
263#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.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar