This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt. More...
#include <IpIterativeSolverTerminationTester.hpp>
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 solution 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. | |
Constructor/Destructor | |
IterativeSolverTerminationTester () | |
Default constructor. | |
virtual | ~IterativeSolverTerminationTester () |
Destructor. | |
Public Member Functions inherited from Ipopt::AlgorithmStrategyObject | |
bool | Initialize (const Journalist &jnlst, IpoptNLP &ip_nlp, IpoptData &ip_data, IpoptCalculatedQuantities &ip_cq, const OptionsList &options, const std::string &prefix) |
This method is called every time the algorithm starts again - it is used to reset any internal state. | |
bool | ReducedInitialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix) |
Reduced version of the Initialize method, which does not require special Ipopt information. | |
AlgorithmStrategyObject () | |
Default Constructor. | |
virtual | ~AlgorithmStrategyObject () |
Destructor. | |
Public Member Functions inherited from Ipopt::ReferencedObject | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
Index | ReferenceCount () const |
void | AddRef (const Referencer *referencer) const |
void | ReleaseRef (const Referencer *referencer) const |
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. | |
Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
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 Assignment Operator. | |
This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt.
Definition at line 19 of file IpIterativeSolverTerminationTester.hpp.
Enum to report result of termination test.
Definition at line 23 of file IpIterativeSolverTerminationTester.hpp.
|
inline |
Default constructor.
Definition at line 42 of file IpIterativeSolverTerminationTester.hpp.
|
inlinevirtual |
Destructor.
Definition at line 46 of file IpIterativeSolverTerminationTester.hpp.
|
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.
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.
|
pure virtual |
This method checks if the current solution 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.
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.
|
inline |
An easy way to get the journalist if accessed from the outside.
Definition at line 84 of file IpIterativeSolverTerminationTester.hpp.
Return the number of iterative solver iteration from the most recent solve.
Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.
|
protected |
Method for copying a long augmented system array into Vectors in Ipopt notation.
|
inlineprotected |
Method to easily access Inexact data.
Definition at line 108 of file IpIterativeSolverTerminationTester.hpp.
|
inlineprotected |
Method to easily access Inexact calculated quantities.
Definition at line 116 of file IpIterativeSolverTerminationTester.hpp.
|
private |
Overloaded Assignment Operator.