MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_CoarseningVisualizationFactory_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 
47 #ifndef MUELU_COARSENINGVISUALIZATIONFACTORY_DEF_HPP_
48 #define MUELU_COARSENINGVISUALIZATIONFACTORY_DEF_HPP_
49 
50 #include <Xpetra_Matrix.hpp>
51 #include <Xpetra_ImportFactory.hpp>
52 #include <Xpetra_MultiVectorFactory.hpp>
54 #include "MueLu_Level.hpp"
55 
56 namespace MueLu {
57 
58 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
61 
62  validParamList->set<int>("visualization: start level", 0, "visualize only levels with level ids greater or equal than start level"); // Remove me?
63 
64  validParamList->set<RCP<const FactoryBase> >("P", Teuchos::null, "Prolongator factory. The user has to declare either P or Ptent but not both at the same time.");
65  validParamList->set<RCP<const FactoryBase> >("Ptent", Teuchos::null, "Tentative prolongator factory. The user has to declare either P or Ptent as input but not both at the same time");
66  validParamList->set<RCP<const FactoryBase> >("Coordinates", Teuchos::null, "Factory for Coordinates.");
67  validParamList->set<RCP<const FactoryBase> >("Graph", Teuchos::null, "Factory for Graph.");
68 
69  return validParamList;
70 }
71 
72 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
74  this->Input(fineLevel, "Coordinates");
75 
76  const ParameterList &pL = this->GetParameterList();
77  TEUCHOS_TEST_FOR_EXCEPTION(pL.isParameter("P") && GetFactory("P") != Teuchos::null &&
78  pL.isParameter("Ptent") && GetFactory("Ptent") != Teuchos::null,
80  "You must not declare both P and Ptent. Use only once for visualization.");
81  TEUCHOS_TEST_FOR_EXCEPTION(GetFactory("P") == Teuchos::null && GetFactory("Ptent") == Teuchos::null, Exceptions::RuntimeError,
82  "You have to either declare P or Ptent for visualization, but not both.");
83 
84  if (GetFactory("P") != Teuchos::null && GetFactory("Ptent") == Teuchos::null)
85  this->Input(coarseLevel, "P");
86  else if (GetFactory("Ptent") != Teuchos::null && GetFactory("P") == Teuchos::null)
87  this->Input(coarseLevel, "Ptent");
88 
89  if (pL.get<bool>("visualization: fine graph edges"))
90  Input(fineLevel, "Graph");
91 #if 0
92  if(pL.get<bool>("visualization: coarse graph edges")) {
93  Input(coarseLevel, "Coordinates");
94  Input(coarseLevel, "Graph");
95  }
96 #endif
97 }
98 
99 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
101  RCP<LWGraph> fineGraph = Teuchos::null;
102  RCP<Matrix> P = Teuchos::null;
103  const ParameterList &pL = this->GetParameterList();
104  if (this->GetFactory("P") != Teuchos::null && this->GetFactory("Ptent") == Teuchos::null)
105  P = Get<RCP<Matrix> >(coarseLevel, "P");
106  if (GetFactory("Ptent") != Teuchos::null && GetFactory("P") == Teuchos::null)
107  P = Get<RCP<Matrix> >(coarseLevel, "Ptent");
108 
109  RCP<const Teuchos::Comm<int> > comm = P->getRowMap()->getComm();
110 
111  LocalOrdinal dofsPerNode = 1;
112  LocalOrdinal stridedRowOffset = 0;
113  RCP<const StridedMap> strRowMap = Teuchos::null;
114  if (P->IsView("stridedMaps") && Teuchos::rcp_dynamic_cast<const StridedMap>(P->getRowMap("stridedMaps")) != Teuchos::null) {
115  strRowMap = Teuchos::rcp_dynamic_cast<const StridedMap>(P->getRowMap("stridedMaps"));
116  LocalOrdinal blockid = strRowMap->getStridedBlockId();
117  if (blockid > -1) {
118  std::vector<size_t> stridingInfo = strRowMap->getStridingData();
119  for (size_t j = 0; j < Teuchos::as<size_t>(blockid); j++)
120  stridedRowOffset += stridingInfo[j];
121  dofsPerNode = Teuchos::as<LocalOrdinal>(stridingInfo[blockid]);
122  } else {
123  dofsPerNode = strRowMap->getFixedBlockSize();
124  }
125  GetOStream(Runtime1) << "CoarseningVisualizationFactory::Build():"
126  << " #dofs per node = " << dofsPerNode << std::endl;
127  }
128 
129  LocalOrdinal columnsPerNode = dofsPerNode;
130  LocalOrdinal stridedColumnOffset = 0;
131  RCP<const StridedMap> strDomainMap = Teuchos::null;
132  if (P->IsView("stridedMaps") && Teuchos::rcp_dynamic_cast<const StridedMap>(P->getRowMap("stridedMaps")) != Teuchos::null) {
133  strDomainMap = Teuchos::rcp_dynamic_cast<const StridedMap>(P->getColMap("stridedMaps"));
134  LocalOrdinal blockid = strDomainMap->getStridedBlockId();
135 
136  if (blockid > -1) {
137  std::vector<size_t> stridingInfo = strDomainMap->getStridingData();
138  for (size_t j = 0; j < Teuchos::as<size_t>(blockid); j++)
139  stridedColumnOffset += stridingInfo[j];
140  columnsPerNode = Teuchos::as<LocalOrdinal>(stridingInfo[blockid]);
141  } else {
142  columnsPerNode = strDomainMap->getFixedBlockSize();
143  }
144  GetOStream(Runtime1) << "CoarseningVisualizationFactory::Build():"
145  << " #columns per node = " << columnsPerNode << std::endl;
146  }
147 
148  // TODO add support for overlapping aggregates
149  TEUCHOS_TEST_FOR_EXCEPTION(strDomainMap->getLocalNumElements() != P->getColMap()->getLocalNumElements(), Exceptions::RuntimeError,
150  "CoarseningVisualization only supports non-overlapping transfers");
151 
152  // number of local "aggregates"
153  LocalOrdinal numLocalAggs = strDomainMap->getLocalNumElements() / columnsPerNode;
154  std::vector<std::set<LocalOrdinal> > localAggs(numLocalAggs);
155 
156  // do loop over all local rows of prolongator and extract column information
157  for (LO row = 0; row < Teuchos::as<LO>(P->getRowMap()->getLocalNumElements()); ++row) {
158  ArrayView<const LO> indices;
159  ArrayView<const SC> vals;
160  P->getLocalRowView(row, indices, vals);
161 
162  for (typename ArrayView<const LO>::iterator c = indices.begin(); c != indices.end(); ++c) {
163  localAggs[(*c) / columnsPerNode].insert(row / dofsPerNode);
164  }
165  }
166 
167  // determine number of "aggs" per proc and calculate local "agg" offset...
168  std::vector<int> myLocalAggsPerProc(comm->getSize(), 0);
169  std::vector<int> numLocalAggsPerProc(comm->getSize(), 0);
170  myLocalAggsPerProc[comm->getRank()] = numLocalAggs;
171  Teuchos::reduceAll(*comm, Teuchos::REDUCE_MAX, comm->getSize(), &myLocalAggsPerProc[0], &numLocalAggsPerProc[0]);
172 
173  LocalOrdinal myAggOffset = 0;
174  for (int i = 0; i < comm->getRank(); ++i) {
175  myAggOffset += numLocalAggsPerProc[i];
176  }
177 
178  /*for (LocalOrdinal i = 0; i < numLocalAggs; ++i) {
179 
180  std::cout << "PROC: " << comm->getRank() << " Local aggregate: " << i + myAggOffset << " with nodes: ";
181  for( typename std::set<LocalOrdinal>::iterator it = localAggs[i].begin(); it != localAggs[i].end(); ++it) {
182  std::cout << *it << ", ";
183  }
184  std::cout << std::endl;
185  }*/
186 
187  // get fine level coordinate information
188  Teuchos::RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::coordinateType, LocalOrdinal, GlobalOrdinal, Node> > coords = Get<RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::coordinateType, LocalOrdinal, GlobalOrdinal, Node> > >(fineLevel, "Coordinates");
189 
190  TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::as<LO>(P->getRowMap()->getLocalNumElements()) / dofsPerNode != Teuchos::as<LocalOrdinal>(coords->getLocalLength()), Exceptions::RuntimeError,
191  "Number of fine level nodes in coordinates is inconsistent with dof based information");
192 
193  // communicate fine level coordinates if necessary
194  if (pL.get<bool>("visualization: fine graph edges")) {
195  fineGraph = Get<RCP<LWGraph> >(fineLevel, "Graph");
196 
197  RCP<Import> coordImporter = Xpetra::ImportFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(coords->getMap(), fineGraph->GetImportMap());
199  ghostedCoords->doImport(*coords, *coordImporter, Xpetra::INSERT);
200  coords = ghostedCoords;
201  }
202 
203  Teuchos::RCP<const Map> nodeMap = coords->getMap();
204 
205  Teuchos::ArrayRCP<const typename Teuchos::ScalarTraits<Scalar>::coordinateType> xCoords = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coords->getData(0));
206  Teuchos::ArrayRCP<const typename Teuchos::ScalarTraits<Scalar>::coordinateType> yCoords = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coords->getData(1));
208  if (coords->getNumVectors() == 3) {
209  zCoords = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coords->getData(2));
210  }
211 
212  // determine number of nodes on fine level
213  LocalOrdinal numFineNodes = Teuchos::as<LocalOrdinal>(coords->getLocalLength());
214 
215  // create vertex2AggId array
216  ArrayRCP<LocalOrdinal> vertex2AggId(numFineNodes, -1);
217  for (LocalOrdinal i = 0; i < numLocalAggs; ++i) {
218  // TODO: check if entry = -1
219  for (typename std::set<LocalOrdinal>::iterator it = localAggs[i].begin(); it != localAggs[i].end(); ++it) {
220  vertex2AggId[*it] = i;
221  }
222  }
223 
224  // we have no information which node is root and which is not
225  // we could either look at the entries in P again or build some new root nodes
226  // assuming that root nodes are usually at the center of the aggregate
227  std::vector<bool> isRoot(numFineNodes, false);
228  for (LocalOrdinal i = 0; i < numLocalAggs; ++i) {
229  typename Teuchos::ScalarTraits<Scalar>::coordinateType xCenter = 0.0;
230  typename Teuchos::ScalarTraits<Scalar>::coordinateType yCenter = 0.0;
231  typename Teuchos::ScalarTraits<Scalar>::coordinateType zCenter = 0.0;
232 
233  // loop over all nodes in aggregate i and determine center coordinates of aggregate
234  for (typename std::set<LocalOrdinal>::iterator it = localAggs[i].begin(); it != localAggs[i].end(); ++it) {
235  xCenter += xCoords[*it];
236  yCenter += yCoords[*it];
237  if (coords->getNumVectors() == 3) zCenter += zCoords[*it];
238  }
239  xCenter /= Teuchos::as<LocalOrdinal>(localAggs[i].size());
240  yCenter /= Teuchos::as<LocalOrdinal>(localAggs[i].size());
241  zCenter /= Teuchos::as<LocalOrdinal>(localAggs[i].size());
242 
243  // loop over all nodes in aggregate i and find node which is closest to aggregate center
244  LocalOrdinal rootCandidate = -1;
246  for (typename std::set<LocalOrdinal>::iterator it = localAggs[i].begin(); it != localAggs[i].end(); ++it) {
247  typename Teuchos::ScalarTraits<Scalar>::coordinateType tempx = xCenter - xCoords[*it];
248  typename Teuchos::ScalarTraits<Scalar>::coordinateType tempy = yCenter - yCoords[*it];
250  if (coords->getNumVectors() == 3) tempz = zCenter - zCoords[*it];
251  typename Teuchos::ScalarTraits<Scalar>::coordinateType mydistance = 0.0;
252  mydistance += tempx * tempx;
253  mydistance += tempy * tempy;
254  mydistance += tempz * tempz;
255  mydistance = sqrt(mydistance);
256  if (mydistance <= minDistance) {
257  minDistance = mydistance;
258  rootCandidate = *it;
259  }
260  }
261 
262  isRoot[rootCandidate] = true;
263  }
264 
265  std::vector<LocalOrdinal> vertices;
266  std::vector<LocalOrdinal> geomSize;
267  int vizLevel = pL.get<int>("visualization: start level");
268  if (vizLevel <= fineLevel.GetLevelID()) {
269  std::string aggStyle = pL.get<std::string>("visualization: style");
270  if (aggStyle == "Point Cloud")
271  this->doPointCloud(vertices, geomSize, numLocalAggs, numFineNodes);
272  else if (aggStyle == "Jacks")
273  this->doJacks(vertices, geomSize, numLocalAggs, numFineNodes, isRoot, vertex2AggId);
274  else if (aggStyle == "Convex Hulls") {
275  // TODO do a smarter distinction and check the number of z levels...
276  // loop over all coordinates and collect coordinate components in sets...
277  if (coords->getNumVectors() == 3)
278  this->doConvexHulls3D(vertices, geomSize, numLocalAggs, numFineNodes, isRoot, vertex2AggId, xCoords, yCoords, zCoords);
279  else if (coords->getNumVectors() == 2)
280  this->doConvexHulls2D(vertices, geomSize, numLocalAggs, numFineNodes, isRoot, vertex2AggId, xCoords, yCoords);
281  } else {
282  GetOStream(Warnings0) << " Warning: Unrecognized agg style.\nPossible values are Point Cloud, Jacks, Convex Hulls.\nDefaulting to Point Cloud." << std::endl;
283  aggStyle = "Point Cloud";
284  this->doPointCloud(vertices, geomSize, numLocalAggs, numFineNodes);
285  }
286  }
287 
288  // write out fine edge information
289  if (pL.get<bool>("visualization: fine graph edges")) {
290  TEUCHOS_TEST_FOR_EXCEPTION(fineGraph == Teuchos::null, Exceptions::RuntimeError,
291  "Could not get information about fine graph.");
292 
293  std::vector<LocalOrdinal> fine_edges_vertices;
294  std::vector<LocalOrdinal> fine_edges_geomSize;
295  this->doGraphEdges(fine_edges_vertices, fine_edges_geomSize, fineGraph, xCoords, yCoords, zCoords);
296 
297  std::string fEdgeFineFile = this->getFileName(comm->getSize(), comm->getRank(), fineLevel.GetLevelID(), pL);
298  std::string fEdgeFile = fEdgeFineFile.insert(fEdgeFineFile.rfind(".vtu"), "-finegraph");
299  std::ofstream edgeStream(fEdgeFile.c_str());
300 
301  std::vector<int> uniqueFineEdges = this->makeUnique(fine_edges_vertices);
302  this->writeFileVTKOpening(edgeStream, uniqueFineEdges, fine_edges_geomSize);
303  this->writeFileVTKNodes(edgeStream, uniqueFineEdges, nodeMap);
304  this->writeFileVTKData(edgeStream, uniqueFineEdges, myAggOffset, vertex2AggId, comm->getRank());
305  this->writeFileVTKCoordinates(edgeStream, uniqueFineEdges, xCoords, yCoords, zCoords, coords->getNumVectors());
306  this->writeFileVTKCells(edgeStream, uniqueFineEdges, fine_edges_vertices, fine_edges_geomSize);
307  this->writeFileVTKClosing(edgeStream);
308  edgeStream.close();
309  }
310 
311  // communicate fine level coordinates if necessary
312 #if 0 // we don't have access to the coarse graph
313  if (pL.get<bool>("visualization: coarse graph edges")) {
314  RCP<LWGraph> coarseGraph = Get<RCP<LWGraph> >(coarseLevel, "Graph");
315 
316  Teuchos::RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::coordinateType, LocalOrdinal, GlobalOrdinal, Node> > coarsecoords = Get<RCP<Xpetra::MultiVector<typename Teuchos::ScalarTraits<Scalar>::coordinateType, LocalOrdinal, GlobalOrdinal, Node> > >(coarseLevel, "Coordinates");
317 
318  RCP<Import> coarsecoordImporter = Xpetra::ImportFactory<LocalOrdinal, GlobalOrdinal, Node>::Build(coarsecoords->getMap(), coarseGraph->GetImportMap());
320  coarseghostedCoords->doImport(*coarsecoords, *coarsecoordImporter, Xpetra::INSERT);
321  coarsecoords = coarseghostedCoords;
322 
323  Teuchos::ArrayRCP<const typename Teuchos::ScalarTraits<Scalar>::coordinateType> cx = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coarsecoords->getData(0));
324  Teuchos::ArrayRCP<const typename Teuchos::ScalarTraits<Scalar>::coordinateType> cy = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coarsecoords->getData(1));
326  if(coarsecoords->getNumVectors() == 3) {
327  cz = Teuchos::arcp_reinterpret_cast<const typename Teuchos::ScalarTraits<Scalar>::coordinateType>(coarsecoords->getData(2));
328  }
329 
330  Teuchos::RCP<const Map> coarsenodeMap = coarsecoords->getMap();
331 
332  std::vector<LocalOrdinal> coarse_edges_vertices;
333  std::vector<LocalOrdinal> coarse_edges_geomSize;
334  this->doGraphEdges(coarse_edges_vertices, coarse_edges_geomSize, coarseGraph, cx, cy, cz);
335 
336  std::string cEdgeFineFile = this->getFileName(comm->getSize(), comm->getRank(), coarseLevel.GetLevelID(), pL);
337  std::string cEdgeFile = cEdgeFineFile.insert(cEdgeFineFile.rfind(".vtu"), "-coarsegraph");
338  std::ofstream cedgeStream(cEdgeFile.c_str());
339 
340  std::vector<int> uniqueCoarseEdges = this->makeUnique(coarse_edges_vertices);
341  this->writeFileVTKOpening(cedgeStream, uniqueCoarseEdges, coarse_edges_geomSize);
342  this->writeFileVTKNodes(cedgeStream, uniqueCoarseEdges, coarsenodeMap);
343  //this->writeFileVTKData(edgeStream, uniqueCoarseEdges, myAggOffset, vertex2AggId, comm->getRank());
344  this->writeFileVTKCoordinates(cedgeStream, uniqueCoarseEdges, cx, cy, cz, coarsecoords->getNumVectors());
345  this->writeFileVTKCells(cedgeStream, uniqueCoarseEdges, coarse_edges_vertices, coarse_edges_geomSize);
346  this->writeFileVTKClosing(cedgeStream);
347  cedgeStream.close();
348  }
349 #endif
350 
351  if (pL.get<int>("visualization: start level") <= fineLevel.GetLevelID()) {
352  // write out coarsening information
353  std::string filenameToWrite = this->getFileName(comm->getSize(), comm->getRank(), fineLevel.GetLevelID(), pL);
354  std::ofstream fout(filenameToWrite.c_str());
355 
356  std::vector<int> uniqueFine = this->makeUnique(vertices);
357  this->writeFileVTKOpening(fout, uniqueFine, geomSize);
358  this->writeFileVTKNodes(fout, uniqueFine, nodeMap);
359  this->writeFileVTKData(fout, uniqueFine, myAggOffset, vertex2AggId, comm->getRank());
360  this->writeFileVTKCoordinates(fout, uniqueFine, xCoords, yCoords, zCoords, coords->getNumVectors());
361  this->writeFileVTKCells(fout, uniqueFine, vertices, geomSize);
362  this->writeFileVTKClosing(fout);
363  fout.close();
364 
365  // create pvtu file
366  if (comm->getRank() == 0) {
367  std::string pvtuFilename = this->getPVTUFileName(comm->getSize(), comm->getRank(), fineLevel.GetLevelID(), pL);
368  std::string baseFname = this->getBaseFileName(comm->getSize(), fineLevel.GetLevelID(), pL);
369  std::ofstream pvtu(pvtuFilename.c_str());
370  this->writePVTU(pvtu, baseFname, comm->getSize(), pL.get<bool>("visualization: fine graph edges"));
371  pvtu.close();
372  }
373  }
374 
375  if (comm->getRank() == 0 && pL.get<bool>("visualization: build colormap")) {
376  this->buildColormap();
377  }
378 }
379 } // namespace MueLu
380 
381 #endif /* MUELU_AGGREGATIONEXPORTFACTORY_DEF_HPP_ */
Important warning messages (one line)
MueLu::DefaultLocalOrdinal LocalOrdinal
iterator begin() const
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)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
LocalOrdinal LO
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
MueLu::DefaultNode Node
RCP< ParameterList > GetValidParameterList() const
bool isParameter(const std::string &name) const
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:99
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
const RCP< const Map > GetImportMap() const
Return overlapping import map (nodes).
iterator end() const
Exception throws to report errors in the internal logical of the program.
Description of what is happening (more verbose)
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
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)