NOX Development
Loading...
Searching...
No Matches
NOX::LineSearchCounters Class Reference

Common counters that all line search algorithms should report. More...

#include <NOX_LineSearch_Utils_Counters.H>

Public Member Functions

 LineSearchCounters ()
 Default constructor.
virtual ~LineSearchCounters ()
 Destructor.
virtual void reset ()
 Reset the counters .
virtual bool setValues (Teuchos::ParameterList &lineSearchParams)
Increment Methods
virtual void incrementNumLineSearches (int n=1)
 Increment the counter for the total number of line search calls by n.
virtual void incrementNumNonTrivialLineSearches (int n=1)
 Increment the counter for the total number of non-trivial line search calls by n.
virtual void incrementNumFailedLineSearches (int n=1)
 Increment the counter for the total number of failed line search calls by n.
virtual void incrementNumIterations (int n=1)
 Increment the counter for the total number of line search inner iterations by n.
Accessor Methods

Returns the current counter value

virtual int getNumLineSearches () const
 Return the counter for the total number of line search calls.
virtual int getNumNonTrivialLineSearches () const
 Return the counter for the total number of non-trivial line search calls.
virtual int getNumFailedLineSearches () const
 Return the counter for the total number of failed line search calls.
virtual int getNumIterations () const
 Return the counter for the total number of line search inner iterations.

Detailed Description

Common counters that all line search algorithms should report.

Output list keys

Line searches have a common set of data that should be tracked and saved in the parameter list for the users. This class provides a set of common data objects, accessors, and a routine to print them. A sublist for output parameters will be created called "Output" in the "Line Search" parameter sublist. Valid output keys for the parameter list are:

  • "Total Number of Line Search Calls" - Total number of calls to the compute() method of this line search.
  • "Total Number of Non-trivial Line Searches" - The total number of steps that could not directly take a full step and meet the required "Convergence Criteria" (i.e. The line search had to reduce the step length using inner iteration calculations over iterate $ k $).
  • "Total Number of Failed Line Searches" - total number of line searches that failed and used a recovery step.
  • "Total Number of Line Search Inner Iterations" - total number of inner iterations $ k $ performed by this object.

Member Function Documentation

◆ setValues()

bool NOX::LineSearchCounters::setValues ( Teuchos::ParameterList & lineSearchParams)
virtual

Sets the common line search data in an "Output" sublist of the lineSearchParams list that is supplied in the method call.


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