Interface to the symmetric linear solver MA27, derived from SparseSymLinearSolverInterface. More...
#include <IpMa27TSolverInterface.hpp>
Public Member Functions | |
bool | InitializeImpl (const OptionsList &options, const std::string &prefix) |
Implementation of the initialization method that has to be overloaded by for each derived class. More... | |
Constructor/Destructor | |
Ma27TSolverInterface () | |
Constructor. More... | |
virtual | ~Ma27TSolverInterface () |
Destructor. More... | |
![]() | |
SparseSymLinearSolverInterface () | |
virtual | ~SparseSymLinearSolverInterface () |
virtual bool | ProvidesDegeneracyDetection () const |
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver. More... | |
virtual ESymSolverStatus | DetermineDependentRows (const Index *, const Index *, std::list< Index > &) |
This method determines the list of row indices of the linearly dependent rows. More... | |
![]() | |
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. More... | |
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. More... | |
AlgorithmStrategyObject () | |
Default Constructor. More... | |
virtual | ~AlgorithmStrategyObject () |
Destructor. More... | |
![]() | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
Index | ReferenceCount () const |
void | AddRef (const Referencer *referencer) const |
void | ReleaseRef (const Referencer *referencer) 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. | |
Ma27TSolverInterface (const Ma27TSolverInterface &) | |
Copy Constructor. More... | |
void | operator= (const Ma27TSolverInterface &) |
Default Assignment Operator. More... | |
Internal functions | |
ESymSolverStatus | SymbolicFactorization (const Index *airn, const Index *ajcn) |
Call MA27AD and reserve memory for MA27 data. More... | |
ESymSolverStatus | Factorization (const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals) |
Call MA27BD to factorize the Matrix. More... | |
ESymSolverStatus | Backsolve (Index nrhs, double *rhs_vals) |
Call MA27CD to do the backsolve. More... | |
Private Attributes | |
Information about the matrix | |
Index | dim_ |
Number of rows and columns of the matrix. More... | |
Index | nonzeros_ |
Number of nonzeros of the matrix. More... | |
Information about most recent factorization/solve | |
Index | negevals_ |
Number of negative eigenvalues. More... | |
Initialization flags | |
bool | initialized_ |
Flag indicating if internal data is initialized. More... | |
bool | pivtol_changed_ |
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed. More... | |
bool | refactorize_ |
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have to factorize again. More... | |
Solver specific data/options | |
Number | pivtol_ |
Pivot tolerance. More... | |
Number | pivtolmax_ |
Maximal pivot tolerance. More... | |
Number | liw_init_factor_ |
Factor for estimating initial value of liw. More... | |
Number | la_init_factor_ |
Factor for estimating initial value of la. More... | |
Number | meminc_factor_ |
Factor for increaseing memory. More... | |
bool | warm_start_same_structure_ |
Flag indicating whether the TNLP with identical structure has already been solved before. More... | |
bool | skip_inertia_check_ |
Flag indicating if the inertia is always assumed to be correct. More... | |
bool | ignore_singularity_ |
Flag indicating if MA27 should continue if a singular matrix is detected, but right hands sides are still accepted. More... | |
Data for the linear solver. | |
Storing factorization and other solver specific data structure. | |
ipfint | icntl_ [30] |
integer control values More... | |
double | cntl_ [5] |
real control values More... | |
ipfint | liw_ |
length of integer work space More... | |
ipfint * | iw_ |
integer work space More... | |
ipfint * | ikeep_ |
MA27's IKEEP. More... | |
ipfint | nsteps_ |
MA27's NSTEPS. More... | |
ipfint | maxfrt_ |
MA27's MAXFRT. More... | |
ipfint | la_ |
length LA of A More... | |
double * | a_ |
factor A of matrix More... | |
bool | la_increase_ |
flag indicating that la should be increased before next factorization More... | |
bool | liw_increase_ |
flag indicating that liw should be increased before next factorization More... | |
Methods for requesting solution of the linear system. | |
virtual ESymSolverStatus | InitializeStructure (Index dim, Index nonzeros, const Index *airn, const Index *ajcn) |
Method for initializing internal structures. More... | |
virtual double * | GetValuesArrayPtr () |
Method returning an internal array into which the nonzero elements (in the same order as ja) will be stored by the calling routine before a call to MultiSolve with a new_matrix=true (or after a return of MultiSolve with SYMSOLV_CALL_AGAIN). More... | |
virtual ESymSolverStatus | MultiSolve (bool new_matrix, const Index *airn, const Index *ajcn, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals) |
Solve operation for multiple right hand sides. More... | |
virtual Index | NumberOfNegEVals () const |
Number of negative eigenvalues detected during last factorization. More... | |
virtual bool | IncreaseQuality () |
Request to increase quality of solution for next solve. More... | |
virtual bool | ProvidesInertia () const |
Query whether inertia is computed by linear solver. More... | |
EMatrixFormat | MatrixFormat () const |
Query of requested matrix type that the linear solver understands. More... | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Additional Inherited Members | |
![]() | |
enum | EMatrixFormat { Triplet_Format, CSR_Format_0_Offset, CSR_Format_1_Offset, CSR_Full_Format_0_Offset, CSR_Full_Format_1_Offset } |
Enum to specify sparse matrix format. More... | |
![]() | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
Interface to the symmetric linear solver MA27, derived from SparseSymLinearSolverInterface.
Definition at line 17 of file IpMa27TSolverInterface.hpp.
Ipopt::Ma27TSolverInterface::Ma27TSolverInterface | ( | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Copy Constructor.
|
virtual |
Implementation of the initialization method that has to be overloaded by for each derived class.
Implements Ipopt::SparseSymLinearSolverInterface.
|
virtual |
Method for initializing internal structures.
Here, ndim gives the number of rows and columns of the matrix, nonzeros give the number of nonzero elements, and ia and ja give the positions of the nonzero elements, given in the matrix format determined by MatrixFormat.
Implements Ipopt::SparseSymLinearSolverInterface.
|
virtual |
Method returning an internal array into which the nonzero elements (in the same order as ja) will be stored by the calling routine before a call to MultiSolve with a new_matrix=true (or after a return of MultiSolve with SYMSOLV_CALL_AGAIN).
The returned array must have space for at least nonzero elements.
Implements Ipopt::SparseSymLinearSolverInterface.
|
virtual |
Solve operation for multiple right hand sides.
Solves the linear system A * x = b with multiple right hand sides, where A is the symmetric indefinite matrix. Here, ia and ja give the positions of the values (in the required matrix data format). The actual values of the matrix will have been given to this object by copying them into the array provided by GetValuesArrayPtr. ia and ja are identical to the ones given to InitializeStructure. The flag new_matrix is set to true, if the values of the matrix has changed, and a refactorization is required.
The number of right-hand sides is given by nrhs, the values of the right-hand sides are given in rhs_vals (one full right-hand side stored immediately after the other), and solutions are to be returned in the same array.
check_NegEVals will not be chosen true, if ProvidesInertia() returns false.
Implements Ipopt::SparseSymLinearSolverInterface.
|
virtual |
Number of negative eigenvalues detected during last factorization.
This must not be called if the linear solver does not compute this quantities (see ProvidesInertia).
Implements Ipopt::SparseSymLinearSolverInterface.
|
virtual |
Request to increase quality of solution for next solve.
The calling class asks linear solver to increase quality of solution for the next solve (e.g. increase pivot tolerance).
Implements Ipopt::SparseSymLinearSolverInterface.
|
inlinevirtual |
Query whether inertia is computed by linear solver.
Implements Ipopt::SparseSymLinearSolverInterface.
Definition at line 61 of file IpMa27TSolverInterface.hpp.
|
inlinevirtual |
Query of requested matrix type that the linear solver understands.
Implements Ipopt::SparseSymLinearSolverInterface.
Definition at line 66 of file IpMa27TSolverInterface.hpp.
|
static |
|
private |
Default Assignment Operator.
|
private |
Call MA27AD and reserve memory for MA27 data.
Reserve memory for iw_ and ikeep_, call MA27AD to perform symbolic manipulations, and reserve all the remaining data memory
|
private |
Call MA27BD to factorize the Matrix.
It is assumed that the first nonzeros_ element of a_ contain the values of the matrix to be factorized.
|
private |
Call MA27CD to do the backsolve.
|
private |
Number of rows and columns of the matrix.
Definition at line 101 of file IpMa27TSolverInterface.hpp.
|
private |
Number of nonzeros of the matrix.
Definition at line 104 of file IpMa27TSolverInterface.hpp.
|
private |
Number of negative eigenvalues.
Definition at line 110 of file IpMa27TSolverInterface.hpp.
|
private |
Flag indicating if internal data is initialized.
For initialization, this object needs to have seen a matrix.
Definition at line 119 of file IpMa27TSolverInterface.hpp.
|
private |
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed.
Definition at line 123 of file IpMa27TSolverInterface.hpp.
|
private |
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have to factorize again.
Definition at line 128 of file IpMa27TSolverInterface.hpp.
|
private |
Pivot tolerance.
Definition at line 134 of file IpMa27TSolverInterface.hpp.
|
private |
Maximal pivot tolerance.
Definition at line 137 of file IpMa27TSolverInterface.hpp.
|
private |
Factor for estimating initial value of liw.
Definition at line 140 of file IpMa27TSolverInterface.hpp.
|
private |
Factor for estimating initial value of la.
Definition at line 142 of file IpMa27TSolverInterface.hpp.
|
private |
Factor for increaseing memory.
Definition at line 144 of file IpMa27TSolverInterface.hpp.
|
private |
Flag indicating whether the TNLP with identical structure has already been solved before.
Definition at line 148 of file IpMa27TSolverInterface.hpp.
|
private |
Flag indicating if the inertia is always assumed to be correct.
Definition at line 150 of file IpMa27TSolverInterface.hpp.
|
private |
Flag indicating if MA27 should continue if a singular matrix is detected, but right hands sides are still accepted.
Definition at line 154 of file IpMa27TSolverInterface.hpp.
|
private |
integer control values
Definition at line 162 of file IpMa27TSolverInterface.hpp.
|
private |
real control values
Definition at line 164 of file IpMa27TSolverInterface.hpp.
|
private |
length of integer work space
Definition at line 167 of file IpMa27TSolverInterface.hpp.
|
private |
integer work space
Definition at line 169 of file IpMa27TSolverInterface.hpp.
|
private |
MA27's IKEEP.
Definition at line 172 of file IpMa27TSolverInterface.hpp.
|
private |
MA27's NSTEPS.
Definition at line 174 of file IpMa27TSolverInterface.hpp.
|
private |
MA27's MAXFRT.
Definition at line 176 of file IpMa27TSolverInterface.hpp.
|
private |
length LA of A
Definition at line 179 of file IpMa27TSolverInterface.hpp.
|
private |
factor A of matrix
Definition at line 181 of file IpMa27TSolverInterface.hpp.
|
private |
flag indicating that la should be increased before next factorization
Definition at line 184 of file IpMa27TSolverInterface.hpp.
|
private |
flag indicating that liw should be increased before next factorization
Definition at line 186 of file IpMa27TSolverInterface.hpp.