# Ipopt::IterativeSolverTerminationTester Class Reference

This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt. More...

`#include <IpIterativeSolverTerminationTester.hpp>`

Inheritance diagram for Ipopt::IterativeSolverTerminationTester:
[legend]

List of all members.

## Public Types
enum | ETerminationTest { CONTINUE, TEST_1_SATISFIED, TEST_2_SATISFIED, TEST_3_SATISFIED, MODIFY_HESSIAN, OTHER_SATISFIED }
| Enum to report result of termination test. More...
## Public Member Functions
virtual bool | InitializeImpl (const OptionsList &options, const std::string &prefix)=0
| Implementation of the initialization method that has to be overloaded by for each derived class.
virtual bool | InitializeSolve ()=0
| Method for initializing for the next iterative solve.
virtual ETerminationTest | TestTermination (Index ndim, const Number *sol, const Number *resid, Index iter, Number norm2_rhs)=0
| This method checks if the current soltion of the iterative linear solver is good enough (by returning the corresponding satisfied termination test), or if the Hessian should be modified.
virtual void | Clear ()=0
| This method can be called after the Solve is over and we can delete anything that has been allocated to free memory.
const Journalist & | GetJnlst () const
| An easy way to get the journalist if accessed from the outside.
virtual Index | GetSolverIterations () const =0
| Return the number of iterative solver iteration from the most recent solve.
/Destructor
| IterativeSolverTerminationTester ()
| Default constructor.
virtual | ~IterativeSolverTerminationTester ()
| Default destructor.
## Protected Member Functions
void | GetVectors (Index ndim, const Number *array, SmartPtr< const Vector > &comp_x, SmartPtr< const Vector > &comp_s, SmartPtr< const Vector > &comp_c, SmartPtr< const Vector > &comp_d)
| Method for copying a long augmented system array into Vectors in Ipopt notation.
InexactData & | InexData ()
| Method to easily access Inexact data.
InexactCq & | InexCq ()
| Method to easily access Inexact calculated quantities.
## Private Member Functions
Default Compiler Generated Methods
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
IterativeSolverTerminationTester & | operator= (const IterativeSolverTerminationTester &)
| Overloaded Equals Operator.

## Detailed Description

This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt.

Definition at line 21 of file IpIterativeSolverTerminationTester.hpp.

## Member Enumeration Documentation

enum Ipopt::IterativeSolverTerminationTester::ETerminationTest

Enum to report result of termination test.

Enumerator:

  CONTINUE | The current solution is not yet good enough.
  TEST_1_SATISFIED | Termination Test 1 is satisfied.
  TEST_2_SATISFIED | Termination Test 2 is satisfied.
  TEST_3_SATISFIED | Termination Test 3 is satisfied.
  MODIFY_HESSIAN | Hessian matrix should be modified.
  OTHER_SATISFIED | Some other termination criterion satisfied.

Definition at line 25 of file IpIterativeSolverTerminationTester.hpp.

## Constructor & Destructor Documentation

Ipopt::IterativeSolverTerminationTester::IterativeSolverTerminationTester | ( |  | ) | `[inline]`

Default constructor.

Definition at line 44 of file IpIterativeSolverTerminationTester.hpp.

virtual Ipopt::IterativeSolverTerminationTester::~IterativeSolverTerminationTester | ( |  | ) | `[inline, virtual]`

Default destructor.

Definition at line 48 of file IpIterativeSolverTerminationTester.hpp.

## Member Function Documentation

virtual bool Ipopt::IterativeSolverTerminationTester::InitializeImpl | ( | const OptionsList & | options,
|  | const std::string & | prefix |
| ) |  |  | `[pure virtual]`

Implementation of the initialization method that has to be overloaded by for each derived class.

Implements Ipopt::AlgorithmStrategyObject.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

virtual bool Ipopt::IterativeSolverTerminationTester::InitializeSolve | ( |  | ) | `[pure virtual]`

Method for initializing for the next iterative solve.

This must be call before the test methods are called.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

virtual ETerminationTest Ipopt::IterativeSolverTerminationTester::TestTermination | ( | Index | ndim,
|  | const Number * | sol,
|  | const Number * | resid,
|  | Index | iter,
|  | Number | norm2_rhs |
| ) |  |  | `[pure virtual]`

This method checks if the current soltion of the iterative linear solver is good enough (by returning the corresponding satisfied termination test), or if the Hessian should be modified.

The input is the dimension of the augmented system, the current solution vector of the augmented system, the current residual vector.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

virtual void Ipopt::IterativeSolverTerminationTester::Clear | ( |  | ) | `[pure virtual]`

This method can be called after the Solve is over and we can delete anything that has been allocated to free memory.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

const Journalist& Ipopt::IterativeSolverTerminationTester::GetJnlst | ( |  | ) | const`[inline]`

An easy way to get the journalist if accessed from the outside.

Definition at line 76 of file IpIterativeSolverTerminationTester.hpp.

virtual Index Ipopt::IterativeSolverTerminationTester::GetSolverIterations | ( |  | ) | const`[pure virtual]`

Return the number of iterative solver iteration from the most recent solve.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

void Ipopt::IterativeSolverTerminationTester::GetVectors | ( | Index | ndim,
|  | const Number * | array,
|  | SmartPtr< const Vector > & | comp_x,
|  | SmartPtr< const Vector > & | comp_s,
|  | SmartPtr< const Vector > & | comp_c,
|  | SmartPtr< const Vector > & | comp_d |
| ) |  |  | `[protected]`

Method for copying a long augmented system array into Vectors in Ipopt notation.

InexactData& Ipopt::IterativeSolverTerminationTester::InexData | ( |  | ) | `[inline, protected]`

Method to easily access Inexact data.

Definition at line 95 of file IpIterativeSolverTerminationTester.hpp.

InexactCq& Ipopt::IterativeSolverTerminationTester::InexCq | ( |  | ) | `[inline, protected]`

Method to easily access Inexact calculated quantities.

Definition at line 104 of file IpIterativeSolverTerminationTester.hpp.

IterativeSolverTerminationTester& Ipopt::IterativeSolverTerminationTester::operator= | ( | const IterativeSolverTerminationTester & |  | ) | `[private]`

Overloaded Equals Operator.

Reimplemented from Ipopt::AlgorithmStrategyObject.

Reimplemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

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

- src/Algorithm/Inexact/IpIterativeSolverTerminationTester.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines