53 #ifndef MUELU_AGGREGATIONEXPORTFACTORY_DEF_HPP_
54 #define MUELU_AGGREGATIONEXPORTFACTORY_DEF_HPP_
57 #include <Xpetra_CrsMatrixWrap.hpp>
59 #include <Xpetra_MultiVectorFactory.hpp>
62 #include "MueLu_Aggregates.hpp"
64 #include "MueLu_AmalgamationFactory.hpp"
65 #include "MueLu_AmalgamationInfo.hpp"
77 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
81 std::string output_msg =
82 "Output filename template (%TIMESTEP is replaced by \'Output file: time step\' variable,"
83 "%ITER is replaced by \'Output file: iter\' variable, %LEVELID is replaced level id, %PROCID is replaced by processor id)";
84 std::string output_def =
"aggs_level%LEVELID_proc%PROCID.out";
93 validParamList->
set<std::string>(
"Output filename", output_def, output_msg);
94 validParamList->
set<
int>(
"Output file: time step", 0,
"time step variable for output file name");
95 validParamList->
set<
int>(
"Output file: iter", 0,
"nonlinear iteration variable for output file name");
98 validParamList->
set<std::string>(
"aggregation: output filename",
"",
"filename for VTK-style visualization output");
99 validParamList->
set<
int>(
"aggregation: output file: time step", 0,
"time step variable for output file name");
100 validParamList->
set<
int>(
"aggregation: output file: iter", 0,
"nonlinear iteration variable for output file name");
101 validParamList->
set<std::string>(
"aggregation: output file: agg style",
"Point Cloud",
"style of aggregate visualization for VTK output");
102 validParamList->
set<
bool>(
"aggregation: output file: fine graph edges",
false,
"Whether to draw all fine node connections along with the aggregates.");
103 validParamList->
set<
bool>(
"aggregation: output file: coarse graph edges",
false,
"Whether to draw all coarse node connections along with the aggregates.");
104 validParamList->
set<
bool>(
"aggregation: output file: build colormap",
false,
"Whether to output a random colormap for ParaView in a separate XML file.");
105 return validParamList;
108 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
110 Input(fineLevel,
"Aggregates");
111 Input(fineLevel,
"DofsPerNode");
112 Input(fineLevel,
"UnAmalgamationInfo");
116 if (pL.
isParameter(
"aggregation: output filename") && pL.
get<std::string>(
"aggregation: output filename").length()) {
117 Input(fineLevel,
"Coordinates");
118 Input(fineLevel,
"A");
119 Input(fineLevel,
"Graph");
120 if (pL.
get<
bool>(
"aggregation: output file: coarse graph edges")) {
121 Input(coarseLevel,
"Coordinates");
122 Input(coarseLevel,
"A");
123 Input(coarseLevel,
"Graph");
128 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
136 int numProcs = comm->getSize();
137 int myRank = comm->getRank();
138 string masterFilename = pL.
get<std::string>(
"aggregation: output filename");
139 string pvtuFilename =
"";
140 string localFilename = pL.get<std::string>(
"Output filename");
141 string filenameToWrite;
143 doCoarseGraphEdges_ = pL.get<
bool>(
"aggregation: output file: coarse graph edges");
144 doFineGraphEdges_ = pL.get<
bool>(
"aggregation: output file: fine graph edges");
145 if (masterFilename.length()) {
147 filenameToWrite = masterFilename;
148 if (filenameToWrite.rfind(
".vtu") == string::npos)
149 filenameToWrite.append(
".vtu");
150 if (numProcs > 1 && filenameToWrite.rfind(
"%PROCID") == string::npos)
151 filenameToWrite.insert(filenameToWrite.rfind(
".vtu"),
"-proc%PROCID");
153 filenameToWrite = localFilename;
154 LocalOrdinal DofsPerNode = Get<LocalOrdinal>(fineLevel,
"DofsPerNode");
158 if (doCoarseGraphEdges_)
159 Ac = Get<RCP<Matrix> >(coarseLevel,
"A");
164 if (doFineGraphEdges_)
165 fineGraph = Get<RCP<LWGraph> >(fineLevel,
"Graph");
166 if (doCoarseGraphEdges_)
167 coarseGraph = Get<RCP<LWGraph> >(coarseLevel,
"Graph");
170 coords = Get<RCP<CoordinateMultiVector> >(fineLevel,
"Coordinates");
172 if (doCoarseGraphEdges_)
173 coordsCoarse = Get<RCP<CoordinateMultiVector> >(coarseLevel,
"Coordinates");
174 dims_ = coords->getNumVectors();
176 if (aggregates->AggregatesCrossProcessors()) {
180 coords = ghostedCoords;
181 coords_ = ghostedCoords;
183 if (doCoarseGraphEdges_) {
186 ghostedCoords->doImport(*coordsCoarse, *coordImporter,
Xpetra::INSERT);
187 coordsCoarse = ghostedCoords;
188 coordsCoarse_ = ghostedCoords;
192 GetOStream(
Runtime0) <<
"AggregationExportFactory: DofsPerNode: " << DofsPerNode << std::endl;
198 vertex2AggId_ = vertex2AggId;
201 std::vector<GlobalOrdinal> numAggsGlobal(numProcs, 0);
202 std::vector<GlobalOrdinal> numAggsLocal(numProcs, 0);
203 std::vector<GlobalOrdinal> minGlobalAggId(numProcs, 0);
205 numAggsLocal[myRank] = aggregates->GetNumAggregates();
206 Teuchos::reduceAll(*comm,
Teuchos::REDUCE_SUM, numProcs, &numAggsLocal[0], &numAggsGlobal[0]);
207 for (
int i = 1; i < Teuchos::as<int>(numAggsGlobal.size()); ++i) {
208 numAggsGlobal[i] += numAggsGlobal[i - 1];
209 minGlobalAggId[i] = numAggsGlobal[i - 1];
214 aggsOffset_ = minGlobalAggId[myRank];
217 amalgInfo->UnamalgamateAggregates(*aggregates, aggStart, aggToRowMap);
218 int timeStep = pL.
get<
int>(
"Output file: time step");
219 int iter = pL.get<
int>(
"Output file: iter");
225 string masterStem =
"";
227 masterStem = filenameToWrite.substr(0, filenameToWrite.rfind(
".vtu"));
228 masterStem = this->
replaceAll(masterStem,
"%PROCID",
"");
230 pvtuFilename = masterStem +
"-master.pvtu";
231 string baseFname = filenameToWrite;
233 GetOStream(
Runtime0) <<
"AggregationExportFactory: outputfile \"" << filenameToWrite <<
"\"" << std::endl;
234 ofstream fout(filenameToWrite.c_str());
235 GO numAggs = aggregates->GetNumAggregates();
237 GO indexBase = aggregates->GetMap()->getIndexBase();
238 GO offset = amalgInfo->GlobalOffset();
239 vector<GlobalOrdinal> nodeIds;
240 for (
int i = 0; i < numAggs; ++i) {
241 fout <<
"Agg " << minGlobalAggId[myRank] + i <<
" Proc " << myRank <<
":";
244 for (
int k = aggStart[i]; k < aggStart[i + 1]; ++k) {
245 nodeIds.push_back((aggToRowMap[k] - offset - indexBase) / DofsPerNode + indexBase);
249 std::sort(nodeIds.begin(), nodeIds.end());
250 typename std::vector<GlobalOrdinal>::iterator endLocation = std::unique(nodeIds.begin(), nodeIds.end());
251 nodeIds.erase(endLocation, nodeIds.end());
254 for (
typename std::vector<GlobalOrdinal>::iterator printIt = nodeIds.begin(); printIt != nodeIds.end(); printIt++)
255 fout <<
" " << *printIt;
264 numNodes_ = coords->getLocalLength();
266 aggSizes_ = aggregates->ComputeAggregateSizesArrayRCP();
268 string aggStyle =
"Point Cloud";
270 aggStyle = pL.get<
string>(
"aggregation: output file: agg style");
271 }
catch (std::exception& e) {
273 vector<int> vertices;
274 vector<int> geomSizes;
276 nodeMap_ = Amat->getMap();
278 isRoot_.push_back(aggregates->IsRoot(i));
282 if (myRank == 0 && (numProcs != 1 || doCoarseGraphEdges_ || doFineGraphEdges_)) {
283 ofstream pvtu(pvtuFilename.c_str());
284 writePVTU_(pvtu, baseFname, numProcs);
287 if (aggStyle ==
"Point Cloud")
288 this->doPointCloud(vertices, geomSizes, numAggs_, numNodes_);
289 else if (aggStyle ==
"Jacks")
290 this->doJacks(vertices, geomSizes, numAggs_, numNodes_, isRoot_, vertex2AggId_);
291 else if (aggStyle ==
"Jacks++")
292 doJacksPlus_(vertices, geomSizes);
293 else if (aggStyle ==
"Convex Hulls")
294 doConvexHulls(vertices, geomSizes);
296 GetOStream(
Warnings0) <<
" Unrecognized agg style.\n Possible values are Point Cloud, Jacks, Jacks++, and Convex Hulls.\n Defaulting to Point Cloud." << std::endl;
297 aggStyle =
"Point Cloud";
298 this->doPointCloud(vertices, geomSizes, numAggs_, numNodes_);
300 writeFile_(fout, aggStyle, vertices, geomSizes);
301 if (doCoarseGraphEdges_) {
302 string fname = filenameToWrite;
303 string cEdgeFile = fname.insert(fname.rfind(
".vtu"),
"-coarsegraph");
304 std::ofstream edgeStream(cEdgeFile.c_str());
305 doGraphEdges_(edgeStream, Ac, coarseGraph,
false, DofsPerNode);
307 if (doFineGraphEdges_) {
308 string fname = filenameToWrite;
309 string fEdgeFile = fname.insert(fname.rfind(
".vtu"),
"-finegraph");
310 std::ofstream edgeStream(fEdgeFile.c_str());
311 doGraphEdges_(edgeStream, Amat, fineGraph,
true, DofsPerNode);
313 if (myRank == 0 && pL.get<
bool>(
"aggregation: output file: build colormap")) {
320 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
325 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
332 this->doConvexHulls2D(vertices, geomSizes, numAggs_, numNodes_, isRoot_, vertex2AggId_, xCoords, yCoords);
334 zCoords = coords_->getData(2);
335 this->doConvexHulls3D(vertices, geomSizes, numAggs_, numNodes_, isRoot_, vertex2AggId_, xCoords, yCoords, zCoords);
339 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
344 vector<pair<int, int> > vert1;
345 vector<pair<int, int> > vert2;
351 zCoords = coords_->getData(2);
357 cz = coordsCoarse_->getData(2);
359 if (A->isGloballyIndexed()) {
363 A->getGlobalRowView(globRow, indices, values);
364 auto neighbors = G->getNeighborVertices((
LocalOrdinal)globRow);
367 while (gEdge !=
int(neighbors.length)) {
369 if (neighbors(gEdge) == indices[aEdge]) {
371 vert1.push_back(pair<int, int>(
int(globRow), neighbors(gEdge)));
376 vert2.push_back(pair<int, int>(
int(globRow), neighbors(gEdge)));
381 vert1.push_back(pair<int, int>(
int(globRow), neighbors(gEdge)));
390 A->getLocalRowView(locRow, indices, values);
391 auto neighbors = G->getNeighborVertices(locRow);
395 while (gEdge !=
int(neighbors.length)) {
397 if (neighbors(gEdge) == indices[aEdge]) {
398 vert1.push_back(pair<int, int>(locRow, neighbors(gEdge)));
402 vert2.push_back(pair<int, int>(locRow, neighbors(gEdge)));
406 vert1.push_back(pair<int, int>(locRow, neighbors(gEdge)));
412 for (
size_t i = 0; i < vert1.size(); i++) {
413 if (vert1[i].first > vert1[i].second) {
414 int temp = vert1[i].first;
415 vert1[i].first = vert1[i].second;
416 vert1[i].second = temp;
419 for (
size_t i = 0; i < vert2.size(); i++) {
420 if (vert2[i].first > vert2[i].second) {
421 int temp = vert2[i].first;
422 vert2[i].first = vert2[i].second;
423 vert2[i].second = temp;
426 sort(vert1.begin(), vert1.end());
427 vector<pair<int, int> >::iterator newEnd = unique(vert1.begin(), vert1.end());
428 vert1.erase(newEnd, vert1.end());
429 sort(vert2.begin(), vert2.end());
430 newEnd = unique(vert2.begin(), vert2.end());
431 vert2.erase(newEnd, vert2.end());
433 points1.reserve(2 * vert1.size());
434 for (
size_t i = 0; i < vert1.size(); i++) {
435 points1.push_back(vert1[i].first);
436 points1.push_back(vert1[i].second);
439 points2.reserve(2 * vert2.size());
440 for (
size_t i = 0; i < vert2.size(); i++) {
441 points2.push_back(vert2[i].first);
442 points2.push_back(vert2[i].second);
444 vector<int> unique1 = this->makeUnique(points1);
445 vector<int> unique2 = this->makeUnique(points2);
446 fout <<
"<VTKFile type=\"UnstructuredGrid\" byte_order=\"LittleEndian\">" << endl;
447 fout <<
" <UnstructuredGrid>" << endl;
448 fout <<
" <Piece NumberOfPoints=\"" << unique1.size() + unique2.size() <<
"\" NumberOfCells=\"" << vert1.size() + vert2.size() <<
"\">" << endl;
449 fout <<
" <PointData Scalars=\"Node Aggregate Processor\">" << endl;
450 fout <<
" <DataArray type=\"Int32\" Name=\"Node\" format=\"ascii\">" << endl;
453 for (
size_t i = 0; i < unique1.size(); i++) {
454 fout << CONTRAST_1_ <<
" ";
459 for (
size_t i = 0; i < unique2.size(); i++) {
460 fout << CONTRAST_2_ <<
" ";
461 if ((i + 2 * vert1.size()) % 25 == 24)
466 fout <<
" </DataArray>" << endl;
467 fout <<
" <DataArray type=\"Int32\" Name=\"Aggregate\" format=\"ascii\">" << endl;
469 for (
size_t i = 0; i < unique1.size(); i++) {
470 fout << CONTRAST_1_ <<
" ";
475 for (
size_t i = 0; i < unique2.size(); i++) {
476 fout << CONTRAST_2_ <<
" ";
477 if ((i + 2 * vert2.size()) % 25 == 24)
482 fout <<
" </DataArray>" << endl;
483 fout <<
" <DataArray type=\"Int32\" Name=\"Processor\" format=\"ascii\">" << endl;
485 for (
size_t i = 0; i < unique1.size() + unique2.size(); i++) {
486 fout << myRank_ <<
" ";
492 fout <<
" </DataArray>" << endl;
493 fout <<
" </PointData>" << endl;
494 fout <<
" <Points>" << endl;
495 fout <<
" <DataArray type=\"Float64\" NumberOfComponents=\"3\" format=\"ascii\">" << endl;
497 for (
size_t i = 0; i < unique1.size(); i++) {
499 fout << xCoords[unique1[i]] <<
" " << yCoords[unique1[i]] <<
" ";
501 fout << zCoords[unique1[i]] <<
" ";
508 fout << cx[unique1[i]] <<
" " << cy[unique1[i]] <<
" ";
510 fout << cz[unique1[i]] <<
" ";
518 for (
size_t i = 0; i < unique2.size(); i++) {
520 fout << xCoords[unique2[i]] <<
" " << yCoords[unique2[i]] <<
" ";
522 fout << zCoords[unique2[i]] <<
" ";
529 fout << cx[unique2[i]] <<
" " << cy[unique2[i]] <<
" ";
531 fout << cz[unique2[i]] <<
" ";
534 if ((i + unique1.size()) % 2)
540 fout <<
" </DataArray>" << endl;
541 fout <<
" </Points>" << endl;
542 fout <<
" <Cells>" << endl;
543 fout <<
" <DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">" << endl;
545 for (
size_t i = 0; i < points1.size(); i++) {
546 fout << points1[i] <<
" ";
551 for (
size_t i = 0; i < points2.size(); i++) {
552 fout << points2[i] + unique1.size() <<
" ";
553 if ((i + points1.size()) % 10 == 9)
558 fout <<
" </DataArray>" << endl;
559 fout <<
" <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">" << endl;
562 for (
size_t i = 0; i < vert1.size() + vert2.size(); i++) {
564 fout << offset <<
" ";
570 fout <<
" </DataArray>" << endl;
571 fout <<
" <DataArray type=\"Int32\" Name=\"types\" format=\"ascii\">" << endl;
573 for (
size_t i = 0; i < vert1.size() + vert2.size(); i++) {
580 fout <<
" </DataArray>" << endl;
581 fout <<
" </Cells>" << endl;
582 fout <<
" </Piece>" << endl;
583 fout <<
" </UnstructuredGrid>" << endl;
584 fout <<
"</VTKFile>" << endl;
587 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
595 zCoords = coords_->getData(2);
597 vector<int> uniqueFine = this->makeUnique(vertices);
599 fout <<
"<!--" << styleName <<
" Aggregates Visualization-->" << endl;
600 fout <<
"<VTKFile type=\"UnstructuredGrid\" byte_order=\"LittleEndian\">" << endl;
601 fout <<
" <UnstructuredGrid>" << endl;
602 fout <<
" <Piece NumberOfPoints=\"" << uniqueFine.size() <<
"\" NumberOfCells=\"" << geomSizes.size() <<
"\">" << endl;
603 fout <<
" <PointData Scalars=\"Node Aggregate Processor\">" << endl;
604 fout <<
" <DataArray type=\"Int32\" Name=\"Node\" format=\"ascii\">" << endl;
608 for (
size_t i = 0; i < uniqueFine.size(); i++) {
610 fout << uniqueFine[i] <<
" ";
612 fout << nodeMap_->getGlobalElement(uniqueFine[i]) <<
" ";
618 fout <<
" </DataArray>" << endl;
619 fout <<
" <DataArray type=\"Int32\" Name=\"Aggregate\" format=\"ascii\">" << endl;
621 for (
size_t i = 0; i < uniqueFine.size(); i++) {
622 if (vertex2AggId_[uniqueFine[i]] == -1)
623 fout << vertex2AggId_[uniqueFine[i]] <<
" ";
625 fout << aggsOffset_ + vertex2AggId_[uniqueFine[i]] <<
" ";
631 fout <<
" </DataArray>" << endl;
632 fout <<
" <DataArray type=\"Int32\" Name=\"Processor\" format=\"ascii\">" << endl;
634 for (
size_t i = 0; i < uniqueFine.size(); i++) {
635 fout << myRank_ <<
" ";
641 fout <<
" </DataArray>" << endl;
642 fout <<
" </PointData>" << endl;
643 fout <<
" <Points>" << endl;
644 fout <<
" <DataArray type=\"Float64\" NumberOfComponents=\"3\" format=\"ascii\">" << endl;
646 for (
size_t i = 0; i < uniqueFine.size(); i++) {
647 fout << xCoords[uniqueFine[i]] <<
" " << yCoords[uniqueFine[i]] <<
" ";
651 fout << zCoords[uniqueFine[i]] <<
" ";
657 fout <<
" </DataArray>" << endl;
658 fout <<
" </Points>" << endl;
659 fout <<
" <Cells>" << endl;
660 fout <<
" <DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">" << endl;
662 for (
size_t i = 0; i < vertices.size(); i++) {
663 fout << vertices[i] <<
" ";
669 fout <<
" </DataArray>" << endl;
670 fout <<
" <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">" << endl;
673 for (
size_t i = 0; i < geomSizes.size(); i++) {
674 accum += geomSizes[i];
675 fout << accum <<
" ";
681 fout <<
" </DataArray>" << endl;
682 fout <<
" <DataArray type=\"Int32\" Name=\"types\" format=\"ascii\">" << endl;
684 for (
size_t i = 0; i < geomSizes.size(); i++) {
685 switch (geomSizes[i]) {
703 fout <<
" </DataArray>" << endl;
704 fout <<
" </Cells>" << endl;
705 fout <<
" </Piece>" << endl;
706 fout <<
" </UnstructuredGrid>" << endl;
707 fout <<
"</VTKFile>" << endl;
710 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
714 ofstream color(
"random-colormap.xml");
715 color <<
"<ColorMap name=\"MueLu-Random\" space=\"RGB\">" << endl;
718 color <<
" <Point x=\"" << CONTRAST_1_ <<
"\" o=\"1\" r=\"1\" g=\"0\" b=\"0\"/>" << endl;
719 color <<
" <Point x=\"" << CONTRAST_2_ <<
"\" o=\"1\" r=\"1\" g=\"0.6\" b=\"0\"/>" << endl;
720 color <<
" <Point x=\"" << CONTRAST_3_ <<
"\" o=\"1\" r=\"1\" g=\"1\" b=\"0\"/>" << endl;
722 for (
int i = 0; i < 5000; i += 4) {
723 color <<
" <Point x=\"" << i <<
"\" o=\"1\" r=\"" << (rand() % 50) / 256.0 <<
"\" g=\"" << (rand() % 256) / 256.0 <<
"\" b=\"" << (rand() % 256) / 256.0 <<
"\"/>" << endl;
725 color <<
"</ColorMap>" << endl;
727 }
catch (std::exception& e) {
728 GetOStream(
Warnings0) <<
" Error while building colormap file: " << e.what() << endl;
732 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
738 pvtu <<
"<VTKFile type=\"PUnstructuredGrid\" byte_order=\"LittleEndian\">" << endl;
739 pvtu <<
" <PUnstructuredGrid GhostLevel=\"0\">" << endl;
740 pvtu <<
" <PPointData Scalars=\"Node Aggregate Processor\">" << endl;
741 pvtu <<
" <PDataArray type=\"Int32\" Name=\"Node\"/>" << endl;
742 pvtu <<
" <PDataArray type=\"Int32\" Name=\"Aggregate\"/>" << endl;
743 pvtu <<
" <PDataArray type=\"Int32\" Name=\"Processor\"/>" << endl;
744 pvtu <<
" </PPointData>" << endl;
745 pvtu <<
" <PPoints>" << endl;
746 pvtu <<
" <PDataArray type=\"Float64\" NumberOfComponents=\"3\"/>" << endl;
747 pvtu <<
" </PPoints>" << endl;
748 for (
int i = 0; i < numProcs; i++) {
750 pvtu <<
" <Piece Source=\"" << this->
replaceAll(baseFname,
"%PROCID",
toString(i)) <<
"\"/>" << endl;
753 if (doFineGraphEdges_) {
754 for (
int i = 0; i < numProcs; i++) {
756 pvtu <<
" <Piece Source=\"" << fn.insert(fn.rfind(
".vtu"),
"-finegraph") <<
"\"/>" << endl;
759 if (doCoarseGraphEdges_) {
760 for (
int i = 0; i < numProcs; i++) {
762 pvtu <<
" <Piece Source=\"" << fn.insert(fn.rfind(
".vtu"),
"-coarsegraph") <<
"\"/>" << endl;
765 pvtu <<
" </PUnstructuredGrid>" << endl;
766 pvtu <<
"</VTKFile>" << endl;
Important warning messages (one line)
MueLu::DefaultLocalOrdinal LocalOrdinal
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
static Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &map, size_t NumVectors, bool zeroOut=true)
T & get(const std::string &name, T def_value)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
One-liner description of what is happening.
void doConvexHulls(std::vector< int > &vertices, std::vector< int > &geomSizes) const
void writeFile_(std::ofstream &fout, std::string styleName, std::vector< int > &vertices, std::vector< int > &geomSizes) const
void sort(View &view, const size_t &size)
bool isParameter(const std::string &name) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void writePVTU_(std::ofstream &pvtu, std::string baseFname, int numProcs) const
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
void doGraphEdges_(std::ofstream &fout, Teuchos::RCP< Matrix > &A, Teuchos::RCP< LWGraph > &G, bool fine, int dofs) const
int GetLevelID() const
Return level number.
Exception throws to report errors in the internal logical of the program.
void doJacksPlus_(std::vector< int > &vertices, std::vector< int > &geomSizes) const
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void replaceAll(std::string &str, const std::string &from, const std::string &to)
static RCP< Import< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &source, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
void buildColormap_() const