| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// MueLu: A package for multigrid based preconditioning |
| 4 |
// |
| 5 |
// Copyright 2012 NTESS and the MueLu contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
#ifndef MUELU_BASECLASS_HPP |
| 11 |
#define MUELU_BASECLASS_HPP |
| 12 |
|
| 13 |
#include "MueLu_ConfigDefs.hpp" |
| 14 |
#include "MueLu_VerboseObject.hpp" |
| 15 |
#include "MueLu_Describable.hpp" |
| 16 |
|
| 17 |
namespace MueLu { |
| 18 |
|
| 19 |
/*! |
| 20 |
@class BaseClass class. |
| 21 |
@brief Base class for MueLu classes |
| 22 |
|
| 23 |
@ingroup MueLuBaseClasses |
| 24 |
*/ |
| 25 |
class BaseClass |
| 26 |
: public VerboseObject, |
| 27 |
public Describable { |
| 28 |
public: |
| 29 |
//! @name Constructors/Destructors |
| 30 |
//@{ |
| 31 |
|
| 32 |
//! Destructor. |
| 33 |
virtual ~BaseClass() {} |
| 34 |
|
| 35 |
//@} |
| 36 |
|
| 37 |
}; // class BaseClass |
| 38 |
|
| 39 |
} // namespace MueLu |
| 40 |
|
| 41 |
//! Helper macro for implementing Describable::describe() for BaseClass objects. |
| 42 |
// This macro defines ostream out0 that print only on root node. It print description() and indent the ostream. |
| 43 |
// Note: Runtime1 displays basic parameter information when Parameters0 is not enabled. |
| 44 |
#define MUELU_DESCRIBE \ |
| 45 |
using std::endl; \ |
| 46 |
Teuchos::FancyOStream& out0 = (VerboseObject::GetProcRankVerbose() == 0) ? out : VerboseObject::GetBlackHole(); \ |
| 47 |
\ |
| 48 |
if ((verbLevel & Runtime1) && (!(verbLevel & Parameters0))) \ |
| 49 |
out << description() << std::endl; \ |
| 50 |
else if (verbLevel & Runtime0) \ |
| 51 |
out << BaseClass::description() << std::endl; \ |
| 52 |
\ |
| 53 |
Teuchos::OSTab tab1(out); \ |
| 54 |
// |
| 55 |
|
| 56 |
#define MUELU_BASECLASS_SHORT |
| 57 |
#endif // ifndef MUELU_BASECLASS_HPP |