Go to the documentation of this file.
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();
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;
const RCP< LOVector > & GetProcWinner() const
Returns constant vector that maps local node IDs to owning processor IDs.
virtual const RCP< const Teuchos::Comm< int > > GetComm() const =0
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.
Namespace for MueLu classes and methods.
MueLu representation of a graph.
const RCP< LOMultiVector > & GetVertex2AggId() const
Returns constant vector that maps local node IDs to local aggregates IDs.
Container class for aggregation information.
LO GetNumAggregates() const
returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLoc...
Timer to be used in non-factories.
void SetNumAggregates(LO nAggregates)
Set number of local aggregates on current processor.