46 #ifndef MUELU_PRESERVEDIRICHLETAGGREGATIONALGORITHM_DEF_HPP_ 47 #define MUELU_PRESERVEDIRICHLETAGGREGATIONALGORITHM_DEF_HPP_ 49 #include <Teuchos_Comm.hpp> 50 #include <Teuchos_CommHelpers.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();
72 ArrayRCP<LO> vertex2AggId = aggregates.
GetVertex2AggId()->getDataNonConst(0);
73 ArrayRCP<LO> procWinner = aggregates.
GetProcWinner() ->getDataNonConst(0);
77 for (
LO i = 0; i < numRows; i++)
80 numNonAggregatedNodes--;
85 vertex2AggId[i] = numLocalAggregates++;
86 procWinner [i] = myRank;
Container class for aggregation information.
virtual size_t GetNodeNumVertices() const =0
Return number of vertices owned by the calling node.
Namespace for MueLu classes and methods.
void SetIsRoot(LO i, bool value=true)
Set root node information.
const RCP< LOVector > & 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.
LO GetNumAggregates() const
returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLoc...
const RCP< LOVector > & GetProcWinner() const
Returns constant vector that maps local node IDs to owning processor IDs.
void BuildAggregates(const Teuchos::ParameterList ¶ms, const GraphBase &graph, Aggregates &aggregates, std::vector< unsigned > &aggStat, LO &numNonAggregatedNodes) const
Local aggregation.
void SetNumAggregates(LO nAggregates)
Set number of local aggregates on current processor.