MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_AggregationStructuredAlgorithm_def.hpp
Go to the documentation of this file.
1// @HEADER
2//
3// ***********************************************************************
4//
5// MueLu: A package for multigrid based preconditioning
6// Copyright 2012 Sandia Corporation
7//
8// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9// the U.S. Government retains certain rights in this software.
10//
11// Redistribution and use in source and binary forms, with or without
12// modification, are permitted provided that the following conditions are
13// met:
14//
15// 1. Redistributions of source code must retain the above copyright
16// notice, this list of conditions and the following disclaimer.
17//
18// 2. Redistributions in binary form must reproduce the above copyright
19// notice, this list of conditions and the following disclaimer in the
20// documentation and/or other materials provided with the distribution.
21//
22// 3. Neither the name of the Corporation nor the names of the
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact
39// Jonathan Hu (jhu@sandia.gov)
40// Andrey Prokopenko (aprokop@sandia.gov)
41// Ray Tuminaro (rstumin@sandia.gov)
42//
43// ***********************************************************************
44//
45// @HEADER
46#ifndef MUELU_AGGREGATIONSTRUCTUREDALGORITHM_DEF_HPP_
47#define MUELU_AGGREGATIONSTRUCTUREDALGORITHM_DEF_HPP_
48
49
50#include <Teuchos_Comm.hpp>
51#include <Teuchos_CommHelpers.hpp>
52
53#include <Xpetra_MapFactory.hpp>
54#include <Xpetra_Map.hpp>
55#include <Xpetra_CrsGraphFactory.hpp>
56#include <Xpetra_CrsGraph.hpp>
57
59
60#include "MueLu_GraphBase.hpp"
61#include "MueLu_Aggregates.hpp"
62#include "MueLu_IndexManager.hpp"
63#include "MueLu_Exceptions.hpp"
64#include "MueLu_Monitor.hpp"
65
66namespace MueLu {
67
68 template <class LocalOrdinal, class GlobalOrdinal, class Node>
70 BuildAggregates(const Teuchos::ParameterList& /* params */, const GraphBase& graph,
71 Aggregates& aggregates, std::vector<unsigned>& aggStat,
72 LO& numNonAggregatedNodes) const {
73 Monitor m(*this, "BuildAggregates");
74
75 RCP<Teuchos::FancyOStream> out;
76 if(const char* dbg = std::getenv("MUELU_STRUCTUREDALGORITHM_DEBUG")) {
77 out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
78 out->setShowAllFrontMatter(false).setShowProcRank(true);
79 } else {
80 out = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()));
81 }
82
83 RCP<IndexManager> geoData = aggregates.GetIndexManager();
84 const bool coupled = geoData->isAggregationCoupled();
85 const bool singleCoarsePoint = geoData->isSingleCoarsePoint();
86 ArrayRCP<LO> vertex2AggId = aggregates.GetVertex2AggId()->getDataNonConst(0);
87 ArrayRCP<LO> procWinner = aggregates.GetProcWinner() ->getDataNonConst(0);
88 Array<LO> ghostedCoarseNodeCoarseLIDs;
89 Array<int> ghostedCoarseNodeCoarsePIDs;
90 Array<GO> ghostedCoarseNodeCoarseGIDs;
91
92 *out << "Extract data for ghosted nodes" << std::endl;
93 geoData->getGhostedNodesData(graph.GetDomainMap(), ghostedCoarseNodeCoarseLIDs,
94 ghostedCoarseNodeCoarsePIDs, ghostedCoarseNodeCoarseGIDs);
95
96 LO rem, rate;
97 Array<LO> ghostedIdx(3), coarseIdx(3);
98 LO ghostedCoarseNodeCoarseLID, aggId;
99 *out << "Loop over fine nodes and assign them to an aggregate and a rank" << std::endl;
100 for(LO nodeIdx = 0; nodeIdx < geoData->getNumLocalFineNodes(); ++nodeIdx) {
101 // Compute coarse ID associated with fine LID
102 geoData->getFineNodeGhostedTuple(nodeIdx, ghostedIdx[0], ghostedIdx[1], ghostedIdx[2]);
103
104 for(int dim = 0; dim < 3; ++dim) {
105 if(singleCoarsePoint
106 && (geoData->getLocalFineNodesInDir(dim) - 1 < geoData->getCoarseningRate(dim))) {
107 coarseIdx[dim] = 0;
108 } else {
109 coarseIdx[dim] = ghostedIdx[dim] / geoData->getCoarseningRate(dim);
110 rem = ghostedIdx[dim] % geoData->getCoarseningRate(dim);
111 if(ghostedIdx[dim] - geoData->getOffset(dim)
112 < geoData->getLocalFineNodesInDir(dim) - geoData->getCoarseningEndRate(dim)) {
113 rate = geoData->getCoarseningRate(dim);
114 } else {
115 rate = geoData->getCoarseningEndRate(dim);
116 }
117 if(rem > (rate / 2)) {++coarseIdx[dim];}
118 if(coupled && (geoData->getStartGhostedCoarseNode(dim)*geoData->getCoarseningRate(dim)
119 > geoData->getStartIndex(dim))) {--coarseIdx[dim];}
120 }
121 }
122
123 geoData->getCoarseNodeGhostedLID(coarseIdx[0], coarseIdx[1], coarseIdx[2],
124 ghostedCoarseNodeCoarseLID);
125
126 aggId = ghostedCoarseNodeCoarseLIDs[ghostedCoarseNodeCoarseLID];
127 vertex2AggId[nodeIdx] = aggId;
128 procWinner[nodeIdx] = ghostedCoarseNodeCoarsePIDs[ghostedCoarseNodeCoarseLID];
129 aggStat[nodeIdx] = AGGREGATED;
130 --numNonAggregatedNodes;
131
132 } // Loop over fine points
133 } // BuildAggregates()
134
135
136 template <class LocalOrdinal, class GlobalOrdinal, class Node>
138 BuildGraph(const GraphBase& graph, RCP<IndexManager>& geoData, const LO dofsPerNode,
139 RCP<CrsGraph>& myGraph, RCP<const Map>& coarseCoordinatesFineMap,
140 RCP<const Map>& coarseCoordinatesMap) const {
141 Monitor m(*this, "BuildGraphP");
142
143 RCP<Teuchos::FancyOStream> out;
144 if(const char* dbg = std::getenv("MUELU_STRUCTUREDALGORITHM_DEBUG")) {
145 out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
146 out->setShowAllFrontMatter(false).setShowProcRank(true);
147 } else {
148 out = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()));
149 }
150
151 const bool coupled = geoData->isAggregationCoupled();
152
153 // Compute the number of coarse points needed to interpolate quantities to a fine point
154 int numInterpolationPoints = 0;
155 if(geoData->getInterpolationOrder() == 0) {
156 numInterpolationPoints = 1;
157 } else if(geoData->getInterpolationOrder() == 1) {
158 // Compute 2^numDimensions using bit logic to avoid round-off errors
159 numInterpolationPoints = 1 << geoData->getNumDimensions();
160 }
161 *out << "numInterpolationPoints=" << numInterpolationPoints << std::endl;
162
163 Array<LO> colIndex((geoData->getNumLocalCoarseNodes() + numInterpolationPoints*
164 (geoData->getNumLocalFineNodes() - geoData->getNumLocalCoarseNodes()))*dofsPerNode);
165 Array<size_t> rowPtr(geoData->getNumLocalFineNodes()*dofsPerNode + 1);
166 rowPtr[0] = 0;
167 ArrayRCP<size_t> nnzOnRow(geoData->getNumLocalFineNodes()*dofsPerNode);
168
169 *out << "Compute prolongatorGraph data" << std::endl;
170 if(geoData->getInterpolationOrder() == 0) {
171 ComputeGraphDataConstant(graph, geoData, dofsPerNode, numInterpolationPoints,
172 nnzOnRow, rowPtr, colIndex);
173 } else if(geoData->getInterpolationOrder() == 1) {
174 ComputeGraphDataLinear(graph, geoData, dofsPerNode, numInterpolationPoints,
175 nnzOnRow, rowPtr, colIndex);
176 }
177
178 // Compute graph's rowMap, colMap and domainMap
179 RCP<Map> rowMap = MapFactory::Build(graph.GetDomainMap(), dofsPerNode);
180 RCP<Map> colMap, domainMap;
181 *out << "Compute domain and column maps of the CrsGraph" << std::endl;
182 if(coupled){
183 *out << "Extract data for ghosted nodes" << std::endl;
184 Array<LO> ghostedCoarseNodeCoarseLIDs;
185 Array<int> ghostedCoarseNodeCoarsePIDs;
186 Array<GO> ghostedCoarseNodeCoarseGIDs;
187 geoData->getGhostedNodesData(graph.GetDomainMap(), ghostedCoarseNodeCoarseLIDs,
188 ghostedCoarseNodeCoarsePIDs, ghostedCoarseNodeCoarseGIDs);
189
190 // In this case we specify the global number of nodes on the coarse mesh
191 // as well as the GIDs needed on rank.
192 colMap = MapFactory::Build(graph.GetDomainMap()->lib(),
193 geoData->getNumGlobalCoarseNodes(),
194 ghostedCoarseNodeCoarseGIDs(),
195 graph.GetDomainMap()->getIndexBase(),
196 graph.GetDomainMap()->getComm());
197
198 LO coarseNodeIdx = 0;
199 Array<GO> coarseNodeCoarseGIDs, coarseNodeFineGIDs;
200 geoData->getCoarseNodesData(graph.GetDomainMap(), coarseNodeCoarseGIDs, coarseNodeFineGIDs);
201 for(LO nodeIdx = 0; nodeIdx < ghostedCoarseNodeCoarseGIDs.size(); ++nodeIdx) {
202 if(ghostedCoarseNodeCoarsePIDs[nodeIdx] == colMap->getComm()->getRank()) {
203 coarseNodeCoarseGIDs[coarseNodeIdx] = ghostedCoarseNodeCoarseGIDs[nodeIdx];
204 ++coarseNodeIdx;
205 }
206 }
207 domainMap = MapFactory::Build(graph.GetDomainMap()->lib(),
208 geoData->getNumGlobalCoarseNodes(),
209 coarseNodeCoarseGIDs(),
210 graph.GetDomainMap()->getIndexBase(),
211 graph.GetDomainMap()->getComm());
212 coarseCoordinatesMap = MapFactory::Build(graph.GetDomainMap()->lib(),
213 geoData->getNumGlobalCoarseNodes(),
214 coarseNodeCoarseGIDs(),
215 graph.GetDomainMap()->getIndexBase(),
216 graph.GetDomainMap()->getComm());
217 coarseCoordinatesFineMap = MapFactory::Build(graph.GetDomainMap()->lib(),
218 geoData->getNumGlobalCoarseNodes(),
219 coarseNodeFineGIDs(),
220 graph.GetDomainMap()->getIndexBase(),
221 graph.GetDomainMap()->getComm());
222 } else {
223 // In this case the map will compute the global number of nodes on the coarse mesh
224 // and it will assign GIDs to the local coarse nodes.
225 colMap = MapFactory::Build(graph.GetDomainMap()->lib(),
226 Teuchos::OrdinalTraits<GO>::invalid(),
227 geoData->getNumLocalCoarseNodes()*dofsPerNode,
228 graph.GetDomainMap()->getIndexBase(),
229 graph.GetDomainMap()->getComm());
230 domainMap = colMap;
231
232 Array<GO> coarseNodeCoarseGIDs(geoData->getNumLocalCoarseNodes());
233 Array<GO> coarseNodeFineGIDs(geoData->getNumLocalCoarseNodes());
234 geoData->getCoarseNodesData(graph.GetDomainMap(), coarseNodeCoarseGIDs, coarseNodeFineGIDs);
235 coarseCoordinatesMap = MapFactory::Build(graph.GetDomainMap()->lib(),
236 Teuchos::OrdinalTraits<GO>::invalid(),
237 geoData->getNumLocalCoarseNodes(),
238 graph.GetDomainMap()->getIndexBase(),
239 graph.GetDomainMap()->getComm());
240 coarseCoordinatesFineMap = MapFactory::Build(graph.GetDomainMap()->lib(),
241 Teuchos::OrdinalTraits<GO>::invalid(),
242 coarseNodeFineGIDs(),
243 graph.GetDomainMap()->getIndexBase(),
244 graph.GetDomainMap()->getComm());
245 }
246
247 *out << "Call constructor of CrsGraph" << std::endl;
248 myGraph = CrsGraphFactory::Build(rowMap,
249 colMap,
250 nnzOnRow);
251
252 *out << "Fill CrsGraph" << std::endl;
253 LO rowIdx = 0;
254 for(LO nodeIdx = 0; nodeIdx < geoData->getNumLocalFineNodes(); ++nodeIdx) {
255 for(LO dof = 0; dof < dofsPerNode; ++dof) {
256 rowIdx = nodeIdx*dofsPerNode + dof;
257 myGraph->insertLocalIndices(rowIdx, colIndex(rowPtr[rowIdx], nnzOnRow[rowIdx]) );
258 }
259 }
260
261 *out << "Call fillComplete on CrsGraph" << std::endl;
262 myGraph->fillComplete(domainMap, rowMap);
263 *out << "Prolongator CrsGraph computed" << std::endl;
264
265 } // BuildGraph()
266
267
268 template <class LocalOrdinal, class GlobalOrdinal, class Node>
270 ComputeGraphDataConstant(const GraphBase& graph, RCP<IndexManager>& geoData,
271 const LO dofsPerNode, const int /* numInterpolationPoints */,
272 ArrayRCP<size_t>& nnzOnRow, Array<size_t>& rowPtr,
273 Array<LO>& colIndex) const {
274
275 RCP<Teuchos::FancyOStream> out;
276 if(const char* dbg = std::getenv("MUELU_STRUCTUREDALGORITHM_DEBUG")) {
277 out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
278 out->setShowAllFrontMatter(false).setShowProcRank(true);
279 } else {
280 out = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()));
281 }
282
283 Array<LO> ghostedCoarseNodeCoarseLIDs;
284 Array<int> ghostedCoarseNodeCoarsePIDs;
285 Array<GO> ghostedCoarseNodeCoarseGIDs;
286 geoData->getGhostedNodesData(graph.GetDomainMap(), ghostedCoarseNodeCoarseLIDs,
287 ghostedCoarseNodeCoarsePIDs, ghostedCoarseNodeCoarseGIDs);
288
289 LO ghostedCoarseNodeCoarseLID, rem, rate;
290 Array<LO> ghostedIdx(3), coarseIdx(3);
291 for(LO nodeIdx = 0; nodeIdx < geoData->getNumLocalFineNodes(); ++nodeIdx) {
292
293 // Compute coarse ID associated with fine LID
294 geoData->getFineNodeGhostedTuple(nodeIdx, ghostedIdx[0], ghostedIdx[1], ghostedIdx[2]);
295
296 for(int dim = 0; dim < 3; ++dim) {
297 if(geoData->isSingleCoarsePoint()
298 && (geoData->getLocalFineNodesInDir(dim) - 1 < geoData->getCoarseningRate(dim))) {
299 coarseIdx[dim] = 0;
300 } else {
301 coarseIdx[dim] = ghostedIdx[dim] / geoData->getCoarseningRate(dim);
302 rem = ghostedIdx[dim] % geoData->getCoarseningRate(dim);
303 if(ghostedIdx[dim] - geoData->getOffset(dim)
304 < geoData->getLocalFineNodesInDir(dim) - geoData->getCoarseningEndRate(dim)) {
305 rate = geoData->getCoarseningRate(dim);
306 } else {
307 rate = geoData->getCoarseningEndRate(dim);
308 }
309 if(rem > (rate / 2)) {++coarseIdx[dim];}
310 if( (geoData->getStartGhostedCoarseNode(dim)*geoData->getCoarseningRate(dim)
311 > geoData->getStartIndex(dim)) && geoData->isAggregationCoupled() ) {
312 --coarseIdx[dim];
313 }
314 }
315 }
316
317 geoData->getCoarseNodeGhostedLID(coarseIdx[0], coarseIdx[1], coarseIdx[2],
318 ghostedCoarseNodeCoarseLID);
319
320 for(LO dof = 0; dof < dofsPerNode; ++dof) {
321 nnzOnRow[nodeIdx*dofsPerNode + dof] = 1;
322 rowPtr[nodeIdx*dofsPerNode + dof + 1] = rowPtr[nodeIdx*dofsPerNode + dof] + 1;
323 colIndex[rowPtr[nodeIdx*dofsPerNode + dof]] =
324 ghostedCoarseNodeCoarseLIDs[ghostedCoarseNodeCoarseLID]*dofsPerNode + dof;
325 }
326 } // Loop over fine points
327
328 } // ComputeGraphDataConstant()
329
330
331 template <class LocalOrdinal, class GlobalOrdinal, class Node>
333 ComputeGraphDataLinear(const GraphBase& /* graph */, RCP<IndexManager>& geoData,
334 const LO dofsPerNode, const int numInterpolationPoints,
335 ArrayRCP<size_t>& nnzOnRow, Array<size_t>& rowPtr,
336 Array<LO>& colIndex) const {
337
338 RCP<Teuchos::FancyOStream> out;
339 if(const char* dbg = std::getenv("MUELU_STRUCTUREDALGORITHM_DEBUG")) {
340 out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
341 out->setShowAllFrontMatter(false).setShowProcRank(true);
342 } else {
343 out = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()));
344 }
345
346 const bool coupled = geoData->isAggregationCoupled();
347 const int numDimensions = geoData->getNumDimensions();
348 Array<LO> ghostedIdx(3,0);
349 Array<LO> coarseIdx(3,0);
350 Array<LO> ijkRem(3,0);
351 const LO coarsePointOffset[8][3] = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {1, 1, 0},
352 {0, 0, 1}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}};
353
354 for(LO nodeIdx = 0; nodeIdx < geoData->getNumLocalFineNodes(); ++nodeIdx) {
355
356 // Compute coarse ID associated with fine LID
357 geoData->getFineNodeGhostedTuple(nodeIdx, ghostedIdx[0], ghostedIdx[1], ghostedIdx[2]);
358 for(int dim=0; dim < numDimensions; dim++){
359 coarseIdx[dim] = ghostedIdx[dim] / geoData->getCoarseningRate(dim);
360 ijkRem[dim] = ghostedIdx[dim] % geoData->getCoarseningRate(dim);
361 if(coupled) {
362 if (geoData->getStartGhostedCoarseNode(dim)*geoData->getCoarseningRate(dim)
363 > geoData->getStartIndex(dim)) {
364 --coarseIdx[dim];
365 }
366 } else {
367 if(ghostedIdx[dim] == geoData->getLocalFineNodesInDir(dim) - 1) {
368 coarseIdx[dim] = geoData->getLocalCoarseNodesInDir(dim) - 1;
369 }
370 }
371 }
372
373 // Fill Graph
374 // Check if Fine node lies on Coarse Node
375 bool allCoarse = true;
376 Array<bool> isCoarse(numDimensions);
377 for(int dim = 0; dim < numDimensions; ++dim) {
378 isCoarse[dim] = false;
379 if(ijkRem[dim] == 0)
380 isCoarse[dim] = true;
381
382 if(coupled){
383 if( ghostedIdx[dim]-geoData->getOffset(dim) == geoData->getLocalFineNodesInDir(dim)-1 &&
384 geoData->getMeshEdge(dim*2+1) )
385 isCoarse[dim] = true;
386 } else {
387 if( ghostedIdx[dim]-geoData->getOffset(dim) == geoData->getLocalFineNodesInDir(dim)-1)
388 isCoarse[dim] = true;
389 }
390
391 if(!isCoarse[dim])
392 allCoarse = false;
393 }
394
395 LO rowIdx = 0, colIdx = 0;
396 if(allCoarse) {
397 for(LO dof = 0; dof < dofsPerNode; ++dof) {
398 rowIdx = nodeIdx*dofsPerNode + dof;
399 nnzOnRow[rowIdx] = 1;
400 rowPtr[rowIdx + 1] = rowPtr[rowIdx] + 1;
401
402 // Fine node lies on Coarse node, easy case, we only need the LID of the coarse node.
403 geoData->getCoarseNodeGhostedLID(coarseIdx[0], coarseIdx[1], coarseIdx[2], colIdx);
404 colIndex[rowPtr[rowIdx]] = colIdx*dofsPerNode + dof;
405 }
406 } else {
407 // Harder case, we need the LIDs of all the coarse nodes contributing to the interpolation
408 for(int dim = 0; dim < numDimensions; ++dim) {
409 if(coarseIdx[dim] == geoData->getGhostedNodesInDir(dim) - 1)
410 --coarseIdx[dim];
411 }
412
413 for(LO dof = 0; dof < dofsPerNode; ++dof) {
414 // at the current node.
415 rowIdx = nodeIdx*dofsPerNode + dof;
416 nnzOnRow[rowIdx] = Teuchos::as<size_t>( numInterpolationPoints );
417 rowPtr[rowIdx + 1] = rowPtr[rowIdx] + Teuchos::as<LO>(numInterpolationPoints);
418 // Compute Coarse Node LID
419 for(LO interpIdx = 0; interpIdx < numInterpolationPoints; ++interpIdx) {
420 geoData->getCoarseNodeGhostedLID(coarseIdx[0] + coarsePointOffset[interpIdx][0],
421 coarseIdx[1] + coarsePointOffset[interpIdx][1],
422 coarseIdx[2] + coarsePointOffset[interpIdx][2],
423 colIdx);
424 colIndex[rowPtr[rowIdx] + interpIdx] = colIdx*dofsPerNode + dof;
425 } // Loop over numInterpolationPoints
426 } // Loop over dofsPerNode
427 }
428 } // Loop over fine points
429 } // ComputeGraphDataLinear()
430
431} // end namespace
432
433
434#endif /* MUELU_AGGREGATIONSTRUCTUREDALGORITHM_DEF_HPP_ */
Container class for aggregation information.
RCP< IndexManager > & GetIndexManager()
Get the index manager used by structured aggregation algorithms.
const RCP< LOMultiVector > & GetVertex2AggId() const
Returns constant vector that maps local node IDs to local aggregates IDs.
const RCP< LOVector > & GetProcWinner() const
Returns constant vector that maps local node IDs to owning processor IDs.
void BuildGraph(const GraphBase &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, RCP< CrsGraph > &myGraph, RCP< const Map > &coarseCoordinatesFineMap, RCP< const Map > &coarseCoordinatesMap) const
Local aggregation.
void ComputeGraphDataConstant(const GraphBase &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, const int numInterpolationPoints, ArrayRCP< size_t > &nnzOnRow, Array< size_t > &rowPtr, Array< LO > &colIndex) const
void BuildAggregates(const Teuchos::ParameterList &params, const GraphBase &graph, Aggregates &aggregates, std::vector< unsigned > &aggStat, LO &numNonAggregatedNodes) const
Local aggregation.
void ComputeGraphDataLinear(const GraphBase &graph, RCP< IndexManager > &geoData, const LO dofsPerNode, const int numInterpolationPoints, ArrayRCP< size_t > &nnzOnRow, Array< size_t > &rowPtr, Array< LO > &colIndex) const
MueLu representation of a graph.
virtual const RCP< const Map > GetDomainMap() const =0
Timer to be used in non-factories.
Namespace for MueLu classes and methods.