#include <NOX_Utils.H>
Inheritance diagram for NOX::Utils:


Public Types | |
| enum | MsgType { Error = 0, Warning = 0x1, OuterIteration = 0x2, InnerIteration = 0x4, Parameters = 0x8, Details = 0x10, OuterIterationStatusTest = 0x20, LinearSolverDetails = 0x40, TestDetails = 0x80, StepperIteration = 0x0100, StepperDetails = 0x0200, StepperParameters = 0x0400, Debug = 0x01000 } |
| Message types for printing. More... | |
Public Member Functions | |
| Utils (int outputInformation=0xf, int MyPID=0, int outputProcess=0, int outputPrecision=3, const Teuchos::RCP< std::ostream > &outputStream=Teuchos::null, const Teuchos::RCP< std::ostream > &errorStream=Teuchos::null) | |
| Constructor. | |
| Utils (Teuchos::ParameterList &p) | |
| Constructor via a parameter list. | |
| Utils (const NOX::Utils &u) | |
| Copy constructor. | |
| ~Utils () | |
| Destructor. | |
| NOX::Utils & | operator= (const NOX::Utils &source) |
| Assignment operator. | |
| void | reset (Teuchos::ParameterList &p) |
| Reset the printing parameters. | |
| bool | isPrintType (NOX::Utils::MsgType type) const |
| Returns true if this is a valid print type. | |
| std::ostream & | out () const |
| Returns the ostream for printing if this proces is the print process. Returns a Teuchos::oblackholestream otherwise. | |
| std::ostream & | out (NOX::Utils::MsgType type) const |
| Returns the ostream for printing if this process is the print process and the print type is valid. Returns a Teuchos::oblackholestream otherwise. | |
| std::ostream & | pout () const |
| Returns the ostream for printing regardless of the print processor. Only use this call if you want all processes to print to the ostream. | |
| std::ostream & | pout (NOX::Utils::MsgType type) const |
| Returns the ostream for printing if the print type matches. Only use this call if you want all processes to print to the ostream for the print type. | |
| std::ostream & | err () const |
| Returns the error stream for printing if this is the print process. | |
| std::ostream & | perr () const |
| Returns the error stream for printing to all processors. Only use this call if you want all processes to print to the error stream. | |
| void | print (ostream &os) const |
| Print this object. | |
| Sci | sciformat (double dval) const |
| Creates a Sci object which can be used in an output stream for printing a double precision number in scientific format with an arbitrary precision. The precision is that specificed by the Utils object. | |
Static Public Member Functions | |
| Fill | fill (int filln, char fillc= '*') |
| Creates a Fill object which can be used in an output stream to insert an arbitrary number of a given character. The default character is an asterick. | |
| Sci | sciformat (double dval, int prec) |
| Static version of sciformat(). | |
The following parameters are valid for this class and should be defined in the "Printing" sublist of the solver parameter list.
The public variables should never be modified directly.
|
|
||||||||||||||||||||||||||||
|
Constructor. The final two arguments are a reference counted pointers to ostreams. This defaults to std::cout and std::cerr if not supplied. Users should only supply this argument if they want output directed to a std::ostream other than the defaults. If so, they must wrap the ostream in a reference counted pointer for safe memory management. |
|
||||||||||||
|
Creates a Fill object which can be used in an output stream to insert an arbitrary number of a given character. The default character is an asterick. For example, cout << Utils::fill(10) << "or" << Utils::fill(10,'-'); This is modeled after the Form and Bound_form objects in Stroustrup, C++ Programming Langauge, 3rd ed., Chapter 21.4. |
|
|
Creates a Sci object which can be used in an output stream for printing a double precision number in scientific format with an arbitrary precision. The precision is that specificed by the Utils object. For example, cout << Utils::sci(d) << "or" << Utils::sci(d,2);
This is modeled after the Form and Bound_form objects in Stroustrup, C++ Programming Langauge, 3rd ed., Chapter 21.4. |
1.3.9.1