MueLu  Version of the Day
MueLu_SimpleSmoother_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  * MueLu_SimpleSmoother_def.hpp
48  *
49  * Created on: 19.03.2013
50  * Author: wiesner
51  */
52 
53 #ifndef MUELU_SIMPLESMOOTHER_DEF_HPP_
54 #define MUELU_SIMPLESMOOTHER_DEF_HPP_
55 
56 #include "Teuchos_ArrayViewDecl.hpp"
57 #include "Teuchos_ScalarTraits.hpp"
58 
59 #include "MueLu_ConfigDefs.hpp"
60 
61 #include <Xpetra_Matrix.hpp>
62 #include <Xpetra_CrsMatrixWrap.hpp>
63 #include <Xpetra_BlockedCrsMatrix.hpp>
64 #include <Xpetra_MultiVectorFactory.hpp>
65 #include <Xpetra_VectorFactory.hpp>
66 
68 #include "MueLu_Level.hpp"
69 #include "MueLu_Utilities.hpp"
70 #include "MueLu_Monitor.hpp"
71 #include "MueLu_HierarchyHelpers.hpp"
72 #include "MueLu_SmootherBase.hpp"
73 #include "MueLu_SubBlockAFactory.hpp"
74 
75 // include files for default FactoryManager
76 #include "MueLu_SchurComplementFactory.hpp"
77 #include "MueLu_DirectSolver.hpp"
78 #include "MueLu_SmootherFactory.hpp"
79 #include "MueLu_FactoryManager.hpp"
80 
81 namespace MueLu {
82 
83  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
85  : type_("SIMPLE"), A_(Teuchos::null)
86  {
87  //Factory::SetParameter("Sweeps", Teuchos::ParameterEntry(sweeps));
88  //Factory::SetParameter("Damping factor",Teuchos::ParameterEntry(omega));
89  //Factory::SetParameter("UseSIMPLEC", Teuchos::ParameterEntry(SIMPLEC));
90 
91 #if 0
92  // when declaring default factories without overwriting them leads to a multipleCallCheck exception
93  // TODO: debug into this
94  // workaround: always define your factory managers outside either using the C++ API or the XML files
95  RCP<SchurComplementFactory> SchurFact = Teuchos::rcp(new SchurComplementFactory());
96  SchurFact->SetParameter("omega",Teuchos::ParameterEntry(omega));
97  SchurFact->SetParameter("lumping",Teuchos::ParameterEntry(SIMPLEC));
98  SchurFact->SetFactory("A", this->GetFactory("A"));
99 
100  // define smoother/solver for SchurComplement equation
101  Teuchos::ParameterList SCparams;
102  std::string SCtype;
103  RCP<SmootherPrototype> smoProtoSC = rcp( new DirectSolver(SCtype,SCparams) );
104  smoProtoSC->SetFactory("A", SchurFact);
105 
106  RCP<SmootherFactory> SmooSCFact = rcp( new SmootherFactory(smoProtoSC) );
107 
108  RCP<FactoryManager> schurFactManager = rcp(new FactoryManager());
109  schurFactManager->SetFactory("A", SchurFact);
110  schurFactManager->SetFactory("Smoother", SmooSCFact);
111  schurFactManager->SetIgnoreUserData(true);
112 
113  // define smoother/solver for velocity prediction
114  RCP<SubBlockAFactory> A00Fact = Teuchos::rcp(new SubBlockAFactory(/*this->GetFactory("A"), 0, 0*/));
115  A00Fact->SetFactory("A",this->GetFactory("A"));
116  A00Fact->SetParameter("block row",ParameterEntry(0));
117  A00Fact->SetParameter("block col",ParameterEntry(0));
118  Teuchos::ParameterList velpredictParams;
119  std::string velpredictType;
120  RCP<SmootherPrototype> smoProtoPredict = rcp( new DirectSolver(velpredictType,velpredictParams) );
121  smoProtoPredict->SetFactory("A", A00Fact);
122  RCP<SmootherFactory> SmooPredictFact = rcp( new SmootherFactory(smoProtoPredict) );
123 
124  RCP<FactoryManager> velpredictFactManager = rcp(new FactoryManager());
125  velpredictFactManager->SetFactory("A", A00Fact);
126  velpredictFactManager->SetFactory("Smoother", SmooPredictFact);
127  velpredictFactManager->SetIgnoreUserData(true);
128 
129  AddFactoryManager(velpredictFactManager, 0);
130  AddFactoryManager(schurFactManager, 1);
131 #endif
132  }
133 
134  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
136 
137  template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
139  RCP<ParameterList> validParamList = rcp(new ParameterList());
140 
141  validParamList->set< RCP<const FactoryBase> >("A", Teuchos::null, "Generating factory of the matrix A");
142  validParamList->set< Scalar > ("Damping factor", 1.0, "Damping/Scaling factor in SIMPLE");
143  validParamList->set< LocalOrdinal > ("Sweeps", 1, "Number of SIMPLE sweeps (default = 1)");
144  validParamList->set< bool > ("UseSIMPLEC", false, "Use SIMPLEC instead of SIMPLE (default = false)");
145 
146  return validParamList;
147  }
148 
150  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
151  void SimpleSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node>::AddFactoryManager(RCP<const FactoryManagerBase> FactManager, int pos) {
152  TEUCHOS_TEST_FOR_EXCEPTION(pos < 0, Exceptions::RuntimeError, "MueLu::SimpleSmoother::AddFactoryManager: parameter \'pos\' must not be negative! error.");
153 
154  size_t myPos = Teuchos::as<size_t>(pos);
155 
156  if (myPos < FactManager_.size()) {
157  // replace existing entris in FactManager_ vector
158  FactManager_.at(myPos) = FactManager;
159  } else if( myPos == FactManager_.size()) {
160  // add new Factory manager in the end of the vector
161  FactManager_.push_back(FactManager);
162  } else { // if(myPos > FactManager_.size())
163  RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
164  *out << "Warning: cannot add new FactoryManager at proper position " << pos << ". The FactoryManager is just appended to the end. Check this!" << std::endl;
165 
166  // add new Factory manager in the end of the vector
167  FactManager_.push_back(FactManager);
168  }
169 
170  }
171 
172 
173  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
175  AddFactoryManager(FactManager, 0); // overwrite factory manager for predicting the primary variable
176  }
177 
178  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
180  AddFactoryManager(FactManager, 1); // overwrite factory manager for SchurComplement
181  }
182 
183  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
185  currentLevel.DeclareInput("A",this->GetFactory("A").get());
186 
187  TEUCHOS_TEST_FOR_EXCEPTION(FactManager_.size() != 2, Exceptions::RuntimeError,"MueLu::SimpleSmoother::DeclareInput: You have to declare two FactoryManagers with a \"Smoother\" object: One for predicting the primary variable and one for the SchurComplement system. The smoother for the SchurComplement system needs a SchurComplementFactory as input for variable \"A\". make sure that you use the same proper damping factors for omega both in the SchurComplementFactory and in the SIMPLE smoother!");
188 
189  // loop over all factory managers for the subblocks of blocked operator A
190  std::vector<Teuchos::RCP<const FactoryManagerBase> >::const_iterator it;
191  for(it = FactManager_.begin(); it!=FactManager_.end(); ++it) {
192  SetFactoryManager currentSFM (rcpFromRef(currentLevel), *it);
193 
194  // request "Smoother" for current subblock row.
195  currentLevel.DeclareInput("PreSmoother",(*it)->GetFactory("Smoother").get());
196  }
197  }
198 
199  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
201  //*********************************************
202  // Setup routine can be summarized in 4 steps:
203  // - Set the map extractors
204  // - Set the blocks
205  // - Create and set the inverse of the diagonal of F
206  // - Set the smoother for the Schur Complement
207 
208  FactoryMonitor m(*this, "Setup blocked SIMPLE Smoother", currentLevel);
209 
210  if (SmootherPrototype::IsSetup() == true)
211  this->GetOStream(Warnings0) << "MueLu::SimpleSmoother::Setup(): Setup() has already been called";
212 
213  // extract blocked operator A from current level
214  A_ = Factory::Get<RCP<Matrix> > (currentLevel, "A");
215 
216  RCP<BlockedCrsMatrix> bA = Teuchos::rcp_dynamic_cast<BlockedCrsMatrix>(A_);
217  TEUCHOS_TEST_FOR_EXCEPTION(bA == Teuchos::null, Exceptions::BadCast, "MueLu::SimpleSmoother::Setup: input matrix A is not of type BlockedCrsMatrix! error.");
218 
219  // store map extractors
220  rangeMapExtractor_ = bA->getRangeMapExtractor();
221  domainMapExtractor_ = bA->getDomainMapExtractor();
222 
223  // Store the blocks in local member variables
224  Teuchos::RCP<CrsMatrix> A00 = bA->getMatrix(0, 0);
225  Teuchos::RCP<CrsMatrix> A01 = bA->getMatrix(0, 1);
226  Teuchos::RCP<CrsMatrix> A10 = bA->getMatrix(1, 0);
227  Teuchos::RCP<CrsMatrix> A11 = bA->getMatrix(1, 1);
228 
229  Teuchos::RCP<CrsMatrixWrap> Op00 = Teuchos::rcp(new CrsMatrixWrap(A00));
230  Teuchos::RCP<CrsMatrixWrap> Op01 = Teuchos::rcp(new CrsMatrixWrap(A01));
231  Teuchos::RCP<CrsMatrixWrap> Op10 = Teuchos::rcp(new CrsMatrixWrap(A10));
232  Teuchos::RCP<CrsMatrixWrap> Op11 = Teuchos::rcp(new CrsMatrixWrap(A11));
233 
234  F_ = Teuchos::rcp_dynamic_cast<Matrix>(Op00);
235  G_ = Teuchos::rcp_dynamic_cast<Matrix>(Op01);
236  D_ = Teuchos::rcp_dynamic_cast<Matrix>(Op10);
237  Z_ = Teuchos::rcp_dynamic_cast<Matrix>(Op11);
238 
239  // TODO move this to BlockedCrsMatrix->getMatrix routine...
240  F_->CreateView("stridedMaps", bA->getRangeMap(0), bA->getDomainMap(0));
241  G_->CreateView("stridedMaps", bA->getRangeMap(0), bA->getDomainMap(1));
242  D_->CreateView("stridedMaps", bA->getRangeMap(1), bA->getDomainMap(0));
243  Z_->CreateView("stridedMaps", bA->getRangeMap(1), bA->getDomainMap(1));
244 
245  const ParameterList & pL = Factory::GetParameterList();
246  bool bSIMPLEC = pL.get<bool>("UseSIMPLEC");
247 
248  // Create the inverse of the diagonal of F
249  RCP<Vector> diagFVector = VectorFactory::Build(F_->getRowMap());
250  if(!bSIMPLEC) {
251  F_->getLocalDiagCopy(*diagFVector); // extract diagonal of F
252  diagFVector->reciprocal(*diagFVector); // build reciprocal
253  } else {
254  const RCP<const Map> rowmap = F_->getRowMap();
255  size_t locSize = rowmap->getNodeNumElements();
256  Teuchos::ArrayRCP<SC> diag = diagFVector->getDataNonConst(0);
257  Teuchos::ArrayView<const LO> cols;
258  Teuchos::ArrayView<const SC> vals;
259  for (size_t i=0; i<locSize; ++i) { // loop over rows
260  F_->getLocalRowView(i,cols,vals);
261  Scalar absRowSum = Teuchos::ScalarTraits<Scalar>::zero();
262  for (LO j=0; j<cols.size(); ++j) { // loop over cols
263  absRowSum += Teuchos::ScalarTraits<Scalar>::magnitude(vals[j]);
264  }
265  diag[i] = absRowSum;
266  }
267  diagFVector->reciprocal(*diagFVector); // build reciprocal
268  }
269  diagFinv_ = diagFVector;
270 
271  // Set the Smoother
272  // carefully switch to the SubFactoryManagers (defined by the users)
273  {
274  RCP<const FactoryManagerBase> velpredictFactManager = FactManager_.at(0);
275  SetFactoryManager currentSFM (rcpFromRef(currentLevel), velpredictFactManager);
276  velPredictSmoo_ = currentLevel.Get< RCP<SmootherBase> >("PreSmoother",velpredictFactManager->GetFactory("Smoother").get());
277  }
278  {
279  RCP<const FactoryManagerBase> schurFactManager = FactManager_.at(1);
280  SetFactoryManager currentSFM (rcpFromRef(currentLevel), schurFactManager);
281  schurCompSmoo_ = currentLevel.Get< RCP<SmootherBase> >("PreSmoother", schurFactManager->GetFactory("Smoother").get());
282  }
283 
285  }
286 
287  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
288  void SimpleSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero) const
289  {
290  TEUCHOS_TEST_FOR_EXCEPTION(SmootherPrototype::IsSetup() == false, Exceptions::RuntimeError, "MueLu::SimpleSmoother::Apply(): Setup() has not been called");
291 
292  Teuchos::RCP<Teuchos::FancyOStream> fos = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout));
293 
294  SC zero = Teuchos::ScalarTraits<SC>::zero(), one = Teuchos::ScalarTraits<SC>::one();
295 
296  // extract parameters from internal parameter list
297  const ParameterList & pL = Factory::GetParameterList();
298  LocalOrdinal nSweeps = pL.get<LocalOrdinal>("Sweeps");
299  Scalar omega = pL.get<Scalar>("Damping factor");
300 
301  // wrap current solution vector in RCP
302  RCP<MultiVector> rcpX = Teuchos::rcpFromRef(X);
303 
304  // create residual vector
305  // contains current residual of current solution X with rhs B
306  RCP<MultiVector> residual = MultiVectorFactory::Build(B.getMap(), B.getNumVectors());
307 
308  // incrementally improve solution vector X
309  for (LocalOrdinal run = 0; run < nSweeps; ++run) {
310  // 1) calculate current residual
311  residual->update(one,B,zero); // residual = B
312  A_->apply(*rcpX, *residual, Teuchos::NO_TRANS, -one, one);
313 
314  // split residual vector
315  Teuchos::RCP<MultiVector> r1 = rangeMapExtractor_->ExtractVector(residual, 0);
316  Teuchos::RCP<MultiVector> r2 = rangeMapExtractor_->ExtractVector(residual, 1);
317 
318  // 2) solve F * \Delta \tilde{x}_1 = r_1
319  // start with zero guess \Delta \tilde{x}_1
320  RCP<MultiVector> xtilde1 = MultiVectorFactory::Build(F_->getRowMap(),1);
321  xtilde1->putScalar(zero);
322  velPredictSmoo_->Apply(*xtilde1,*r1);
323 
324  // 3) calculate rhs for SchurComp equation
325  // r_2 - D \Delta \tilde{x}_1
326  RCP<MultiVector> schurCompRHS = MultiVectorFactory::Build(Z_->getRowMap(),1);
327  D_->apply(*xtilde1,*schurCompRHS);
328  schurCompRHS->update(one,*r2,-one);
329 
330  // 4) solve SchurComp equation
331  // start with zero guess \Delta \tilde{x}_2
332  RCP<MultiVector> xtilde2 = MultiVectorFactory::Build(Z_->getRowMap(),1);
333  xtilde2->putScalar(zero);
334  schurCompSmoo_->Apply(*xtilde2,*schurCompRHS);
335 
336  // 5) scale xtilde2 with omega
337  // store this in xhat2
338  RCP<MultiVector> xhat2 = MultiVectorFactory::Build(Z_->getRowMap(),1);
339  xhat2->update(omega,*xtilde2,zero);
340 
341  // 6) calculate xhat1
342  RCP<MultiVector> xhat1 = MultiVectorFactory::Build(F_->getRowMap(),1);
343  RCP<MultiVector> xhat1_temp = MultiVectorFactory::Build(F_->getRowMap(),1);
344  G_->apply(*xhat2,*xhat1_temp); // store result temporarely in xtilde1_temp
345  xhat1->elementWiseMultiply(one/*/omega*/,*diagFinv_,*xhat1_temp,zero);
346  xhat1->update(one,*xtilde1,-one);
347 
348  // 7) extract parts of solution vector X
349  Teuchos::RCP<MultiVector> x1 = domainMapExtractor_->ExtractVector(rcpX, 0);
350  Teuchos::RCP<MultiVector> x2 = domainMapExtractor_->ExtractVector(rcpX, 1);
351 
352  // 8) update solution vector with increments xhat1 and xhat2
353  // rescale increment for x2 with omega_
354  x1->update(one,*xhat1,one); // x1 = x1_old + xhat1
355  x2->update(/*omega*/ one,*xhat2,one); // x2 = x2_old + omega xhat2
356 
357  // write back solution in global vector X
358  domainMapExtractor_->InsertVector(x1, 0, rcpX);
359  domainMapExtractor_->InsertVector(x2, 1, rcpX);
360 
361  }
362  }
363 
364  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
365  RCP<MueLu::SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
367  return rcp( new SimpleSmoother(*this) );
368  }
369 
370  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
372  std::ostringstream out;
374  out << "{type = " << type_ << "}";
375  return out.str();
376  }
377 
378  template <class Scalar,class LocalOrdinal, class GlobalOrdinal, class Node>
379  void SimpleSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node>::print(Teuchos::FancyOStream &out, const VerbLevel verbLevel) const {
381 
382  if (verbLevel & Parameters0) {
383  out0 << "Prec. type: " << type_ << /*" Sweeps: " << nSweeps_ << " damping: " << omega_ <<*/ std::endl;
384  }
385 
386  if (verbLevel & Debug) {
387  out0 << "IsSetup: " << Teuchos::toString(SmootherPrototype::IsSetup()) << std::endl;
388  }
389  }
390 
391 } // namespace MueLu
392 
393 
394 #endif /* MUELU_SIMPLESMOOTHER_DEF_HPP_ */
Teuchos::RCP< SmootherBase > velPredictSmoo_
smoother for velocity prediction
Important warning messages (one line)
Generic Smoother Factory for generating the smoothers of the MG hierarchy.
void SetSchurCompFactoryManager(RCP< FactoryManager > FactManager)
Exception indicating invalid cast attempted.
void AddFactoryManager(RCP< const FactoryManagerBase > FactManager, int pos)
Add a factory manager at a specific position.
This class specifies the default factory that should generate some data on a Level if the data does n...
std::string type_
smoother type
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
Teuchos::RCP< SmootherBase > schurCompSmoo_
smoother for SchurComplement equation
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
std::vector< Teuchos::RCP< const FactoryManagerBase > > FactManager_
vector of factory managers
Timer to be used in factories. Similar to Monitor but with additional timers.
void Setup(Level &currentLevel)
Setup routine.
Teuchos::RCP< Matrix > G_
pressure gradient operator
Print additional debugging information.
Namespace for MueLu classes and methods.
virtual const Teuchos::ParameterList & GetParameterList() const
void DeclareInput(Level &currentLevel) const
Input.
void SetVelocityPredictionFactoryManager(RCP< FactoryManager > FactManager)
virtual ~SimpleSmoother()
Destructor.
Class that encapsulates direct solvers. Autoselection of AmesosSmoother or Amesos2Smoother according ...
RCP< SmootherPrototype > Copy() const
RCP< Matrix > A_
block operator
Teuchos::RCP< Matrix > F_
fluid operator
RCP< const ParameterList > GetValidParameterList() const
Input.
std::string description() const
Return a simple one-line description of this object.
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:99
Teuchos::RCP< Vector > diagFinv_
matrices
Teuchos::RCP< Matrix > Z_
pressure stabilization term or null block
Factory for building a thresholded operator.
Teuchos::RCP< Matrix > D_
divergence operator
bool IsSetup() const
Get the state of a smoother prototype.
#define MUELU_DESCRIBE
Helper macro for implementing Describable::describe() for BaseClass objects.
void Apply(MultiVector &X, MultiVector const &B, bool InitialGuessIsZero=false) const
Apply the Braess Sarazin smoother.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Print class parameters.
Factory for building the Schur Complement for a 2x2 block matrix.
RCP< const MapExtractorClass > domainMapExtractor_
domain map extractor (from A_ generated by AFact)
Exception throws to report errors in the internal logical of the program.
An exception safe way to call the method &#39;Level::SetFactoryManager()&#39;.
RCP< const MapExtractorClass > rangeMapExtractor_
range map extractor (from A_ generated by AFact)
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
virtual std::string description() const
Return a simple one-line description of this object.
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Default implementation of FactoryAcceptor::GetFactory()