NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
NOX::LineSearch::Utils::Printing Class Reference

Common line search utilites for printing line search information to the screen. More...

#include <NOX_LineSearch_Utils_Printing.H>

Inheritance diagram for NOX::LineSearch::Utils::Printing:
Inheritance graph
[legend]
Collaboration diagram for NOX::LineSearch::Utils::Printing:
Collaboration graph
[legend]

Public Member Functions

 Printing (const Teuchos::RCP< NOX::Utils > &u)
 Default constructor.
 
virtual ~Printing ()
 Destructor.
 
void reset (const Teuchos::RCP< NOX::Utils > &u)
 
void printOpeningRemarks (const std::string &lineSearchName) const
 Prints the opening information.
 
void printStep (int n, double step, double oldf, double newf, const std::string s="", bool unscaleF=true) const
 Print out step information for the inner iterations of a line search algorithm. More...
 
- Public Member Functions inherited from NOX::Utils
 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. More...
 
 Utils (Teuchos::ParameterList &p)
 Constructor via a parameter list.
 
 Utils (const NOX::Utils &u)
 Copy constructor.
 
 ~Utils ()
 Destructor.
 
NOX::Utilsoperator= (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 std::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 std::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 std::ostream for printing regardless of the print processor. Only use this call if you want all processes to print to the std::ostream.
 
std::ostream & pout (NOX::Utils::MsgType type) const
 Returns the std::ostream for printing if the print type matches. Only use this call if you want all processes to print to the std::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 (std::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. More...
 

Additional Inherited Members

- Public Types inherited from NOX::Utils
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...
 
- Static Public Member Functions inherited from NOX::Utils
static 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. More...
 
static Sci sciformat (double dval, int prec)
 Static version of sciformat().
 

Detailed Description

Common line search utilites for printing line search information to the screen.

All line searches should print output results in a similar format. This utility provides common output routines.

Member Function Documentation

void NOX::LineSearch::Utils::Printing::printStep ( int  n,
double  step,
double  oldf,
double  newf,
const std::string  s = "",
bool  unscaleF = true 
) const

Print out step information for the inner iterations of a line search algorithm.

Example of output from the inner iterations of a Polynomial line search:
************************************************************************
-- Polynomial Line Search --
  1: step = 1.000e+00 oldf = 2.403e+00 newf = 1.076e+03
  2: step = 1.000e-01 oldf = 2.403e+00 newf = 4.440e+00
  3: step = 1.000e-02 oldf = 2.403e+00 newf = 2.394e+00 (STEP ACCEPTED!)
************************************************************************
\param unscaleF - If this is true (the default), than the values
printed are \form#170 and \form#171@_fakenl. This is to accomodate the standard merit function, \form#172@_fakenl.

References NOX::Utils::fill(), and NOX::Utils::InnerIteration.


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