Ipopt Documentation  
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 // Authors: Jonathan Hogg STFC 2013-30-05
7 // Jonathan Hogg 2009-07-29
8 // Carl Laird, Andreas Waechter IBM 2004-03-17
9 
10 #ifndef __IPMA77SOLVERINTERFACE_HPP__
11 #define __IPMA77SOLVERINTERFACE_HPP__
12 
14 
15 extern "C"
16 {
17 #include "hsl_ma77d.h"
18 }
19 
20 namespace Ipopt
21 {
22 
24 {
25 private:
27  {
30  };
31 
32  int ndim_;
33  double* val_;
34  int numneg_;
35  void* keep_;
37 
38  /* Options */
39  struct ma77_control control_;
40  double umax_;
41  int ordering_;
42 
43 public:
44 
46  : val_(NULL),
47  keep_(NULL),
48  pivtol_changed_(false)
49  { }
50 
52 
53  static void RegisterOptions(
55  );
56 
58  const OptionsList& options,
59  const std::string& prefix
60  );
61 
65  Index dim,
66  Index nonzeros,
67  const Index* ia,
68  const Index* ja
69  );
70 
72  {
73  return val_;
74  }
75 
77  bool new_matrix,
78  const Index* ia,
79  const Index* ja,
80  Index nrhs,
81  double* rhs_vals,
82  bool check_NegEVals,
83  Index numberOfNegEVals
84  );
85 
87  {
88  return numneg_;
89  }
91 
92  //* @name Options of Linear solver */
95 
96  bool ProvidesInertia() const
97  {
98  return true;
99  }
100 
102  {
104  }
106 
111  {
112  return false;
113  }
114 
116  const Index* /*ia*/,
117  const Index* /*ja*/,
118  std::list<Index>& /*c_deps*/
119  )
120  {
121  return SYMSOLVER_FATAL_ERROR;
122  }
123 };
124 
125 } // namespace Ipopt
126 
127 #endif
Ipopt::Ma77SolverInterface::InitializeStructure
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:20
Ipopt::Ma77SolverInterface::pivtol_changed_
bool pivtol_changed_
indicates if pivtol has been changed
Definition: IpMa77SolverInterface.hpp:36
Ipopt::Ma77SolverInterface::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::Ma77SolverInterface::ordering_
int ordering_
Definition: IpMa77SolverInterface.hpp:41
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:101
Ipopt::Ma77SolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMa77SolverInterface.hpp:101
Ipopt::Ma77SolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::Ma77SolverInterface::ORDER_METIS
@ ORDER_METIS
Definition: IpMa77SolverInterface.hpp:29
ma77_control
#define ma77_control
Definition: hsl_ma77d.h:12
Ipopt::Ma77SolverInterface::IncreaseQuality
bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Ma77SolverInterface::order_opts
order_opts
Definition: IpMa77SolverInterface.hpp:27
Ipopt::Ma77SolverInterface
Definition: IpMa77SolverInterface.hpp:24
Ipopt::Ma77SolverInterface::control_
struct ma77_control control_
Definition: IpMa77SolverInterface.hpp:39
Ipopt::Ma77SolverInterface::keep_
void * keep_
Stores pointer to factors (only understood by Fortran code!)
Definition: IpMa77SolverInterface.hpp:35
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:97
Ipopt::Ma77SolverInterface::ProvidesInertia
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMa77SolverInterface.hpp:96
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::Ma77SolverInterface::ndim_
int ndim_
Number of dimensions.
Definition: IpMa77SolverInterface.hpp:32
Ipopt::Ma77SolverInterface::umax_
double umax_
Definition: IpMa77SolverInterface.hpp:40
Ipopt::Ma77SolverInterface::GetValuesArrayPtr
double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Definition: IpMa77SolverInterface.hpp:71
Ipopt::Ma77SolverInterface::DetermineDependentRows
ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
Definition: IpMa77SolverInterface.hpp:115
Ipopt::SparseSymLinearSolverInterface::CSR_Full_Format_1_Offset
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lwr and upr parts, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:111
Ipopt::Ma77SolverInterface::ORDER_AMD
@ ORDER_AMD
Definition: IpMa77SolverInterface.hpp:28
Ipopt::Ma77SolverInterface::Ma77SolverInterface
Ma77SolverInterface()
Definition: IpMa77SolverInterface.hpp:45
Ipopt::Ma77SolverInterface::NumberOfNegEVals
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Definition: IpMa77SolverInterface.hpp:86
IpSparseSymLinearSolverInterface.hpp
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::Ma77SolverInterface::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::Ma77SolverInterface::ProvidesDegeneracyDetection
bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
Definition: IpMa77SolverInterface.hpp:110
hsl_ma77d.h
Ipopt::Ma77SolverInterface::numneg_
int numneg_
Number of negative pivots in last factorization.
Definition: IpMa77SolverInterface.hpp:34
Ipopt::Ma77SolverInterface::~Ma77SolverInterface
~Ma77SolverInterface()
Ipopt::Ma77SolverInterface::val_
double * val_
Storage for variables.
Definition: IpMa77SolverInterface.hpp:33
Ipopt::SYMSOLVER_FATAL_ERROR
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:32