MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_VerboseObject.hpp
Go to the documentation of this file.
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_VERBOSEOBJECT_HPP
11 #define MUELU_VERBOSEOBJECT_HPP
12 
13 #include "Teuchos_FancyOStream.hpp" // for FancyOStream
14 #include "Teuchos_RCPDecl.hpp" // for RCP
15 #include "Teuchos_VerboseObject.hpp"
16 
17 #include "MueLu_VerbosityLevel.hpp"
18 
19 namespace MueLu {
20 
43 class VerboseObject : public Teuchos::VerboseObject<VerboseObject> {
44  public:
46 
47  VerboseObject();
48 
50  virtual ~VerboseObject();
52 
57  VerbLevel GetVerbLevel() const;
58 
60  void SetVerbLevel(const VerbLevel verbLevel);
61 
63  int GetProcRankVerbose() const;
64 
66  int SetProcRankVerbose(int procRank) const;
67 
72  bool IsPrint(MsgType type, int thisProcRankOnly = -1) const;
73 
75  Teuchos::FancyOStream& GetOStream(MsgType type, int thisProcRankOnly = 0) const;
76 
78 
79  static void SetMueLuOStream(const Teuchos::RCP<Teuchos::FancyOStream>& mueluOStream);
80 
81  static void SetMueLuOFileStream(const std::string& filename);
82 
84 
86 
87 
89  static void SetDefaultVerbLevel(const VerbLevel defaultVerbLevel);
90 
93 
95 
96  private:
99  mutable int procRank_;
101 
104 
107 }; // class VerboseObject
108 
109 } // namespace MueLu
110 
111 #define MUELU_VERBOSECLASS_SHORT
112 #endif // MUELU_VERBOSEOBJECT_HPP
static VerbLevel GetDefaultVerbLevel()
Get the default (global) verbosity level.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Teuchos::FancyOStream & GetBlackHole() const
static Teuchos::RCP< Teuchos::FancyOStream > mueluOutputStream_
static Teuchos::RCP< Teuchos::FancyOStream > GetMueLuOStream()
Verbose class for MueLu classes.
static void SetMueLuOFileStream(const std::string &filename)
static VerbLevel globalVerbLevel_
Global verbose level. This verbose level is used when the verbose level of the object is not specifie...
static void SetDefaultVerbLevel(const VerbLevel defaultVerbLevel)
Set the default (global) verbosity level.
static Teuchos::RCP< Teuchos::FancyOStream > blackHole_
int GetProcRankVerbose() const
Get proc rank used for printing. Do not use this information for any other purpose.
bool IsPrint(MsgType type, int thisProcRankOnly=-1) const
Find out whether we need to print out information for a specific message type.
VerbLevel GetVerbLevel() const
Get the verbosity level.
virtual ~VerboseObject()
Destructor.
VerbLevel verbLevel_
Verbose level specific to &#39;this&#39;.
int SetProcRankVerbose(int procRank) const
Set proc rank used for printing.
void SetVerbLevel(const VerbLevel verbLevel)
Set the verbosity level of this object.
static void SetMueLuOStream(const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)