#include <IpMa97SolverInterface.hpp>
Public Member Functions | |
Ma97SolverInterface (SmartPtr< LibraryLoader > hslloader_) | |
~Ma97SolverInterface () | |
bool | InitializeImpl (const OptionsList &options, const std::string &prefix) |
Implementation of the initialization method that has to be overloaded by for each derived class. | |
Methods for requesting solution of the linear system. | |
ESymSolverStatus | InitializeStructure (Index dim, Index nonzeros, const Index *ia, const Index *ja) |
Method for initializing internal structures. | |
Number * | 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). | |
ESymSolverStatus | MultiSolve (bool new_matrix, const Index *ia, const Index *ja, Index nrhs, Number *rhs_vals, bool check_NegEVals, Index numberOfNegEVals) |
Solve operation for multiple right hand sides. | |
Index | NumberOfNegEVals () const |
Number of negative eigenvalues detected during last factorization. | |
bool | IncreaseQuality () |
Request to increase quality of solution for next solve. | |
bool | ProvidesInertia () const |
Query whether inertia is computed by linear solver. | |
EMatrixFormat | MatrixFormat () const |
Query of requested matrix type that the linear solver understands. | |
Methods related to the detection of linearly dependent | |
rows in a matrix | |
bool | ProvidesDegeneracyDetection () const |
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver. | |
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::SparseSymLinearSolverInterface | |
SparseSymLinearSolverInterface () | |
virtual | ~SparseSymLinearSolverInterface () |
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) |
static void | SetFunctions (IPOPT_DECL_MA97_DEFAULT_CONTROL(*ma97_default_control), IPOPT_DECL_MA97_ANALYSE(*ma97_analyse), IPOPT_DECL_MA97_FACTOR(*ma97_factor), IPOPT_DECL_MA97_FACTOR_SOLVE(*ma97_factor_solve), IPOPT_DECL_MA97_SOLVE(*ma97_solve), IPOPT_DECL_MA97_FINALISE(*ma97_finalise),) |
set MA97 functions to use for every instantiation of this class | |
static int | ScaleNameToNum (const std::string &name) |
converts a scaling option name to its ma97 option number | |
Private Types | |
enum | order_opts { ORDER_AUTO , ORDER_BEST , ORDER_AMD , ORDER_METIS , ORDER_MATCHED_AUTO , ORDER_MATCHED_AMD , ORDER_MATCHED_METIS } |
enum | scale_opts { SWITCH_NEVER , SWITCH_AT_START , SWITCH_AT_START_REUSE , SWITCH_ON_DEMAND , SWITCH_ON_DEMAND_REUSE , SWITCH_NDELAY , SWITCH_NDELAY_REUSE , SWITCH_OD_ND , SWITCH_OD_ND_REUSE } |
Private Attributes | |
int | ndim_ |
Number of dimensions. | |
Number * | val_ |
Storage for variables. | |
int | numneg_ |
Number of negative pivots in last factorization. | |
int | numdelay_ |
Number of delayed pivots last time we scaled. | |
void * | akeep_ |
Stores pointer to factors (only understood Fortran code!) | |
void * | fkeep_ |
Stores pointer to factors (only understood Fortran code!) | |
bool | pivtol_changed_ |
indicates if pivtol has been changed | |
bool | rescale_ |
Indicates if we should rescale next factorization. | |
Number * | scaling_ |
Store scaling for reuse if doing dynamic scaling. | |
int | fctidx_ |
Current factorization number to dump to. | |
struct ma97_control | control_ |
Number | umax_ |
int | ordering_ |
int | scaling_type_ |
enum scale_opts | switch_ [3] |
int | scaling_val_ [3] |
int | current_level_ |
bool | dump_ |
MA97 function pointers | |
SmartPtr< LibraryLoader > | hslloader |
IPOPT_DECL_MA97_DEFAULT_CONTROL * | ma97_default_control |
IPOPT_DECL_MA97_ANALYSE * | ma97_analyse |
IPOPT_DECL_MA97_FACTOR * | ma97_factor |
IPOPT_DECL_MA97_FACTOR_SOLVE * | ma97_factor_solve |
IPOPT_DECL_MA97_SOLVE * | ma97_solve |
IPOPT_DECL_MA97_FINALISE * | ma97_finalise |
IPOPT_DECL_MA97_FREE_AKEEP * | ma97_free_akeep |
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 |
Definition at line 100 of file IpMa97SolverInterface.hpp.
Enumerator | |
---|---|
ORDER_AUTO | |
ORDER_BEST | |
ORDER_AMD | |
ORDER_METIS | |
ORDER_MATCHED_AUTO | |
ORDER_MATCHED_AMD | |
ORDER_MATCHED_METIS |
Definition at line 103 of file IpMa97SolverInterface.hpp.
Enumerator | |
---|---|
SWITCH_NEVER | |
SWITCH_AT_START | |
SWITCH_AT_START_REUSE | |
SWITCH_ON_DEMAND | |
SWITCH_ON_DEMAND_REUSE | |
SWITCH_NDELAY | |
SWITCH_NDELAY_REUSE | |
SWITCH_OD_ND | |
SWITCH_OD_ND_REUSE |
Definition at line 113 of file IpMa97SolverInterface.hpp.
|
inline |
Ipopt::Ma97SolverInterface::~Ma97SolverInterface | ( | ) |
|
static |
|
static |
set MA97 functions to use for every instantiation of this class
|
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.
|
inlinevirtual |
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.
Definition at line 217 of file IpMa97SolverInterface.hpp.
|
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.
|
inlinevirtual |
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.
Definition at line 232 of file IpMa97SolverInterface.hpp.
|
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 242 of file IpMa97SolverInterface.hpp.
|
inlinevirtual |
Query of requested matrix type that the linear solver understands.
Implements Ipopt::SparseSymLinearSolverInterface.
Definition at line 247 of file IpMa97SolverInterface.hpp.
|
inlinevirtual |
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
Reimplemented from Ipopt::SparseSymLinearSolverInterface.
Definition at line 256 of file IpMa97SolverInterface.hpp.
|
inlinevirtual |
This method determines the list of row indices of the linearly dependent rows.
Reimplemented from Ipopt::SparseSymLinearSolverInterface.
Definition at line 261 of file IpMa97SolverInterface.hpp.
converts a scaling option name to its ma97 option number
|
private |
Number of dimensions.
Definition at line 126 of file IpMa97SolverInterface.hpp.
|
private |
Storage for variables.
Definition at line 127 of file IpMa97SolverInterface.hpp.
|
private |
Number of negative pivots in last factorization.
Definition at line 128 of file IpMa97SolverInterface.hpp.
|
private |
Number of delayed pivots last time we scaled.
Definition at line 129 of file IpMa97SolverInterface.hpp.
|
private |
Stores pointer to factors (only understood Fortran code!)
Definition at line 130 of file IpMa97SolverInterface.hpp.
|
private |
Stores pointer to factors (only understood Fortran code!)
Definition at line 131 of file IpMa97SolverInterface.hpp.
|
private |
indicates if pivtol has been changed
Definition at line 132 of file IpMa97SolverInterface.hpp.
|
private |
Indicates if we should rescale next factorization.
Definition at line 133 of file IpMa97SolverInterface.hpp.
|
private |
Store scaling for reuse if doing dynamic scaling.
Definition at line 134 of file IpMa97SolverInterface.hpp.
|
private |
Current factorization number to dump to.
Definition at line 135 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 138 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 139 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 140 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 141 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 142 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 143 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 144 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 145 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 150 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 152 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 153 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 154 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 155 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 156 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 157 of file IpMa97SolverInterface.hpp.
|
private |
Definition at line 158 of file IpMa97SolverInterface.hpp.