MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_RAPFactory_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_RAPFACTORY_DEF_HPP
47 #define MUELU_RAPFACTORY_DEF_HPP
48 
49 #include <sstream>
50 
51 #include <Xpetra_Matrix.hpp>
52 #include <Xpetra_MatrixFactory.hpp>
53 #include <Xpetra_MatrixMatrix.hpp>
54 #include <Xpetra_MatrixUtils.hpp>
56 #include <Xpetra_Vector.hpp>
57 #include <Xpetra_VectorFactory.hpp>
58 #include <Xpetra_IO.hpp>
59 
61 
62 #include "MueLu_MasterList.hpp"
63 #include "MueLu_Monitor.hpp"
64 #include "MueLu_PerfUtils.hpp"
65 //#include "MueLu_Utilities.hpp"
66 
67 namespace MueLu {
68 
69 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
71  : hasDeclaredInput_(false) {}
72 
73 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
75  RCP<ParameterList> validParamList = rcp(new ParameterList());
76 
77 #define SET_VALID_ENTRY(name) validParamList->setEntry(name, MasterList::getEntry(name))
78  SET_VALID_ENTRY("transpose: use implicit");
79  SET_VALID_ENTRY("rap: triple product");
80  SET_VALID_ENTRY("rap: fix zero diagonals");
81  SET_VALID_ENTRY("rap: fix zero diagonals threshold");
82  SET_VALID_ENTRY("rap: fix zero diagonals replacement");
83  SET_VALID_ENTRY("rap: relative diagonal floor");
84 #undef SET_VALID_ENTRY
85  validParamList->set<RCP<const FactoryBase> >("A", null, "Generating factory of the matrix A used during the prolongator smoothing process");
86  validParamList->set<RCP<const FactoryBase> >("P", null, "Prolongator factory");
87  validParamList->set<RCP<const FactoryBase> >("R", null, "Restrictor factory");
88 
89  validParamList->set<bool>("CheckMainDiagonal", false, "Check main diagonal for zeros");
90  validParamList->set<bool>("RepairMainDiagonal", false, "Repair zeros on main diagonal");
91 
92  // Make sure we don't recursively validate options for the matrixmatrix kernels
93  ParameterList norecurse;
94  norecurse.disableRecursiveValidation();
95  validParamList->set<ParameterList>("matrixmatrix: kernel params", norecurse, "MatrixMatrix kernel parameters");
96 
97  return validParamList;
98 }
99 
100 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
102  const Teuchos::ParameterList& pL = GetParameterList();
103  if (pL.get<bool>("transpose: use implicit") == false)
104  Input(coarseLevel, "R");
105 
106  Input(fineLevel, "A");
107  Input(coarseLevel, "P");
108 
109  // call DeclareInput of all user-given transfer factories
110  for (std::vector<RCP<const FactoryBase> >::const_iterator it = transferFacts_.begin(); it != transferFacts_.end(); ++it)
111  (*it)->CallDeclareInput(coarseLevel);
112 
113  hasDeclaredInput_ = true;
114 }
115 
116 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
118  const bool doTranspose = true;
119  const bool doFillComplete = true;
120  const bool doOptimizeStorage = true;
121  RCP<Matrix> Ac;
122  {
123  FactoryMonitor m(*this, "Computing Ac", coarseLevel);
124  std::ostringstream levelstr;
125  levelstr << coarseLevel.GetLevelID();
126  std::string labelstr = FormattingHelper::getColonLabel(coarseLevel.getObjectLabel());
127 
128  TEUCHOS_TEST_FOR_EXCEPTION(hasDeclaredInput_ == false, Exceptions::RuntimeError,
129  "MueLu::RAPFactory::Build(): CallDeclareInput has not been called before Build!");
130 
131  const Teuchos::ParameterList& pL = GetParameterList();
132  RCP<Matrix> A = Get<RCP<Matrix> >(fineLevel, "A");
133  RCP<Matrix> P = Get<RCP<Matrix> >(coarseLevel, "P"), AP;
134  // We don't have a valid P (e.g., # global aggregates = 0) so we bail.
135  // This level will ultimately be removed in MueLu_Hierarchy_defs.h via a resize()
136  if (P == Teuchos::null) {
137  Ac = Teuchos::null;
138  Set(coarseLevel, "A", Ac);
139  return;
140  }
141 
142  bool isEpetra = A->getRowMap()->lib() == Xpetra::UseEpetra;
143  bool isGPU =
144 #ifdef KOKKOS_ENABLE_CUDA
145  (typeid(Node).name() == typeid(Tpetra::KokkosCompat::KokkosCudaWrapperNode).name()) ||
146 #endif
147 #ifdef KOKKOS_ENABLE_HIP
148  (typeid(Node).name() == typeid(Tpetra::KokkosCompat::KokkosHIPWrapperNode).name()) ||
149 #endif
150 #ifdef KOKKOS_ENABLE_SYCL
151  (typeid(Node).name() == typeid(Tpetra::KokkosCompat::KokkosSYCLWrapperNode).name()) ||
152 #endif
153  false;
154 
155  if (pL.get<bool>("rap: triple product") == false || isEpetra || isGPU) {
156  if (pL.get<bool>("rap: triple product") && isEpetra)
157  GetOStream(Warnings1) << "Switching from triple product to R x (A x P) since triple product has not been implemented for Epetra.\n";
158 #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) || defined(KOKKOS_ENABLE_SYCL)
159  if (pL.get<bool>("rap: triple product") && isGPU)
160  GetOStream(Warnings1) << "Switching from triple product to R x (A x P) since triple product has not been implemented for "
161  << Node::execution_space::name() << std::endl;
162 #endif
163 
164  // Reuse pattern if available (multiple solve)
165  RCP<ParameterList> APparams = rcp(new ParameterList);
166  if (pL.isSublist("matrixmatrix: kernel params"))
167  APparams = rcp(new ParameterList(pL.sublist("matrixmatrix: kernel params")));
168 
169  // By default, we don't need global constants for A*P
170  APparams->set("compute global constants: temporaries", APparams->get("compute global constants: temporaries", false));
171  APparams->set("compute global constants", APparams->get("compute global constants", false));
172 
173  if (coarseLevel.IsAvailable("AP reuse data", this)) {
174  GetOStream(static_cast<MsgType>(Runtime0 | Test)) << "Reusing previous AP data" << std::endl;
175 
176  APparams = coarseLevel.Get<RCP<ParameterList> >("AP reuse data", this);
177 
178  if (APparams->isParameter("graph"))
179  AP = APparams->get<RCP<Matrix> >("graph");
180  }
181 
182  {
183  SubFactoryMonitor subM(*this, "MxM: A x P", coarseLevel);
184 
185  AP = MatrixMatrix::Multiply(*A, !doTranspose, *P, !doTranspose, AP, GetOStream(Statistics2),
186  doFillComplete, doOptimizeStorage, labelstr + std::string("MueLu::A*P-") + levelstr.str(), APparams);
187  }
188 
189  // Reuse coarse matrix memory if available (multiple solve)
190  RCP<ParameterList> RAPparams = rcp(new ParameterList);
191  if (pL.isSublist("matrixmatrix: kernel params"))
192  RAPparams = rcp(new ParameterList(pL.sublist("matrixmatrix: kernel params")));
193 
194  if (coarseLevel.IsAvailable("RAP reuse data", this)) {
195  GetOStream(static_cast<MsgType>(Runtime0 | Test)) << "Reusing previous RAP data" << std::endl;
196 
197  RAPparams = coarseLevel.Get<RCP<ParameterList> >("RAP reuse data", this);
198 
199  if (RAPparams->isParameter("graph"))
200  Ac = RAPparams->get<RCP<Matrix> >("graph");
201 
202  // Some eigenvalue may have been cached with the matrix in the previous run.
203  // As the matrix values will be updated, we need to reset the eigenvalue.
204  Ac->SetMaxEigenvalueEstimate(-Teuchos::ScalarTraits<SC>::one());
205  }
206 
207  // We *always* need global constants for the RAP, but not for the temps
208  RAPparams->set("compute global constants: temporaries", RAPparams->get("compute global constants: temporaries", false));
209  RAPparams->set("compute global constants", true);
210 
211  // Allow optimization of storage.
212  // This is necessary for new faster Epetra MM kernels.
213  // Seems to work with matrix modifications to repair diagonal entries.
214 
215  if (pL.get<bool>("transpose: use implicit") == true) {
216  SubFactoryMonitor m2(*this, "MxM: P' x (AP) (implicit)", coarseLevel);
217 
218  Ac = MatrixMatrix::Multiply(*P, doTranspose, *AP, !doTranspose, Ac, GetOStream(Statistics2),
219  doFillComplete, doOptimizeStorage, labelstr + std::string("MueLu::R*(AP)-implicit-") + levelstr.str(), RAPparams);
220 
221  } else {
222  RCP<Matrix> R = Get<RCP<Matrix> >(coarseLevel, "R");
223 
224  SubFactoryMonitor m2(*this, "MxM: R x (AP) (explicit)", coarseLevel);
225 
226  Ac = MatrixMatrix::Multiply(*R, !doTranspose, *AP, !doTranspose, Ac, GetOStream(Statistics2),
227  doFillComplete, doOptimizeStorage, labelstr + std::string("MueLu::R*(AP)-explicit-") + levelstr.str(), RAPparams);
228  }
229 
230  Teuchos::ArrayView<const double> relativeFloor = pL.get<Teuchos::Array<double> >("rap: relative diagonal floor")();
231  if (relativeFloor.size() > 0) {
233  }
234 
235  bool repairZeroDiagonals = pL.get<bool>("RepairMainDiagonal") || pL.get<bool>("rap: fix zero diagonals");
236  bool checkAc = pL.get<bool>("CheckMainDiagonal") || pL.get<bool>("rap: fix zero diagonals");
237  ;
238  if (checkAc || repairZeroDiagonals) {
239  using magnitudeType = typename Teuchos::ScalarTraits<Scalar>::magnitudeType;
240  magnitudeType threshold;
241  if (pL.isType<magnitudeType>("rap: fix zero diagonals threshold"))
242  threshold = pL.get<magnitudeType>("rap: fix zero diagonals threshold");
243  else
244  threshold = Teuchos::as<magnitudeType>(pL.get<double>("rap: fix zero diagonals threshold"));
245  Scalar replacement = Teuchos::as<Scalar>(pL.get<double>("rap: fix zero diagonals replacement"));
246  Xpetra::MatrixUtils<SC, LO, GO, NO>::CheckRepairMainDiagonal(Ac, repairZeroDiagonals, GetOStream(Warnings1), threshold, replacement);
247  }
248 
249  if (IsPrint(Statistics2)) {
250  RCP<ParameterList> params = rcp(new ParameterList());
251  ;
252  params->set("printLoadBalancingInfo", true);
253  params->set("printCommInfo", true);
254  GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo(*Ac, "Ac", params);
255  }
256 
257  if (!Ac.is_null()) {
258  std::ostringstream oss;
259  oss << "A_" << coarseLevel.GetLevelID();
260  Ac->setObjectLabel(oss.str());
261  }
262  Set(coarseLevel, "A", Ac);
263 
264  if (!isGPU) {
265  APparams->set("graph", AP);
266  Set(coarseLevel, "AP reuse data", APparams);
267  }
268  if (!isGPU) {
269  RAPparams->set("graph", Ac);
270  Set(coarseLevel, "RAP reuse data", RAPparams);
271  }
272  } else {
273  RCP<ParameterList> RAPparams = rcp(new ParameterList);
274  if (pL.isSublist("matrixmatrix: kernel params"))
275  RAPparams->sublist("matrixmatrix: kernel params") = pL.sublist("matrixmatrix: kernel params");
276 
277  if (coarseLevel.IsAvailable("RAP reuse data", this)) {
278  GetOStream(static_cast<MsgType>(Runtime0 | Test)) << "Reusing previous RAP data" << std::endl;
279 
280  RAPparams = coarseLevel.Get<RCP<ParameterList> >("RAP reuse data", this);
281 
282  if (RAPparams->isParameter("graph"))
283  Ac = RAPparams->get<RCP<Matrix> >("graph");
284 
285  // Some eigenvalue may have been cached with the matrix in the previous run.
286  // As the matrix values will be updated, we need to reset the eigenvalue.
287  Ac->SetMaxEigenvalueEstimate(-Teuchos::ScalarTraits<SC>::one());
288  }
289 
290  // We *always* need global constants for the RAP, but not for the temps
291  RAPparams->set("compute global constants: temporaries", RAPparams->get("compute global constants: temporaries", false));
292  RAPparams->set("compute global constants", true);
293 
294  if (pL.get<bool>("transpose: use implicit") == true) {
295  Ac = MatrixFactory::Build(P->getDomainMap(), Teuchos::as<LO>(0));
296 
297  SubFactoryMonitor m2(*this, "MxMxM: R x A x P (implicit)", coarseLevel);
298 
300  MultiplyRAP(*P, doTranspose, *A, !doTranspose, *P, !doTranspose, *Ac, doFillComplete,
301  doOptimizeStorage, labelstr + std::string("MueLu::R*A*P-implicit-") + levelstr.str(),
302  RAPparams);
303  } else {
304  RCP<Matrix> R = Get<RCP<Matrix> >(coarseLevel, "R");
305  Ac = MatrixFactory::Build(R->getRowMap(), Teuchos::as<LO>(0));
306 
307  SubFactoryMonitor m2(*this, "MxMxM: R x A x P (explicit)", coarseLevel);
308 
310  MultiplyRAP(*R, !doTranspose, *A, !doTranspose, *P, !doTranspose, *Ac, doFillComplete,
311  doOptimizeStorage, labelstr + std::string("MueLu::R*A*P-explicit-") + levelstr.str(),
312  RAPparams);
313  }
314 
315  Teuchos::ArrayView<const double> relativeFloor = pL.get<Teuchos::Array<double> >("rap: relative diagonal floor")();
316  if (relativeFloor.size() > 0) {
318  }
319 
320  bool repairZeroDiagonals = pL.get<bool>("RepairMainDiagonal") || pL.get<bool>("rap: fix zero diagonals");
321  bool checkAc = pL.get<bool>("CheckMainDiagonal") || pL.get<bool>("rap: fix zero diagonals");
322  ;
323  if (checkAc || repairZeroDiagonals) {
324  using magnitudeType = typename Teuchos::ScalarTraits<Scalar>::magnitudeType;
325  magnitudeType threshold;
326  if (pL.isType<magnitudeType>("rap: fix zero diagonals threshold"))
327  threshold = pL.get<magnitudeType>("rap: fix zero diagonals threshold");
328  else
329  threshold = Teuchos::as<magnitudeType>(pL.get<double>("rap: fix zero diagonals threshold"));
330  Scalar replacement = Teuchos::as<Scalar>(pL.get<double>("rap: fix zero diagonals replacement"));
331  Xpetra::MatrixUtils<SC, LO, GO, NO>::CheckRepairMainDiagonal(Ac, repairZeroDiagonals, GetOStream(Warnings1), threshold, replacement);
332  }
333 
334  if (IsPrint(Statistics2)) {
335  RCP<ParameterList> params = rcp(new ParameterList());
336  ;
337  params->set("printLoadBalancingInfo", true);
338  params->set("printCommInfo", true);
339  GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo(*Ac, "Ac", params);
340  }
341 
342  if (!Ac.is_null()) {
343  std::ostringstream oss;
344  oss << "A_" << coarseLevel.GetLevelID();
345  Ac->setObjectLabel(oss.str());
346  }
347  Set(coarseLevel, "A", Ac);
348 
349  if (!isGPU) {
350  RAPparams->set("graph", Ac);
351  Set(coarseLevel, "RAP reuse data", RAPparams);
352  }
353  }
354  }
355 
356 #ifdef HAVE_MUELU_DEBUG
357  MatrixUtils::checkLocalRowMapMatchesColMap(*Ac);
358 #endif // HAVE_MUELU_DEBUG
359 
360  if (transferFacts_.begin() != transferFacts_.end()) {
361  SubFactoryMonitor m(*this, "Projections", coarseLevel);
362 
363  // call Build of all user-given transfer factories
364  for (std::vector<RCP<const FactoryBase> >::const_iterator it = transferFacts_.begin(); it != transferFacts_.end(); ++it) {
365  RCP<const FactoryBase> fac = *it;
366  GetOStream(Runtime0) << "RAPFactory: call transfer factory: " << fac->description() << std::endl;
367  fac->CallBuild(coarseLevel);
368  // Coordinates transfer is marginally different from all other operations
369  // because it is *optional*, and not required. For instance, we may need
370  // coordinates only on level 4 if we start repartitioning from that level,
371  // but we don't need them on level 1,2,3. As our current Hierarchy setup
372  // assumes propagation of dependencies only through three levels, this
373  // means that we need to rely on other methods to propagate optional data.
374  //
375  // The method currently used is through RAP transfer factories, which are
376  // simply factories which are called at the end of RAP with a single goal:
377  // transfer some fine data to coarser level. Because these factories are
378  // kind of outside of the mainline factories, they behave different. In
379  // particular, we call their Build method explicitly, rather than through
380  // Get calls. This difference is significant, as the Get call is smart
381  // enough to know when to release all factory dependencies, and Build is
382  // dumb. This led to the following CoordinatesTransferFactory sequence:
383  // 1. Request level 0
384  // 2. Request level 1
385  // 3. Request level 0
386  // 4. Release level 0
387  // 5. Release level 1
388  //
389  // The problem is missing "6. Release level 0". Because it was missing,
390  // we had outstanding request on "Coordinates", "Aggregates" and
391  // "CoarseMap" on level 0.
392  //
393  // This was fixed by explicitly calling Release on transfer factories in
394  // RAPFactory. I am still unsure how exactly it works, but now we have
395  // clear data requests for all levels.
396  coarseLevel.Release(*fac);
397  }
398  }
399 }
400 
401 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
403  // check if it's a TwoLevelFactoryBase based transfer factory
404  TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::rcp_dynamic_cast<const TwoLevelFactoryBase>(factory) == Teuchos::null, Exceptions::BadCast,
405  "MueLu::RAPFactory::AddTransferFactory: Transfer factory is not derived from TwoLevelFactoryBase. "
406  "This is very strange. (Note: you can remove this exception if there's a good reason for)");
407  TEUCHOS_TEST_FOR_EXCEPTION(hasDeclaredInput_, Exceptions::RuntimeError, "MueLu::RAPFactory::AddTransferFactory: Factory is being added after we have already declared input");
408  transferFacts_.push_back(factory);
409 }
410 
411 } // namespace MueLu
412 
413 #define MUELU_RAPFACTORY_SHORT
414 #endif // MUELU_RAPFACTORY_DEF_HPP
#define SET_VALID_ENTRY(name)
Exception indicating invalid cast attempted.
virtual std::string getObjectLabel() const
static void RelativeDiagonalBoost(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A, const Teuchos::ArrayView< const double > &relativeThreshold, Teuchos::FancyOStream &fos)
virtual void CallBuild(Level &requestedLevel) const =0
ParameterList & disableRecursiveValidation()
void Release(const FactoryBase &factory)
Decrement the storage counter for all the inputs of a factory.
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)
static void MultiplyRAP(const Matrix &R, bool transposeR, const Matrix &A, bool transposeA, const Matrix &P, bool transposeP, Matrix &Ac, bool call_FillComplete_on_result=true, bool doOptimizeStorage=true, const std::string &label=std::string(), const RCP< ParameterList > &params=null)
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
size_type size() const
One-liner description of what is happening.
void AddTransferFactory(const RCP< const FactoryBase > &factory)
Add transfer factory in the end of list of transfer factories in RepartitionAcFactory.
MueLu::DefaultNode Node
static void CheckRepairMainDiagonal(RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &Ac, bool const &repairZeroDiagonals, Teuchos::FancyOStream &fos, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType threshold=Teuchos::ScalarTraits< typename Teuchos::ScalarTraits< Scalar >::magnitudeType >::zero())
static std::string getColonLabel(const std::string &label)
Helper function for object label.
Print even more statistics.
Additional warnings.
bool isParameter(const std::string &name) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
MueLu::DefaultScalar Scalar
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:99
bool isSublist(const std::string &name) const
Timer to be used in factories. Similar to SubMonitor but adds a timer level by level.
static std::string PrintMatrixInfo(const Matrix &A, const std::string &msgTag, RCP< const Teuchos::ParameterList > params=Teuchos::null)
bool isType(const std::string &name) const
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
int GetLevelID() const
Return level number.
Definition: MueLu_Level.cpp:76
Exception throws to report errors in the internal logical of the program.
virtual std::string description() const
Return a simple one-line description of this object.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
bool is_null() const