MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_Level.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_LEVEL_HPP
47 #define MUELU_LEVEL_HPP
48 
49 #include <algorithm> // for swap
50 #include <map> // for _Rb_tree_const_iterator, etc
51 #include <ostream> // for basic_ostream, etc
52 #include <string> // for char_traits, string, etc
53 #include <utility> // for pair
54 
55 #include <Teuchos_Describable.hpp> // for operator<<
56 #include <Teuchos_FancyOStream.hpp> // for FancyOStream
57 #include <Teuchos_RCPDecl.hpp> // for RCP
58 #include <Teuchos_RCP.hpp> // for RCP::operator->, etc
59 #include <Teuchos_TestForException.hpp> // for TEUCHOS_TEST_FOR_EXCEPTION
60 
61 #include <Xpetra_Map.hpp> // for UnderlyingLib definition
62 
63 #include "MueLu_BoostGraphviz.hpp"
64 #include "MueLu_Exceptions.hpp" // for RuntimeError
66 #include "MueLu_KeepType.hpp"
67 #include "MueLu_NoFactory.hpp"
68 #include "MueLu_Utilities.hpp"
70 #include "MueLu_VerbosityLevel.hpp" // for MsgType::Default, VerbLevel
71 
72 namespace MueLu {
73 
99 class Level : public BaseClass {
100  public:
102 
104 
106  : lib_(Xpetra::NotSpecified)
107  , levelID_(-1) {}
108 
110  : lib_(Xpetra::UseTpetra)
111  , levelID_(-1)
112  , factoryManager_(factoryManager) {}
113 
115  virtual ~Level() {}
116 
118 
120  RCP<Level> Build();
123 
125 
127 
130  int GetLevelID() const;
131 
133  void SetLevelID(int levelID);
134 
137 
140  void SetPreviousLevel(const RCP<Level>& previousLevel);
142 
144 
145  // Users should not use this method.
147  void SetFactoryManager(const RCP<const FactoryManagerBase>& factoryManager);
148 
150  // Users should not use this method
153 
155 
160  template <class T>
161  void Set(const std::string& ename, const T& entry, const FactoryBase* factory = NoFactory::get()) {
162  const FactoryBase* fac = GetFactory(ename, factory);
163 
164  if (fac == NoFactory::get()) {
165  // Any data set with a NoFactory gets UserData keep flag by default
167  }
168 
169  // Store entry only if data have been requested (or any keep flag)
170  if (IsRequested(ename, factory) || GetKeepFlag(ename, factory) != 0) {
171  TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(factory, ename), Exceptions::RuntimeError, "" + ename + " not found in");
172  map_[factory][ename]->SetData(entry);
173 
174  } else {
175  GetOStream(Runtime1) << "Level::Set: Not storing \"" << ename << "\" generated by factory " << factory->ShortClassName() << "[" << factory->GetID() << "]"
176  << " on level " << toString(GetLevelID()) << ", as it has not been requested and no keep flags were set for it" << std::endl;
177  }
178  } // Set
179 
181 
184 
186 
194  template <class T>
195  T& Get(const std::string& ename, const FactoryBase* factory = NoFactory::get()) {
196  const FactoryBase* fac = GetFactory(ename, factory);
197  /* printf("(l=%d) getting \"%20s\" generated by %10p [actually, generated by %p (%43s)]\n",
198  levelID_, ename.c_str(), factory, fac, fac->description().c_str());*/
199 
200  TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(fac, ename), Exceptions::RuntimeError, "\"" + ename + "\" generated by factory \"" + fac->description() + "\" not found on level " + toString(GetLevelID()) + ".");
201 
202  if (!IsAvailable(ename, fac)) {
203  TEUCHOS_TEST_FOR_EXCEPTION(NumRequests(fac, ename) < 1 && GetKeepFlag(ename, fac) == 0, Exceptions::RuntimeError,
204  "\"" << ename << "\" has not been requested (counter = " << NumRequests(fac, ename) << ", "
205  "KeepFlag = "
206  << GetKeepFlag(ename, fac) << "). " << std::endl
207  << "Generating factory:" << *fac << " NoFactory = " << NoFactory::get());
208  fac->CallBuild(*this);
209  Release(*fac);
210  }
211 
213  "MueLu::Level::Get(): factory did not produce expected output on level " << GetLevelID()
214  << ". The data \"" << ename << "\" has not been generated by " << *fac);
215 
216  return map_[fac][ename]->template GetData<T>();
217  }
218 
220  template <class T>
221  void Get(const std::string& ename, T& rValue, const FactoryBase* factory = NoFactory::get()) {
222  rValue = Get<T>(ename, factory);
223  }
224 
225  template <class T>
226  bool IsType(const std::string& ename, const FactoryBase* factory = NoFactory::get()) {
227  const FactoryBase* fac = GetFactory(ename, factory);
228 
229  TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(fac, ename), Exceptions::RuntimeError, "\"" + ename + "\" generated by factory \"" + fac->description() + "\" not found on level " + toString(GetLevelID()) + ".");
230 
231  if (!IsAvailable(ename, fac)) {
232  TEUCHOS_TEST_FOR_EXCEPTION(NumRequests(fac, ename) < 1 && GetKeepFlag(ename, fac) == 0, Exceptions::RuntimeError,
233  "\"" << ename << "\" has not been requested (counter = " << NumRequests(fac, ename) << ", "
234  "KeepFlag = "
235  << GetKeepFlag(ename, fac) << "). " << std::endl
236  << "Generating factory:" << *fac << " NoFactory = " << NoFactory::get());
237  fac->CallBuild(*this);
238  Release(*fac);
239  }
240 
242  "MueLu::Level::Get(): factory did not produce expected output on level " << GetLevelID()
243  << ". The data \"" << ename << "\" has not been generated by " << *fac);
244 
245  return map_[fac][ename]->template CheckType<T>();
246  }
247 
254  std::string GetTypeName(const std::string& ename, const FactoryBase* factory = NoFactory::get()) {
255  const FactoryBase* fac = GetFactory(ename, factory);
256  TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(fac, ename), Exceptions::RuntimeError, "\"" + ename + "\" not found");
257 
259  "MueLu::Level::GetTypeString(): Data "
260  "\"" << ename
261  << "\" generated by " << *fac << " is not available.");
262 
263  return map_[fac][ename]->GetTypeName();
264  }
265 
267 
269 
270 
272  // This method is intented to be used by user drivers for printing, debugging or to keep some computed data for a next run of the setup phase.
273  //
274  // This method is an alias for: AddKeepFlag(ename, factory, MueLu::Keep)
275  // See also the description of KeepEnum for more information.
276  //
277  // To undo a keep request, one can use:
278  // - Delete(ename, factory) to delete the data and remove the "Keep" flag
279  // - or RemoveKeepFlag(ename, factory, MueLu::Keep) to go back to previous condition (data are kept only if internal MueLu logic need so).
280  //
281  // Note: Level variables tagged using this methods are also keep on the levels built using this.Build().
282  // This means that is you request to keep a specific variable on a fine level, all the coarser level that are created automatically during the setup phase will also retain the same variable.
283  void Keep(const std::string& ename, const FactoryBase* factory) { AddKeepFlag(ename, factory, MueLu::Keep); } // Note: do not add default value for input parameter 'factory'
284 
286  // Special cases:
287  // - If entry (ename, factory) does not exist, nothing is done.
288  // - If entry exists but counter !=, entry cannot be desallocated before counter set to 0 (using Release()) so an exeption is thrown.
289  void Delete(const std::string& ename, const FactoryBase* factory) { // Note: do not add default value for input parameter 'factory'
290  if (!IsKey(factory, ename))
291  return;
292 
293  // Precondition:
294  // Delete() should only be called if counter == 0
295  // Note: It better to throw an exception rather than deleting the data if counter != 0 because users are not supposed to manipulate data with counter != 0
296  TEUCHOS_TEST_FOR_EXCEPTION(IsRequested(ename, factory) == true, Exceptions::RuntimeError, "MueLu::Level::Delete(): IsRequested() == true. Ref counter != 0. You are not allowed to delete data that are still in use.");
297  // If counter == 0 and entry exists, this means that a keep flag is set. Or there is an internal logic problem.
298  TEUCHOS_TEST_FOR_EXCEPTION(GetKeepFlag(ename, factory) == 0, Exceptions::RuntimeError, "MueLu::Level::Delete(), Keep flag == 0?");
299 
300  RemoveKeepFlag(ename, factory, MueLu::All); // will delete the data if counter == 0
301 
302  // Post condition: data must have been deleted
303  TEUCHOS_TEST_FOR_EXCEPTION(IsAvailable(ename, factory) == true, Exceptions::RuntimeError, "MueLu::Level::Delete(): Internal error (Post condition). Data have not been deleted.");
304  }
305 
307  void Clear();
308 
311  void ExpertClear();
312 
316  bool IsKept(const std::string& ename, const FactoryBase* factory, KeepType keep) const { return GetKeepFlag(ename, factory) & keep; }
317 
322  void AddKeepFlag(const std::string& ename, const FactoryBase* factory = NoFactory::get(), KeepType keep = MueLu::Keep); // TODO: remove default value for input parameter 'factory'?
323 
327  void RemoveKeepFlag(const std::string& ename, const FactoryBase* factory, KeepType keep = MueLu::All);
328 
330  KeepType GetKeepFlag(const std::string& ename, const FactoryBase* factory) const;
331 
333 
336 
337 
339  void Request(const FactoryBase& factory);
340 
342  void Release(const FactoryBase& factory);
343 
345  void DeclareInput(const std::string& ename, const FactoryBase* factory, const FactoryBase* requestedBy = NoFactory::get());
346 
348  void DeclareDependencies(const FactoryBase* factory, bool bRequestOnly = false, bool bReleaseOnly = false);
349 
351  void Request(const std::string& ename, const FactoryBase* factory = NoFactory::get(), const FactoryBase* requestedBy = NoFactory::get());
352 
354  void Release(const std::string& ename, const FactoryBase* factory = NoFactory::get(), const FactoryBase* requestedBy = NoFactory::get());
355 
357 
359 
360 
362  bool IsAvailable(const std::string& ename, const FactoryBase* factory = NoFactory::get()) const {
363  if (!IsKey(factory, ename))
364  return false;
365  try {
366  return Get(factory, ename)->IsAvailable();
367  } catch (...) {
368  return false;
369  }
370  }
371 
373  bool IsRequested(const std::string& ename, const FactoryBase* factory = NoFactory::get()) const {
374  if (!IsKey(factory, ename))
375  return false;
376  try {
377  return IsRequested(Get(factory, ename));
378  } catch (...) {
379  return false;
380  }
381  }
382 
384 
386 
388  std::string description() const;
389 
391  // TODO: print only shows requested variables. check if we also list kept factories with ref counter=0?
392  void print(std::ostream& out, const VerbLevel verbLevel = Default) const;
393 
394 #if defined(HAVE_MUELU_BOOST) && defined(HAVE_MUELU_BOOST_FOR_REAL) && defined(BOOST_VERSION) && (BOOST_VERSION >= 104400)
395  void UpdateGraph(std::map<const FactoryBase*, BoostVertex>& vindices,
396  std::map<std::pair<BoostVertex, BoostVertex>, std::string>& edges,
397  BoostProperties& dp,
398  BoostGraph& graph) const;
399 #endif
400 
402 
405  UNDEF };
407 
408  void setlib(Xpetra::UnderlyingLib lib2) { lib_ = lib2; }
410 
411  void SetComm(RCP<const Teuchos::Comm<int> > const& comm) { comm_ = comm; }
413 
414  private:
416  Level(const Level& source);
417 
419  //
420  // If factory == NULL, the default factory is defined as follow:
421  // - If user data is available, it is considered as the default and the factory manager is ignored.
422  // => The default factory is then NoFactory.
423  // - Else, the factory manager is used to get the default factory.
424  //
425  // This strategy allows to use the same factory manager on the fine and coarse level without any trouble.
426  // Example :
427  //
428  // FineLevel:
429  // ----------
430  // A -> User provided
431  // Nullspace -> User provided
432  //
433  // CoarseLevel:
434  // ------------
435  // A -> RAPFactory
436  // NullSpace -> NullspaceFactory
437  //
438  const FactoryBase* GetFactory(const std::string& varname, const FactoryBase* factory) const;
439 
443 
444  typedef const FactoryBase* Key1;
445  typedef const std::string Key2;
449 
450  int levelID_; // id number associated with level
452  RCP<Level> previousLevel_; // linked list of Level
454 
456 
457 
459  bool IsKey(const FactoryBase* factory, const std::string& ename) const {
460  TwoKeyMap::const_iterator it = map_.find(factory);
461  return (it != map_.end()) ? (it->second).count(ename) : false;
462  }
463 
464  bool IsAvailableFactory(const FactoryBase* factory) const {
465  TwoKeyMap::const_iterator it = map_.find(factory);
466  if (it == map_.end())
467  return false;
468  for (SubMap::const_iterator sit = it->second.begin(); sit != it->second.end(); sit++) {
469  if (sit->second->IsAvailable())
470  return true;
471  }
472  return false;
473  }
474 
475  bool IsRequested(const Value& v) const {
476  TEUCHOS_TEST_FOR_EXCEPTION(v->NumAllRequests() == 0 && v->GetKeepFlag() == 0, Exceptions::RuntimeError,
477  "Internal logic error: if counter == 0, the entry in countTable_ should have been deleted");
478  return v->IsRequested();
479  }
480 
481  bool IsRequestedBy(const FactoryBase* factory, const std::string& ename, const FactoryBase* requestedBy) const {
482  if (!IsKey(factory, ename))
483  return false;
484 
485  return IsRequestedBy(Get(factory, ename), requestedBy);
486  }
487 
488  bool IsRequestedBy(const Value& v, const FactoryBase* requestedBy) const {
489  TEUCHOS_TEST_FOR_EXCEPTION(v->NumAllRequests() == 0 && v->GetKeepFlag() == 0, Exceptions::RuntimeError,
490  "Internal logic error: if counter == 0, the entry in countTable_ should have been deleted");
491  return v->IsRequested(requestedBy);
492  }
493 
494  bool IsRequestedFactory(const FactoryBase* factory) const {
495  TwoKeyMap::const_iterator it = map_.find(factory);
496  if (it == map_.end())
497  return false;
498  for (SubMap::const_iterator sit = it->second.begin(); sit != it->second.end(); sit++)
499  if (IsRequested(sit->second))
500  return true;
501  return false;
502  }
503 
504  const Value& Get(const FactoryBase* factory, const std::string& ename) const {
505  TwoKeyMap::const_iterator it = map_.find(factory);
506  TEUCHOS_TEST_FOR_EXCEPTION(it == map_.end(), Exceptions::RuntimeError, "Key (" << factory << ", *) does not exist.");
507 
508  SubMap::const_iterator sit = it->second.find(ename);
509  TEUCHOS_TEST_FOR_EXCEPTION(sit == it->second.end(), Exceptions::RuntimeError, "Key (" << factory << ", " << ename << ") does not exist.");
510 
511  return sit->second;
512  }
513 
514  int NumRequests(const FactoryBase* factory, const std::string& ename) const {
515  TEUCHOS_TEST_FOR_EXCEPTION(!IsKey(factory, ename), Exceptions::RuntimeError, "\"" + ename + "\" not found. Do a request first.");
516  const Teuchos::RCP<MueLu::VariableContainer>& v = Get(factory, ename);
518  "NumRequests(): Internal logic error: if counter == 0, the entry in countTable_ should have been deleted");
519  return v->NumAllRequests();
520  }
521 
522  int CountRequestedFactory(const FactoryBase* factory) const {
523  TwoKeyMap::const_iterator it = map_.find(factory);
524  if (it == map_.end())
525  return 0;
526 
527  int cnt = 0;
528  for (SubMap::const_iterator sit = it->second.begin(); sit != it->second.end(); sit++)
529  cnt += sit->second->NumAllRequests();
530 
531  return cnt;
532  }
533 
535 
536 }; // class Level
537 
538 } // namespace MueLu
539 
540 // TODO: Caps should not matter
541 
542 #endif // MUELU_LEVEL_HPP
void Keep(const std::string &ename, const FactoryBase *factory)
Request to keep variable &#39;ename&#39; generated by &#39;factory&#39; after the setup phase.
RCP< Level > & GetPreviousLevel()
Previous level.
RCP< const Teuchos::Comm< int > > comm_
KeepType GetKeepFlag(const std::string &ename, const FactoryBase *factory) const
Get the flag combination set for variable &#39;ename&#39; generated by &#39;factory&#39;.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access). Usage: Level-&gt;Get&lt; RCP&lt;Matrix&gt; &gt;(&quot;A&quot;, factory) if factory == NULL =&gt; use default factory.
virtual void CallBuild(Level &requestedLevel) const =0
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
bool IsKept(const std::string &ename, const FactoryBase *factory, KeepType keep) const
void DeclareDependencies(const FactoryBase *factory, bool bRequestOnly=false, bool bReleaseOnly=false)
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput() to declare factory depe...
bool IsRequested(const Value &v) const
void Release(const FactoryBase &factory)
Decrement the storage counter for all the inputs of a factory.
const std::string Key2
Xpetra::UnderlyingLib lib_
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
short KeepType
KeepType GetKeepFlag() const
Returns the keep flag combination.
TwoKeyMap map_
RCP< Level > previousLevel_
User data are always kept. This flag is set automatically when Level::Set(&quot;data&quot;, data) is used...
void SetPreviousLevel(const RCP< Level > &previousLevel)
Definition: MueLu_Level.cpp:85
void SetFactoryManager(const RCP< const FactoryManagerBase > &factoryManager)
Set default factories (used internally by Hierarchy::SetLevel()).
Definition: MueLu_Level.cpp:92
int CountRequestedFactory(const FactoryBase *factory) const
static const NoFactory * get()
void setlib(Xpetra::UnderlyingLib lib2)
RequestMode GetRequestMode() const
const Value & Get(const FactoryBase *factory, const std::string &ename) const
Base class for factories (e.g., R, P, and A_coarse).
void Clear()
Delete all data that have been retained after the setup phase using Final flag.
bool IsRequestedBy(const FactoryBase *factory, const std::string &ename, const FactoryBase *requestedBy) const
const FactoryBase * GetFactory(const std::string &varname, const FactoryBase *factory) const
If input factory == NULL, returns the default factory. Else, return input factory.
void ExpertClear()
const FactoryBase * Key1
bool IsRequestedBy(const Value &v, const FactoryBase *requestedBy) const
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:99
Level(RCP< FactoryManagerBase > &factoryManager)
static RequestMode requestMode_
void Delete(const std::string &ename, const FactoryBase *factory)
Delete data that have been retained after the setup phase (using Keep(), AddKeepFlag(), or internal MueLu logic).
int levelID_
Map of a map (Key1 -&gt; SubMap)
std::string GetTypeName(const std::string &ename, const FactoryBase *factory=NoFactory::get())
GetTypeName returns type string of variable stored using ename and factory.
void RemoveKeepFlag(const std::string &ename, const FactoryBase *factory, KeepType keep=MueLu::All)
std::string description() const
Return a simple one-line description of this object.
Xpetra::UnderlyingLib lib()
Always keep data, even accross run. This flag is set by Level::Keep(). This flag is propagated to coa...
virtual ~Level()
Destructor.
int NumRequests(const FactoryBase *factory, const std::string &ename) const
void AddKeepFlag(const std::string &ename, const FactoryBase *factory=NoFactory::get(), KeepType keep=MueLu::Keep)
void Set(const std::string &ename, const T &entry, const FactoryBase *factory=NoFactory::get())
bool IsAvailableFactory(const FactoryBase *factory) const
Base class for MueLu classes.
RCP< Level > Build()
Definition: MueLu_Level.cpp:54
void print(std::ostream &out, const VerbLevel verbLevel=Default) const
Printing method.
bool IsType(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Teuchos::map< Key1, SubMap > TwoKeyMap
Sub-map container (Key2 -&gt; Value)
void SetLevelID(int levelID)
Set level number.
Definition: MueLu_Level.cpp:78
RCP< const FactoryManagerBase > factoryManager_
bool IsRequestedFactory(const FactoryBase *factory) const
Teuchos::map< Key2, Value > SubMap
const RCP< const FactoryManagerBase > GetFactoryManager()
returns the current factory manager
Definition: MueLu_Level.cpp:96
int GetLevelID() const
Return level number.
Definition: MueLu_Level.cpp:76
Exception throws to report errors in the internal logical of the program.
void SetComm(RCP< const Teuchos::Comm< int > > const &comm)
Description of what is happening (more verbose)
bool IsRequested(const std::string &ename, const FactoryBase *factory=NoFactory::get()) const
Test whether a need has been requested. Note: this tells nothing about whether the need&#39;s value exist...
bool IsKey(const FactoryBase *factory, const std::string &ename) const
Test whether some information about (ename, factory) are stored.
int NumAllRequests() const
Returns the number of times the data has been requested.
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
RCP< const Teuchos::Comm< int > > GetComm() const
void Get(const std::string &ename, T &rValue, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access).
virtual std::string description() const
Return a simple one-line description of this object.
bool IsAvailable(const std::string &ename, const FactoryBase *factory=NoFactory::get()) const
Test whether a need&#39;s value has been saved.
void Request(const FactoryBase &factory)
Increment the storage counter for all the inputs of a factory.
RCP< VariableContainer > Value