47 #ifndef MUELU_AGGREGATES_KOKKOS_DECL_HPP 48 #define MUELU_AGGREGATES_KOKKOS_DECL_HPP 51 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 53 #include <Kokkos_StaticCrsGraph.hpp> 54 #include <KokkosCompat_ClassicNodeAPI_Wrapper.hpp> 66 #define MUELU_UNAGGREGATED -1 69 #define MUELU_UNASSIGNED -1 102 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
103 class Aggregates_kokkos;
105 template <
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
106 class Aggregates_kokkos<LocalOrdinal, GlobalOrdinal,
Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType> > :
public BaseClass {
109 typedef GlobalOrdinal global_ordinal_type;
110 typedef typename DeviceType::execution_space execution_space;
111 typedef Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType>
node_type;
112 typedef DeviceType device_type;
114 typedef Kokkos::View<LocalOrdinal*, DeviceType> aggregates_sizes_type;
115 typedef Kokkos::StaticCrsGraph<LocalOrdinal, Kokkos::LayoutLeft, execution_space> local_graph_type;
120 #undef MUELU_AGGREGATES_KOKKOS_SHORT 134 Aggregates_kokkos(LWGraph_kokkos graph);
141 Aggregates_kokkos(
const RCP<const Map>& map);
146 virtual ~Aggregates_kokkos() { }
149 KOKKOS_INLINE_FUNCTION
LO GetNumAggregates()
const {
157 void SetNumAggregates(
LO nAggregates) { nAggregates_ = nAggregates; }
160 KOKKOS_INLINE_FUNCTION
void AggregatesCrossProcessors(
const bool& flag) {
161 aggregatesIncludeGhosts_ = flag;
168 KOKKOS_INLINE_FUNCTION
bool AggregatesCrossProcessors()
const {
169 return aggregatesIncludeGhosts_;
176 RCP<LOVector>& GetVertex2AggIdNonConst() {
return vertex2AggId_; }
182 RCP<LOVector>& GetProcWinnerNonConst() {
return procWinner_; }
187 const RCP<LOVector>& GetVertex2AggId()
const {
return vertex2AggId_; }
193 const RCP<LOVector>& GetProcWinner()
const {
return procWinner_; }
196 bool IsRoot(
LO i)
const {
return isRoot_[i]; }
202 void SetIsRoot(
LO i,
bool value =
true) { isRoot_[i] = value; }
204 const RCP<const Map> GetMap()
const;
219 typename aggregates_sizes_type::const_type ComputeAggregateSizes(
bool forceRecompute =
true,
bool cacheSizes =
false)
const;
221 local_graph_type GetGraph()
const;
227 std::string description()
const;
231 void print(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel = verbLevel_default)
const;
240 RCP<LOVector> vertex2AggId_;
246 RCP<LOVector> procWinner_;
248 Teuchos::ArrayRCP<bool> isRoot_;
251 bool aggregatesIncludeGhosts_;
255 aggregates_sizes_type aggregateSizes_;
259 GO GetNumGlobalAggregates()
const;
264 #endif // HAVE_MUELU_KOKKOS_REFACTOR 266 #define MUELU_AGGREGATES_KOKKOS_SHORT 267 #endif // MUELU_AGGREGATES_KOKKOS_DECL_HPP KokkosClassic::DefaultNode::DefaultNodeType node_type
Namespace for MueLu classes and methods.