Interface to the linear solver WISMP, derived from SparseSymLinearSolverInterface. More...
#include <IpIterativeWsmpSolverInterface.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. | |
Constructor/Destructor | |
IterativeWsmpSolverInterface () | |
Constructor. | |
virtual | ~IterativeWsmpSolverInterface () |
Destructor. | |
Methods for requesting solution of the linear system. | |
virtual ESymSolverStatus | InitializeStructure (Index dim, Index nonzeros, const Index *ia, const Index *ja) |
Method for initializing internal structures. | |
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). | |
virtual ESymSolverStatus | MultiSolve (bool new_matrix, const Index *ia, const Index *ja, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals) |
Solve operation for multiple right hand sides. | |
virtual Index | NumberOfNegEVals () const |
Number of negative eigenvalues detected during last factorization. | |
virtual bool | IncreaseQuality () |
Request to increase quality of solution for next solve. | |
virtual bool | ProvidesInertia () const |
Query whether inertia is computed by linear solver. | |
EMatrixFormat | MatrixFormat () const |
Query of requested matrix type that the linear solver understands. | |
Public Member Functions inherited from Ipopt::SparseSymLinearSolverInterface | |
SparseSymLinearSolverInterface () | |
virtual | ~SparseSymLinearSolverInterface () |
virtual bool | ProvidesDegeneracyDetection () const |
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver. | |
virtual ESymSolverStatus | DetermineDependentRows (const Index *, const Index *, std::list< Index > &) |
This method determines the list of row indices of the linearly dependent rows. | |
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 |
Static Public Member Functions | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
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. | |
IterativeWsmpSolverInterface (const IterativeWsmpSolverInterface &) | |
Copy Constructor. | |
void | operator= (const IterativeWsmpSolverInterface &) |
Default Assignment Operator. | |
Internal functions | |
ESymSolverStatus | SymbolicFactorization (const Index *ia, const Index *ja) |
Call Wsmp to do the analysis phase. | |
ESymSolverStatus | InternalSymFact (const Index *ia, const Index *ja) |
Call Wsmp to really do the analysis phase. | |
ESymSolverStatus | Factorization (const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals) |
Call Wsmp to factorize the Matrix. | |
ESymSolverStatus | Solve (const Index *ia, const Index *ja, Index nrhs, double *rhs_vals) |
Call Wsmpx to do the Solve. | |
Private Attributes | |
Index | matrix_file_number_ |
Counter for matrix file numbers. | |
Information about the matrix | |
Index | dim_ |
Number of rows and columns of the matrix. | |
double * | a_ |
Array for storing the values of the matrix. | |
Solver specific options | |
Index | wsmp_num_threads_ |
Option that controls the matching strategy. | |
Number | wsmp_pivtol_ |
Pivot tolerance. | |
Number | wsmp_pivtolmax_ |
Maximal pivot tolerance. | |
Index | wsmp_scaling_ |
Indicating which of WSMP's scaling methods should be used. | |
Index | wsmp_write_matrix_iteration_ |
iteration number in which matrices are to be written out | |
Number | wsmp_inexact_droptol_ |
Number | wsmp_inexact_fillin_limit_ |
Initialization flags | |
bool | initialized_ |
Flag indicating if internal data is initialized. | |
bool | pivtol_changed_ |
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed. | |
bool | have_symbolic_factorization_ |
Flag indicating whether symbolic factorization and order has already been performed. | |
Solver specific information | |
ipindex * | IPARM_ |
Integer parameter array for WISMP. | |
double * | DPARM_ |
Double precision parameter array for WISMP. | |
Additional Inherited Members | |
Public Types inherited from Ipopt::SparseSymLinearSolverInterface | |
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... | |
Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
Interface to the linear solver WISMP, derived from SparseSymLinearSolverInterface.
Definition at line 20 of file IpIterativeWsmpSolverInterface.hpp.
Ipopt::IterativeWsmpSolverInterface::IterativeWsmpSolverInterface | ( | ) |
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.
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.
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.
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.
Query whether inertia is computed by linear solver.
Implements Ipopt::SparseSymLinearSolverInterface.
Definition at line 65 of file IpIterativeWsmpSolverInterface.hpp.
|
inlinevirtual |
Query of requested matrix type that the linear solver understands.
Implements Ipopt::SparseSymLinearSolverInterface.
Definition at line 70 of file IpIterativeWsmpSolverInterface.hpp.
|
static |
|
private |
Default Assignment Operator.
|
private |
Call Wsmp to do the analysis phase.
|
private |
Call Wsmp to really do the analysis phase.
|
private |
Call Wsmp to factorize the Matrix.
|
private |
Call Wsmpx to do the Solve.
|
private |
Number of rows and columns of the matrix.
Definition at line 104 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Array for storing the values of the matrix.
Definition at line 107 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Option that controls the matching strategy.
Definition at line 113 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Pivot tolerance.
Definition at line 115 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Maximal pivot tolerance.
Definition at line 117 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Indicating which of WSMP's scaling methods should be used.
Definition at line 119 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
iteration number in which matrices are to be written out
Definition at line 121 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Definition at line 122 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Definition at line 123 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Counter for matrix file numbers.
Definition at line 127 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Flag indicating if internal data is initialized.
For initialization, this object needs to have seen a matrix
Definition at line 142 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed.
Definition at line 146 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Flag indicating whether symbolic factorization and order has already been performed.
Definition at line 150 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Integer parameter array for WISMP.
Definition at line 156 of file IpIterativeWsmpSolverInterface.hpp.
|
private |
Double precision parameter array for WISMP.
Definition at line 158 of file IpIterativeWsmpSolverInterface.hpp.