46 #ifndef MUELU_SINGLELEVELFACTORY_HPP 47 #define MUELU_SINGLELEVELFACTORY_HPP 54 #include "MueLu_Utilities.hpp" 94 virtual void Build(
Level & currentLevel)
const = 0;
98 #ifdef HAVE_MUELU_DEBUG 101 TEUCHOS_TEST_FOR_EXCEPTION((multipleCallCheck_ == ENABLED) && (multipleCallCheckGlobal_ == ENABLED) && (lastLevelID_ == levelID),
103 this->
ShortClassName() <<
"::Build() called twice for the same level (levelID=" << levelID
104 <<
"). This is likely due to a configuration error, or calling hierarchy setup multiple times " 105 <<
"without resetting debug info through FactoryManager::ResetDebugData().");
106 if (multipleCallCheck_ == FIRSTCALL)
107 multipleCallCheck_ = ENABLED;
109 lastLevelID_ = levelID;
112 RCP<const Teuchos::Comm<int> > comm = requestedLevel.
GetComm();
113 if (comm.is_null()) {
118 if (!prevLevel.is_null())
119 comm = prevLevel->GetComm();
133 Build(requestedLevel);
156 #define MUELU_SINGLELEVELFACTORY_SHORT 157 #endif //ifndef MUELU_SINGLELEVELFACTORY_HPP RCP< Level > & GetPreviousLevel()
Previous level.
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
virtual std::string ShortClassName() const
Return the class name of the object, without template parameters and without namespace.
virtual ~SingleLevelFactoryBase()
Destructor.
RCP< ParameterList > RemoveFactoriesFromList(const ParameterList &list) const
Namespace for MueLu classes and methods.
Integrates Teuchos::TimeMonitor with MueLu verbosity system.
int SetProcRankVerbose(int procRank) const
Set proc rank used for printing.
int GetLevelID() const
Return level number.
virtual void DeclareInput(Level ¤tLevel) const =0
Specifies the data that this class needs, and the factories that generate that data.
Class that holds all level-specific information.
RCP< const Teuchos::Comm< int > > GetComm() const
virtual const Teuchos::ParameterList & GetParameterList() const
SingleLevelFactoryBase()
Constructor.
virtual void CallDeclareInput(Level &requestedLevel) const
virtual void CallBuild(Level &requestedLevel) const
Exception throws to report errors in the internal logical of the program.
Base class for factories that use one level (currentLevel).
virtual void Build(Level ¤tLevel) const =0
Build an object with this factory.