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::Maxwell1< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::Maxwell_Utils< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::MultiPhys< Scalar, LocalOrdinal, GlobalOrdinal, Node > 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::FacadeClassBase< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FacadeClassFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FactoryBase MueLu::FactoryFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::FactoryManagerBase MueLu::Hierarchy< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::HierarchyFactory< Scalar, LocalOrdinal, GlobalOrdinal, Node > MueLu::IndexManager< LocalOrdinal, GlobalOrdinal, Node > MueLu::IndexManager_kokkos< LocalOrdinal, GlobalOrdinal, Node > MueLu::Level 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 43 of file MueLu_VerboseObject.hpp.

Constructor & Destructor Documentation

VerboseObject::VerboseObject ( )

Definition at line 25 of file MueLu_VerboseObject.cpp.

VerboseObject::~VerboseObject ( )
virtual

Destructor.

Definition at line 48 of file MueLu_VerboseObject.cpp.

Member Function Documentation

VerbLevel 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 50 of file MueLu_VerboseObject.cpp.

void VerboseObject::SetVerbLevel ( const VerbLevel  verbLevel)

Set the verbosity level of this object.

Definition at line 54 of file MueLu_VerboseObject.cpp.

int VerboseObject::GetProcRankVerbose ( ) const

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

Definition at line 58 of file MueLu_VerboseObject.cpp.

int VerboseObject::SetProcRankVerbose ( int  procRank) const

Set proc rank used for printing.

Definition at line 62 of file MueLu_VerboseObject.cpp.

bool 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 68 of file MueLu_VerboseObject.cpp.

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

Get an output stream for outputting the input message type.

Definition at line 72 of file MueLu_VerboseObject.cpp.

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

Definition at line 83 of file MueLu_VerboseObject.cpp.

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

Definition at line 97 of file MueLu_VerboseObject.cpp.

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

Definition at line 102 of file MueLu_VerboseObject.cpp.

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

Definition at line 119 of file MueLu_VerboseObject.cpp.

void VerboseObject::SetDefaultVerbLevel ( const VerbLevel  defaultVerbLevel)
static

Set the default (global) verbosity level.

Definition at line 87 of file MueLu_VerboseObject.cpp.

VerbLevel VerboseObject::GetDefaultVerbLevel ( )
static

Get the default (global) verbosity level.

Definition at line 93 of file MueLu_VerboseObject.cpp.

Member Data Documentation

VerbLevel MueLu::VerboseObject::verbLevel_
private

Verbose level specific to 'this'.

Definition at line 98 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::procRank_
mutableprivate

Definition at line 99 of file MueLu_VerboseObject.hpp.

int MueLu::VerboseObject::numProcs_
private

Definition at line 100 of file MueLu_VerboseObject.hpp.

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

Definition at line 102 of file MueLu_VerboseObject.hpp.

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

Definition at line 103 of file MueLu_VerboseObject.hpp.

VerbLevel 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 106 of file MueLu_VerboseObject.hpp.


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