Ipopt  3.12.12
IpMa77SolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009, Jonathan Hogg <jdh41.at.cantab.net>
4 // This code is published under the Eclipse Public License.
5 //
6 // \$Id: IpMa77SolverInterface.hpp 2328 2013-06-13 17:24:24Z 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
17 extern "C" {
18 #include "hsl_ma77d.h"
19 }
20
21 namespace Ipopt
22 {
23
104  {
105  private:
106  enum order_opts {
109  };
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
129  static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
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
189  ESymSolverStatus MultiSolve(bool new_matrix,
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
217  bool IncreaseQuality();
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  {
251  return SYMSOLVER_FATAL_ERROR;
252  }
253  };
254
255 } // namespace Ipopt
256
257 #endif
ESymSolverStatus
Enum to report outcome of a linear solve.
double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as ja) will be s...
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
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.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
This class stores a list of user set options.
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.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
bool IncreaseQuality()
Request to increase quality of solution for next solve.
Unrecoverable error in linear solver occurred.
EMatrixFormat
Enum to specify sparse matrix format.
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Compressed sparse row format for both lwr and upr parts, with 1 offset.
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.
#define ma77_control
Definition: hsl_ma77d.h:13