Ipopt Documentation  
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IpMa86SolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2011, Science and Technology Facilities Council
2 // Copyright (C) 2009, Jonathan Hogg <jdh41.at.cantab.net>
3 // Copyright (C) 2004, 2007 International Business Machines and others.
4 // All Rights Reserved.
5 // This code is published under the Eclipse Public License.
6 //
7 // Authors: Jonathan Hogg STFC 2011-03-14
8 // Jonathan Hogg 2009-07-29
9 // Carl Laird, Andreas Waechter IBM 2004-03-17
10 
11 #ifndef __IPMA86SOLVERINTERFACE_HPP__
12 #define __IPMA86SOLVERINTERFACE_HPP__
13 
15 extern "C"
16 {
17 #include "hsl_ma86d.h"
18 }
19 
20 namespace Ipopt
21 {
22 
24 {
25 private:
27  {
31  };
32 
33  int ndim_;
34  double* val_;
35  int numneg_;
37  void* keep_;
39 
40  /* Options */
42  double umax_;
43  int ordering_;
44 
45 public:
46 
48  : val_(NULL),
49  order_(NULL),
50  keep_(NULL),
51  pivtol_changed_(false)
52  { }
53 
55 
56  static void RegisterOptions(
58  );
59 
60  bool InitializeImpl(
61  const OptionsList& options,
62  const std::string& prefix
63  );
64 
68  Index dim,
69  Index nonzeros,
70  const Index* ia,
71  const Index* ja
72  );
73 
75  {
76  return val_;
77  }
78 
80  bool new_matrix,
81  const Index* ia,
82  const Index* ja,
83  Index nrhs,
84  double* rhs_vals,
85  bool check_NegEVals,
86  Index numberOfNegEVals
87  );
88 
90  {
91  return numneg_;
92  }
94 
95  //* @name Options of Linear solver */
97  bool IncreaseQuality();
98 
99  bool ProvidesInertia() const
100  {
101  return true;
102  }
103 
105  {
106  return CSR_Format_1_Offset;
107  }
109 
112  bool ProvidesDegeneracyDetection() const
114  {
115  return false;
116  }
117 
119  const Index* /*ia*/,
120  const Index* /*ja*/,
121  std::list<Index>& /*c_deps*/
122  )
123  {
124  return SYMSOLVER_FATAL_ERROR;
125  }
126 };
127 
128 } // namespace Ipopt
129 
130 #endif
double * val_
Storage for variables.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Index * order_
Fill reducing permutation.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
ESymSolverStatus
Enum to report outcome of a linear solve.
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.
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
int numneg_
Number of negative pivots in last factorization.
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
Compressed sparse row format for lower triangular part, with 1 offset.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
bool IncreaseQuality()
Request to increase quality of solution for next solve.
This class stores a list of user set options.
bool pivtol_changed_
indicates if pivtol has been changed
int ndim_
Number of dimensions.
void * keep_
Stores pointer to factors (only understood by Fortran code!)
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Unrecoverable error in linear solver occurred.
EMatrixFormat
Enum to specify sparse matrix format.
#define ma86_control
Definition: hsl_ma86d.h:12
bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver...