MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu::VerboseObject Class Reference

Verbose class for MueLu classes. More...

#include <MueLu_VerboseObject.hpp>

Inheritance diagram for MueLu::VerboseObject:
Teuchos::VerboseObject< VerboseObject > Teuchos::VerboseObjectBase MueLu::BaseClass MueLu::RefMaxwell< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node > MueLu::AggregationAlgorithmBase< LocalOrdinal, GlobalOrdinal, Node > MueLu::AlgebraicPermutationStrategy< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::AmalgamationInfo< LocalOrdinal, GlobalOrdinal, Node > MueLu::AMGXOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::Constraint< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::CoupledAggregationCommHelper< LocalOrdinal, GlobalOrdinal, Node > MueLu::FacadeClassBase< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FacadeClassFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FactoryBase MueLu::FactoryFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FactoryManagerBase MueLu::GraphBase< LocalOrdinal, GlobalOrdinal, Node > MueLu::Hierarchy< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::HierarchyFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::IndexManager< LocalOrdinal, GlobalOrdinal, Node > MueLu::LeftoverAggregationAlgorithm< LocalOrdinal, GlobalOrdinal, Node > MueLu::Level MueLu::LocalAggregationAlgorithm< LocalOrdinal, GlobalOrdinal, Node > MueLu::LocalPermutationStrategy< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::Monitor MueLu::MutuallyExclusiveTime< TagName > MueLu::MutuallyExclusiveTimeMonitor< TagName > MueLu::PreDropFunctionBaseClass< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::PrintMonitor MueLu::ShiftedLaplacian< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::SmootherBase< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::SolverBase< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::SubMonitor MueLu::TimeMonitor MueLu::VariableContainer MueLu::MutuallyExclusiveTimeMonitor< MueLu::FactoryBase >

Public Member Functions

VerbLevel GetVerbLevel () const
 Get the verbosity level. More...
 
void SetVerbLevel (const VerbLevel verbLevel)
 Set the verbosity level of this object. More...
 
int GetProcRankVerbose () const
 Get proc rank used for printing. Do not use this information for any other purpose. More...
 
int SetProcRankVerbose (int procRank) const
 Set proc rank used for printing. More...
 
bool IsPrint (MsgType type, int thisProcRankOnly=-1) const
 Find out whether we need to print out information for a specific message type. More...
 
Teuchos::FancyOStreamGetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type. More...
 
Teuchos::FancyOStreamGetBlackHole () const
 
- Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject)
 
- Public Member Functions inherited from Teuchos::VerboseObjectBase
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 
virtual RCP< FancyOStreamgetOStream () const
 
virtual RCP< FancyOStreamgetOverridingOStream () const
 
virtual std::string getLinePrefix () const
 
virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") const
 

Static Public Member Functions

static void SetMueLuOStream (const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)
 
static void SetMueLuOFileStream (const std::string &filename)
 
static Teuchos::RCP
< Teuchos::FancyOStream
GetMueLuOStream ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObjectBase
static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 
static RCP< FancyOStreamgetDefaultOStream ()
 

Private Attributes

VerbLevel verbLevel_
 Verbose level specific to 'this'. More...
 
int procRank_
 
int numProcs_
 

Static Private Attributes

static Teuchos::RCP
< Teuchos::FancyOStream
mueluOutputStream_ = Teuchos::null
 
static Teuchos::RCP
< Teuchos::FancyOStream
blackHole_ = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()))
 
static VerbLevel globalVerbLevel_ = High
 Global verbose level. This verbose level is used when the verbose level of the object is not specified (verbLevel_ == NotSpecified) More...
 

Constructors/Destructors.

 VerboseObject ()
 
virtual ~VerboseObject ()
 Destructor. More...
 

Public static member functions

static void SetDefaultVerbLevel (const VerbLevel defaultVerbLevel)
 Set the default (global) verbosity level. More...
 
static VerbLevel GetDefaultVerbLevel ()
 Get the default (global) verbosity level. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
- Protected Member Functions inherited from Teuchos::VerboseObjectBase
void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void informUpdatedVerbosityState () const
 

Detailed Description

Verbose class for MueLu classes.

This class is inspired by BelosOutputManager but:

  • it uses Teuchos stream
  • it allows to print message on proc0 or every processors
  • it is a base class
Todo:
TODO
Todo:
TODO
  1. add a function to get the object 'local' verb level (GetVerbLevel does not do this)?
  2. interface without fancyOSstream but std::stream
  3. add 'const' and mutable

Definition at line 79 of file MueLu_VerboseObject.hpp.

Constructor & Destructor Documentation

MueLu::VerboseObject::VerboseObject ( )

Definition at line 61 of file MueLu_VerboseObject.cpp.

MueLu::VerboseObject::~VerboseObject ( )
virtual

Destructor.

Definition at line 83 of file MueLu_VerboseObject.cpp.

Member Function Documentation

VerbLevel MueLu::VerboseObject::GetVerbLevel ( ) const

Get the verbosity level.

If a verbosity level has not been specified for this object (using SetVerbLevel), this method returns the default/global verbose level.

Definition at line 85 of file MueLu_VerboseObject.cpp.

void MueLu::VerboseObject::SetVerbLevel ( const VerbLevel  verbLevel)

Set the verbosity level of this object.

Definition at line 89 of file MueLu_VerboseObject.cpp.

int MueLu::VerboseObject::GetProcRankVerbose ( ) const

Get proc rank used for printing. Do not use this information for any other purpose.

Definition at line 93 of file MueLu_VerboseObject.cpp.

int MueLu::VerboseObject::SetProcRankVerbose ( int  procRank) const

Set proc rank used for printing.

Definition at line 97 of file MueLu_VerboseObject.cpp.

bool MueLu::VerboseObject::IsPrint ( MsgType  type,
int  thisProcRankOnly = -1 
) const

Find out whether we need to print out information for a specific message type.

This method is used to determine whether computations are necessary for this message type.

Definition at line 103 of file MueLu_VerboseObject.cpp.

Teuchos::FancyOStream & MueLu::VerboseObject::GetOStream ( MsgType  type,
int  thisProcRankOnly = 0 
) const

Get an output stream for outputting the input message type.

Definition at line 107 of file MueLu_VerboseObject.cpp.

Teuchos::FancyOStream & MueLu::VerboseObject::GetBlackHole ( ) const

Definition at line 118 of file MueLu_VerboseObject.cpp.

void MueLu::VerboseObject::SetMueLuOStream ( const Teuchos::RCP< Teuchos::FancyOStream > &  mueluOStream)
static

Definition at line 132 of file MueLu_VerboseObject.cpp.

void MueLu::VerboseObject::SetMueLuOFileStream ( const std::string &  filename)
static

Definition at line 137 of file MueLu_VerboseObject.cpp.

Teuchos::RCP< Teuchos::FancyOStream > MueLu::VerboseObject::GetMueLuOStream ( )
static

Definition at line 153 of file MueLu_VerboseObject.cpp.

void MueLu::VerboseObject::SetDefaultVerbLevel ( const VerbLevel  defaultVerbLevel)
static

Set the default (global) verbosity level.

Definition at line 122 of file MueLu_VerboseObject.cpp.

VerbLevel MueLu::VerboseObject::GetDefaultVerbLevel ( )
static

Get the default (global) verbosity level.

Definition at line 128 of file MueLu_VerboseObject.cpp.

Member Data Documentation

VerbLevel MueLu::VerboseObject::verbLevel_
private

Verbose level specific to 'this'.

Definition at line 135 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::procRank_
mutableprivate

Definition at line 137 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::numProcs_
private

Definition at line 138 of file MueLu_VerboseObject.hpp.

RCP< Teuchos::FancyOStream > MueLu::VerboseObject::mueluOutputStream_ = Teuchos::null
staticprivate

Definition at line 140 of file MueLu_VerboseObject.hpp.

RCP< Teuchos::FancyOStream > MueLu::VerboseObject::blackHole_ = Teuchos::getFancyOStream(rcp(new Teuchos::oblackholestream()))
staticprivate

Definition at line 141 of file MueLu_VerboseObject.hpp.

VerbLevel MueLu::VerboseObject::globalVerbLevel_ = High
staticprivate

Global verbose level. This verbose level is used when the verbose level of the object is not specified (verbLevel_ == NotSpecified)

Definition at line 144 of file MueLu_VerboseObject.hpp.


The documentation for this class was generated from the following files: