46#ifndef MUELU_COARSEMAPFACTORY_KOKKOS_DEF_HPP_
47#define MUELU_COARSEMAPFACTORY_KOKKOS_DEF_HPP_
51#include <Teuchos_Array.hpp>
53#include <Xpetra_MultiVector.hpp>
56#include "MueLu_Aggregates_kokkos.hpp"
61 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
63 RCP<ParameterList> validParamList = rcp(
new ParameterList());
65 validParamList->set<RCP<const FactoryBase> >(
"Aggregates", Teuchos::null,
"Generating factory for aggregates.");
66 validParamList->set<RCP<const FactoryBase> >(
"Nullspace", Teuchos::null,
"Generating factory for null space.");
68 return validParamList;
71 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
73 Input(currentLevel,
"Aggregates");
74 Input(currentLevel,
"Nullspace");
77 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
84 auto map = aggregates->GetMap();
86 const GO numAggs = aggregates->GetNumAggregates();
87 const size_t NSDim = nullspace->getNumVectors();
91 std::vector<size_t> stridingInfo(1);
92 stridingInfo[0] = NSDim;
94 auto INVALID = Teuchos::OrdinalTraits<Xpetra::global_size_t>::invalid();
95 RCP<const Map> coarseMap = StridedMapFactory::Build(map->lib(), INVALID, numCoarseDofs, map->getIndexBase(), stridingInfo, map->getComm());
97 Set(currentLevel,
"CoarseMap", coarseMap);
MueLu::DefaultGlobalOrdinal GlobalOrdinal
CoarseMapFactory_kokkos()
Constructor.
void Build(Level ¤tLevel) const
Build an object with this factory.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.
Timer to be used in factories. Similar to Monitor but with additional timers.
void Input(Level &level, const std::string &varName) const
T Get(Level &level, const std::string &varName) const
void Set(Level &level, const std::string &varName, const T &data) const
Class that holds all level-specific information.
Namespace for MueLu classes and methods.