Ipopt Documentation  
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 
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
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:19
Ipopt::Ma86SolverInterface::ndim_
int ndim_
Number of dimensions.
Definition: IpMa86SolverInterface.hpp:33
Ipopt::Ma86SolverInterface::ORDER_AMD
@ ORDER_AMD
Definition: IpMa86SolverInterface.hpp:29
Ipopt::Ma86SolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMa86SolverInterface.hpp:104
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:100
Ipopt::Ma86SolverInterface::keep_
void * keep_
Stores pointer to factors (only understood by Fortran code!)
Definition: IpMa86SolverInterface.hpp:37
Ipopt::Ma86SolverInterface::control_
struct ma86_control control_
Definition: IpMa86SolverInterface.hpp:41
Ipopt::Ma86SolverInterface::ORDER_AUTO
@ ORDER_AUTO
Definition: IpMa86SolverInterface.hpp:28
ma86_control
#define ma86_control
Definition: hsl_ma86d.h:12
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:13
Ipopt::Ma86SolverInterface::ProvidesDegeneracyDetection
bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
Definition: IpMa86SolverInterface.hpp:113
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
@ CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:107
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:96
Ipopt::Ma86SolverInterface::order_opts
order_opts
Definition: IpMa86SolverInterface.hpp:26
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::Ma86SolverInterface::val_
double * val_
Storage for variables.
Definition: IpMa86SolverInterface.hpp:34
Ipopt::Ma86SolverInterface::umax_
double umax_
Definition: IpMa86SolverInterface.hpp:42
Ipopt::Ma86SolverInterface::ProvidesInertia
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMa86SolverInterface.hpp:99
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
Ipopt::Ma86SolverInterface::InitializeStructure
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
Ipopt::Ma86SolverInterface::NumberOfNegEVals
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Definition: IpMa86SolverInterface.hpp:89
Ipopt::Ma86SolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::Ma86SolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
Ipopt::Ma86SolverInterface::order_
Index * order_
Fill reducing permutation.
Definition: IpMa86SolverInterface.hpp:36
Ipopt::Ma86SolverInterface::MultiSolve
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.
Ipopt::Ma86SolverInterface::GetValuesArrayPtr
double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Definition: IpMa86SolverInterface.hpp:74
Ipopt::Ma86SolverInterface::Ma86SolverInterface
Ma86SolverInterface()
Definition: IpMa86SolverInterface.hpp:47
Ipopt::Ma86SolverInterface::DetermineDependentRows
ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
Definition: IpMa86SolverInterface.hpp:118
Ipopt::Ma86SolverInterface
Definition: IpMa86SolverInterface.hpp:23
Ipopt::Ma86SolverInterface::numneg_
int numneg_
Number of negative pivots in last factorization.
Definition: IpMa86SolverInterface.hpp:35
hsl_ma86d.h
IpSparseSymLinearSolverInterface.hpp
Ipopt::Ma86SolverInterface::~Ma86SolverInterface
~Ma86SolverInterface()
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::Ma86SolverInterface::ORDER_METIS
@ ORDER_METIS
Definition: IpMa86SolverInterface.hpp:30
Ipopt::Ma86SolverInterface::IncreaseQuality
bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::Ma86SolverInterface::pivtol_changed_
bool pivtol_changed_
indicates if pivtol has been changed
Definition: IpMa86SolverInterface.hpp:38
Ipopt::Ma86SolverInterface::ordering_
int ordering_
Definition: IpMa86SolverInterface.hpp:43
Ipopt::SYMSOLVER_FATAL_ERROR
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:32