MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_AggregationPhase2aAlgorithm_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef MUELU_AGGREGATIONPHASE2AALGORITHM_DECL_HPP_
11 #define MUELU_AGGREGATIONPHASE2AALGORITHM_DECL_HPP_
12 
13 #include "MueLu_ConfigDefs.hpp"
15 
17 
19 #include "MueLu_Aggregates_fwd.hpp"
20 #include "MueLu_LWGraph.hpp"
21 
22 namespace MueLu {
45 template <class LocalOrdinal = DefaultLocalOrdinal,
47  class Node = DefaultNode>
48 class AggregationPhase2aAlgorithm : public MueLu::AggregationAlgorithmBase<LocalOrdinal, GlobalOrdinal, Node> {
49 #undef MUELU_AGGREGATIONPHASE2AALGORITHM_SHORT
51 
52  public:
54 
55 
57  AggregationPhase2aAlgorithm(const RCP<const FactoryBase>& /* graphFact */ = Teuchos::null) {}
58 
61 
63 
65 
66 
69  void BuildAggregatesNonKokkos(const ParameterList& params, const LWGraph& graph, Aggregates& aggregates, typename AggregationAlgorithmBase<LocalOrdinal, GlobalOrdinal, Node>::AggStatHostType& aggStat, LO& numNonAggregatedNodes) const;
70 
71  void BuildAggregates(const Teuchos::ParameterList& params,
72  const LWGraph_kokkos& graph,
73  Aggregates& aggregates,
75  LO& numNonAggregatedNodes) const;
76 
78  const LWGraph_kokkos& graph,
79  Aggregates& aggregates,
81  LO& numNonAggregatedNodes) const;
82 
84  const LWGraph_kokkos& graph,
85  Aggregates& aggregates,
87  LO& numNonAggregatedNodes) const;
89 
90  std::string description() const { return "Phase 2a (secondary)"; }
91 };
92 
93 } // namespace MueLu
94 
95 #define MUELU_AGGREGATIONPHASE2AALGORITHM_SHORT
96 
97 #endif /* MUELU_AGGREGATIONPHASE2AALGORITHM_DECL_HPP_ */
Kokkos::View< unsigned *, typename LWGraphHostType::device_type > AggStatHostType
MueLu::DefaultLocalOrdinal LocalOrdinal
void BuildAggregatesRandom(const Teuchos::ParameterList &params, const LWGraph_kokkos &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatType &aggStat, LO &numNonAggregatedNodes) const
Lightweight MueLu representation of a compressed row storage graph.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Container class for aggregation information.
Pure virtual base class for all MueLu aggregation algorithms.
LocalOrdinal LO
MueLu::DefaultNode Node
MueLu::DefaultGlobalOrdinal GlobalOrdinal
AggregationPhase2aAlgorithm(const RCP< const FactoryBase > &=Teuchos::null)
Constructor.
std::string description() const
Return a simple one-line description of this object.
Among unaggregated points, see if we can make a reasonable size aggregate out of it.IdeaAmong unaggregated points, see if we can make a reasonable size aggregate out of it. We do this by looking at neighbors and seeing how many are unaggregated and on my processor. Loosely, base the number of new aggregates created on the percentage of unaggregated nodes.
void BuildAggregatesDeterministic(const Teuchos::ParameterList &params, const LWGraph_kokkos &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatType &aggStat, LO &numNonAggregatedNodes) const
Lightweight MueLu representation of a compressed row storage graph.
void BuildAggregatesNonKokkos(const ParameterList &params, const LWGraph &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatHostType &aggStat, LO &numNonAggregatedNodes) const
Local aggregation.
void BuildAggregates(const Teuchos::ParameterList &params, const LWGraph_kokkos &graph, Aggregates &aggregates, typename AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node >::AggStatType &aggStat, LO &numNonAggregatedNodes) const
Kokkos::View< unsigned *, typename LWGraphType::device_type > AggStatType