47 #ifndef MUELU_AGGREGATES_KOKKOS_DECL_HPP 48 #define MUELU_AGGREGATES_KOKKOS_DECL_HPP 50 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 52 #include <Xpetra_Map_fwd.hpp> 53 #include <Xpetra_Vector_fwd.hpp> 54 #include <Xpetra_VectorFactory_fwd.hpp> 63 #define MUELU_UNAGGREGATED -1 66 #define MUELU_UNASSIGNED -1 100 template <
class LocalOrdinal =
int,
class GlobalOrdinal = LocalOrdinal,
class Node = KokkosClassic::DefaultNode::DefaultNodeType>
101 class Aggregates_kokkos :
public BaseClass {
102 #undef MUELU_AGGREGATES_KOKKOS_SHORT 114 Aggregates_kokkos(
const GraphBase & graph);
121 Aggregates_kokkos(
const RCP<const Map> & map);
126 virtual ~Aggregates_kokkos() { }
128 LO GetNumAggregates()
const {
return nAggregates_; }
134 void SetNumAggregates(LO nAggregates) { nAggregates_ = nAggregates; }
137 void AggregatesCrossProcessors(
const bool &flag) {aggregatesIncludeGhosts_ = flag;};
143 bool AggregatesCrossProcessors()
const {
return aggregatesIncludeGhosts_;};
149 RCP<LOVector> & GetVertex2AggIdNonConst() {
return vertex2AggId_; }
155 RCP<LOVector> & GetProcWinnerNonConst() {
return procWinner_; }
160 const RCP<LOVector> & GetVertex2AggId()
const {
return vertex2AggId_; }
166 const RCP<LOVector> & GetProcWinner()
const {
return procWinner_; }
169 bool IsRoot(LO i)
const {
return isRoot_[i]; }
175 void SetIsRoot(LO i,
bool value=
true) { isRoot_[i] = value; }
177 const RCP<const Map> GetMap()
const;
192 Teuchos::ArrayRCP<LO> ComputeAggregateSizes(
bool forceRecompute=
true,
bool cacheSizes=
false)
const;
198 std::string description()
const;
202 void print(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel = verbLevel_default)
const;
211 RCP<LOVector> vertex2AggId_;
217 RCP<LOVector> procWinner_;
219 Teuchos::ArrayRCP<bool> isRoot_;
222 bool aggregatesIncludeGhosts_;
225 mutable Teuchos::ArrayRCP<LO> aggregateSizes_;
229 GO GetNumGlobalAggregates()
const;
234 #endif // HAVE_MUELU_KOKKOS_REFACTOR 236 #define MUELU_AGGREGATES_KOKKOS_SHORT 237 #endif // MUELU_AGGREGATES_KOKKOS_DECL_HPP
Namespace for MueLu classes and methods.