MueLu  Version of the Day
MueLu::VerboseObject Class Reference

Verbose class for MueLu classes. More...

#include <MueLu_VerboseObject.hpp>

Inheritance diagram for MueLu::VerboseObject:
MueLu::BaseClass 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::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::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::FancyOStream & GetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type. More...
 
Teuchos::FancyOStream & GetBlackHole () const
 

Static Public Member Functions

static void SetDefaultOStream (const Teuchos::RCP< Teuchos::FancyOStream > &defaultOStream)
 
static Teuchos::RCP< Teuchos::FancyOStream > GetDefaultOStream ()
 

Private Attributes

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

Static Private Attributes

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...
 

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
  • Right now, you can't change the verbosity level globally. We have to take into account Teuchos::EVerbosityLevel from the base class Teuchos::VerboseObject and somehow convert it to a MsgType.
  • Allow users to define the global verbosity level using both MueLu::MsgType and Teuchos::EVerbosityLevel?
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 60 of file MueLu_VerboseObject.cpp.

MueLu::VerboseObject::~VerboseObject ( )
virtual

Destructor.

Definition at line 92 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 94 of file MueLu_VerboseObject.cpp.

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

Set the verbosity level of this object.

Definition at line 98 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 102 of file MueLu_VerboseObject.cpp.

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

Set proc rank used for printing.

Definition at line 106 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 114 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 118 of file MueLu_VerboseObject.cpp.

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

Definition at line 129 of file MueLu_VerboseObject.cpp.

void MueLu::VerboseObject::SetDefaultOStream ( const Teuchos::RCP< Teuchos::FancyOStream > &  defaultOStream)
static

Definition at line 143 of file MueLu_VerboseObject.cpp.

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

Definition at line 148 of file MueLu_VerboseObject.cpp.

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

Set the default (global) verbosity level.

Definition at line 133 of file MueLu_VerboseObject.cpp.

VerbLevel MueLu::VerboseObject::GetDefaultVerbLevel ( )
static

Get the default (global) verbosity level.

Definition at line 139 of file MueLu_VerboseObject.cpp.

Member Data Documentation

VerbLevel MueLu::VerboseObject::verbLevel_
private

Verbose level specific to 'this'.

Definition at line 133 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::procRank_
mutableprivate

Definition at line 135 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::numProcs_
private

Definition at line 136 of file MueLu_VerboseObject.hpp.

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

Definition at line 138 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 141 of file MueLu_VerboseObject.hpp.


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