Ipopt 3.11.9
Loading...
Searching...
No Matches
IpMa77SolverInterface.hpp
Go to the documentation of this file.
1// Copyright (C) 2009, Jonathan Hogg <jdh41.at.cantab.net>
2// Copyright (C) 2004, 2007 International Business Machines and others.
3// All Rights Reserved.
4// This code is published under the Eclipse Public License.
5//
6// $Id: IpMa77SolverInterface.hpp 2332 2013-06-14 14:05:12Z stefan $
7//
8// Authors: Jonathan Hogg STFC 2013-30-05
9// Jonathan Hogg 2009-07-29
10// Carl Laird, Andreas Waechter IBM 2004-03-17
11
12#ifndef __IPMA77SOLVERINTERFACE_HPP__
13#define __IPMA77SOLVERINTERFACE_HPP__
14
16
17extern "C" {
18#include "hsl_ma77d.h"
19}
20
21namespace Ipopt
22{
23
104 {
105 private:
110
111 int ndim_; // Number of dimensions
112 double *val_; // Storage for variables
113 int numneg_; // Number of negative pivots in last factorization
114 void *keep_; // Stores pointer to factors (only understood by Fortran code!)
115 bool pivtol_changed_; // indicates if pivtol has been changed
116
117 /* Options */
119 double umax_;
121
122 public:
123
125 val_(NULL), keep_(NULL), pivtol_changed_(false)
126 {}
128
130
131 bool InitializeImpl(const OptionsList& options,
132 const std::string& prefix);
133
143 const Index* ia,
144 const Index* ja);
145
153 {
154 return val_;
155 }
156
190 const Index* ia,
191 const Index* ja,
192 Index nrhs,
193 double* rhs_vals,
194 bool check_NegEVals,
195 Index numberOfNegEVals);
196
204 {
205 return numneg_;
206 }
208
209 //* @name Options of Linear solver */
211
218
222 bool ProvidesInertia() const
223 {
224 return true;
225 }
226
231 {
233 }
235
242 {
243 return false;
244 }
248 const Index* ja,
249 std::list<Index>& c_deps)
250 {
252 }
253 };
254
255} // namespace Ipopt
256
257#endif
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as ja) will be s...
ESymSolverStatus DetermineDependentRows(const Index *ia, const Index *ja, std::list< Index > &c_deps)
This method determines the list of row indices of the linearly dependent rows.
bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal stuctures.
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
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.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool IncreaseQuality()
Request to increase quality of solution for next solve.
This class stores a list of user set options.
Template class for Smart Pointers.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lwr and upr parts, with 1 offset.
#define ma77_control
Definition hsl_ma77d.h:13
ESymSolverStatus
Enum to report outcome of a linear solve.
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
int Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:19