#include <LOCA_Utils.H>
Public Types | |
| enum | MsgType { Error = 0, Warning = 0x1, StepperIteration = 0x2, StepperDetails = 0x4, Solver = 0x8, SolverDetails = 0x10, Direction = 0x20, Parameters = 0x40 } |
| Message types for printing. More... | |
Static Public Member Functions | |
| ostream & | repeat (ostream &stream, int n, char c= '*') |
| Repeat the given character n times to the given stream. | |
| void | setUtils (NOX::Parameter::List &p) |
| Set the parameters in the utilities class. | |
| bool | isPrintProc () |
| Returns true if the current processor is designated as the processor send output to screen and/or file. | |
| bool | doPrint (MsgType type) |
| Indicate whether or not the message should be printed. | |
| bool | doAllPrint (MsgType type) |
| Indicate whether or not the message should be printed. | |
| int | getMyPID () |
| Returns the process ID number. | |
| NOX::Parameter::List & | getSublist (const string &name) |
| Returns a sublist of the paramter list given by name. | |
| 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 | sci (double dval, int prec=-1) |
| 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 default precision is that specificed by the Utils static object. | |
Static Public Attributes | |
| int | precision = 3 |
| Output precision for floats and doubles. | |
| int | myPID = 0 |
| Processor ID. | |
| int | printTest = 0xf |
| Output test. | |
| int | printProc = 0 |
| Processor responsible for output. | |
Static Protected Member Functions | |
| void | initializeSublistMap (NOX::Parameter::List &p) |
| Intializes sublist map with given parameter list. | |
Static Protected Attributes | |
| SublistMap | sublistMap |
| Map containing sublist pointers. | |
The following parameters are used by this class and should be defined in the "Utilities" sublist of the main loca parameter list.
The public variables should never be modified directly.
|
|
Message types for printing. Note that each message type if a power of two - this is very important. They can be added together to specify which messages you wish to receive. |
|
|
Indicate whether or not the message should be printed. Returns true if the specifed message type should be printed. |
|
|
Indicate whether or not the message should be printed. Returns true if the specifed message type should be printed and this is the print process.
|
|
||||||||||||
|
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. |
|
|
Returns a sublist of the paramter list given by name. Note that this hard-codes the parameter list structure and does not do a search to find the sublist |
|
|
Returns true if the current processor is designated as the processor send output to screen and/or file. This is used to prevent each processor from printing the same information. |
|
||||||||||||
|
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 default precision is that specificed by the Utils static 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. |
|
|
Set the parameters in the utilities class. Valid parameters are:
|
1.3.9.1