MueLu Version of the Day
Loading...
Searching...
No Matches
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
18
19namespace MueLu {
20
43class VerboseObject : public Teuchos::VerboseObject<VerboseObject> {
44 public:
46
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
77 Teuchos::FancyOStream& GetBlackHole() const;
78
79 static void SetMueLuOStream(const Teuchos::RCP<Teuchos::FancyOStream>& mueluOStream);
80
81 static void SetMueLuOFileStream(const std::string& filename);
82
83 static Teuchos::RCP<Teuchos::FancyOStream> GetMueLuOStream();
84
86
87
89 static void SetDefaultVerbLevel(const VerbLevel defaultVerbLevel);
90
93
95
96 private:
99 mutable int procRank_;
101
102 static Teuchos::RCP<Teuchos::FancyOStream> mueluOutputStream_;
103 static Teuchos::RCP<Teuchos::FancyOStream> blackHole_;
104
107}; // class VerboseObject
108
109} // namespace MueLu
110
111#define MUELU_VERBOSECLASS_SHORT
112#endif // MUELU_VERBOSEOBJECT_HPP
Verbose class for MueLu classes.
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
VerbLevel GetVerbLevel() const
Get the verbosity level.
int SetProcRankVerbose(int procRank) const
Set proc rank used for printing.
VerbLevel verbLevel_
Verbose level specific to 'this'.
static Teuchos::RCP< Teuchos::FancyOStream > blackHole_
static VerbLevel GetDefaultVerbLevel()
Get the default (global) verbosity level.
static Teuchos::RCP< Teuchos::FancyOStream > GetMueLuOStream()
void SetVerbLevel(const VerbLevel verbLevel)
Set the verbosity level of this object.
bool IsPrint(MsgType type, int thisProcRankOnly=-1) const
Find out whether we need to print out information for a specific message type.
static Teuchos::RCP< Teuchos::FancyOStream > mueluOutputStream_
static void SetMueLuOStream(const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)
static VerbLevel globalVerbLevel_
Global verbose level. This verbose level is used when the verbose level of the object is not specifie...
Teuchos::FancyOStream & GetBlackHole() const
static void SetDefaultVerbLevel(const VerbLevel defaultVerbLevel)
Set the default (global) verbosity level.
virtual ~VerboseObject()
Destructor.
static void SetMueLuOFileStream(const std::string &filename)
int GetProcRankVerbose() const
Get proc rank used for printing. Do not use this information for any other purpose.
Namespace for MueLu classes and methods.