46 #ifndef MUELU_TWOLEVELFACTORY_HPP 47 #define MUELU_TWOLEVELFACTORY_HPP 54 #include "MueLu_Utilities.hpp" 96 std::ostringstream errStr;
97 errStr <<
"LevelID = " << requestedLevel.
GetLevelID();
116 #ifdef HAVE_MUELU_DEBUG 118 TEUCHOS_TEST_FOR_EXCEPTION((multipleCallCheck_ == ENABLED) && (multipleCallCheckGlobal_ == ENABLED) && (lastLevelID_ == levelID),
120 this->
ShortClassName() <<
"::Build() called twice for the same level (levelID=" << levelID
121 <<
"). This is likely due to a configuration error, or calling hierarchy setup multiple times " 122 <<
"without resetting debug info through FactoryManager::ResetDebugData().");
123 if (multipleCallCheck_ == FIRSTCALL)
124 multipleCallCheck_ = ENABLED;
126 lastLevelID_ = levelID;
130 RCP<const Teuchos::Comm<int> > comm = requestedLevel.
GetComm();
131 if (comm.is_null()) {
136 if (!prevLevel.is_null())
137 comm = prevLevel->GetComm();
144 #ifdef HAVE_MUELU_TIMER_SYNCHRONIZATION 147 if (!comm.is_null()) {
155 #ifdef HAVE_MUELU_TIMER_SYNCHRONIZATION 157 if (!comm.is_null()) {
176 #define MUELU_TWOLEVELFACTORY_SHORT 177 #endif //ifndef MUELU_TWOLEVELFACTORY_HPP RCP< Level > & GetPreviousLevel()
Previous level.
std::string toString(const T &what)
Little helper function to convert non-string types to strings.
Base class for factories that use two levels (fineLevel and coarseLevel).
Namespace for MueLu classes and methods.
virtual void CallBuild(Level &requestedLevel) const
virtual const Teuchos::ParameterList & GetParameterList() const
Integrates Teuchos::TimeMonitor with MueLu verbosity system.
Print skeleton for the run, i.e. factory calls and used parameters.
virtual std::string ShortClassName() const
Return the class name of the object, without template parameters and without namespace.
int SetProcRankVerbose(int procRank) const
Set proc rank used for printing.
RCP< ParameterList > RemoveFactoriesFromList(const ParameterList &list) const
Class that holds all level-specific information.
virtual ~TwoLevelFactoryBase()
Destructor.
virtual void Build(Level &fineLevel, Level &coarseLevel) const =0
Build an object with this factory.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
TwoLevelFactoryBase()
Constructor.
virtual void CallDeclareInput(Level &requestedLevel) const
int GetLevelID() const
Return level number.
Exception throws to report errors in the internal logical of the program.
RCP< const Teuchos::Comm< int > > GetComm() const
virtual void DeclareInput(Level &fineLevel, Level &coarseLevel) const =0
Input.
Exception throws to report data dependency problems between factories.