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 // $Id: IpMa86SolverInterface.hpp 2073 2012-02-12 15:54:34Z stefan $
8 //
9 // Authors: Jonathan Hogg STFC 2011-03-14
10 // Jonathan Hogg 2009-07-29
11 // Carl Laird, Andreas Waechter IBM 2004-03-17
12 
13 #ifndef __IPMA86SOLVERINTERFACE_HPP__
14 #define __IPMA86SOLVERINTERFACE_HPP__
15 
17 extern "C"
18 {
19 #include "hsl_ma86d.h"
20 }
21 
22 namespace Ipopt
23 {
24 
105  {
106  private:
107  enum order_opts {
111  };
112 
113  int ndim_; // Number of dimensions
114  double *val_; // Storage for variables
115  int numneg_; // Number of negative pivots in last factorization
116  Index *order_; // Fill reducing permutation
117  void *keep_; // Stores pointer to factors (only understood by Fortran code!)
118  bool pivtol_changed_; // indicates if pivtol has been changed
119 
120  /* Options */
122  double umax_;
124 
125  public:
126 
128  val_(NULL), pivtol_changed_(false)
129  {}
131 
132  static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
133 
134  bool InitializeImpl(const OptionsList& options,
135  const std::string& prefix);
136 
146  const Index* ia,
147  const Index* ja);
148 
156  {
157  return val_;
158  }
159 
192  ESymSolverStatus MultiSolve(bool new_matrix,
193  const Index* ia,
194  const Index* ja,
195  Index nrhs,
196  double* rhs_vals,
197  bool check_NegEVals,
198  Index numberOfNegEVals);
199 
207  {
208  return numneg_;
209  }
211 
212  //* @name Options of Linear solver */
214 
220  bool IncreaseQuality();
221 
225  bool ProvidesInertia() const
226  {
227  return true;
228  }
229 
234  {
235  return CSR_Format_1_Offset;
236  }
238 
245  {
246  return false;
247  }
251  const Index* ja,
252  std::list<Index>& c_deps)
253  {
254  return SYMSOLVER_FATAL_ERROR;
255  }
256 
258  static void MetisOrder(const int dim, const Index *ptr, const Index *row, Index *perm);
259  };
260 
261 } // namespace Ipopt
262 
263 #endif