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>
81 auto aggregates = Get<RCP<Aggregates_kokkos> >(currentLevel,
"Aggregates");
82 auto nullspace = Get<RCP<MultiVector> > (currentLevel,
"Nullspace");
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
Timer to be used in factories. Similar to Monitor but with additional timers.
Class that holds all level-specific information.
Namespace for MueLu classes and methods.