46 #ifndef MUELU_PRESERVEDIRICHLETAGGREGATIONALGORITHM_DEF_HPP_
47 #define MUELU_PRESERVEDIRICHLETAGGREGATIONALGORITHM_DEF_HPP_
49 #include <Teuchos_Comm.hpp>
50 #include <Teuchos_CommHelpers.hpp>
52 #include <Xpetra_Vector.hpp>
54 #include "MueLu_PreserveDirichletAggregationAlgorithm.hpp"
57 #include "MueLu_Aggregates.hpp"
63 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
65 Monitor m(*
this,
"BuildAggregates");
67 bool preserve = params.
get<
bool>(
"aggregation: preserve Dirichlet points");
70 const int myRank = graph.
GetComm()->getRank();
77 for (LO i = 0; i < numRows; i++)
80 numNonAggregatedNodes--;
85 vertex2AggId[i] = numLocalAggregates++;
86 procWinner [i] = myRank;
const RCP< LOVector > & GetProcWinner() const
Returns constant vector that maps local node IDs to owning processor IDs.
Container class for aggregation information.
T & get(const std::string &name, T def_value)
virtual size_t GetNodeNumVertices() const =0
Return number of vertices owned by the calling node.
void SetIsRoot(LO i, bool value=true)
Set root node information.
void BuildAggregates(const Teuchos::ParameterList ¶ms, const GraphBase &graph, Aggregates &aggregates, std::vector< unsigned > &aggStat, LO &numNonAggregatedNodes) const
Local aggregation.
LO GetNumAggregates() const
returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLoc...
const RCP< LOMultiVector > & GetVertex2AggId() const
Returns constant vector that maps local node IDs to local aggregates IDs.
virtual const RCP< const Teuchos::Comm< int > > GetComm() const =0
MueLu representation of a graph.
Timer to be used in non-factories.
void SetNumAggregates(LO nAggregates)
Set number of local aggregates on current processor.