Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 2706 2018-01-15 04:11:56Z 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
16 #include "IpSparseSymLinearSolverInterface.hpp"
17 extern "C"
18 {
19 #include "hsl_ma86d.h"
20 }
21
22 namespace Ipopt
23 {
24
104 class Ma86SolverInterface: public SparseSymLinearSolverInterface
105 {
106 private:
107 enum order_opts {
108 ORDER_AUTO,
109 ORDER_AMD,
110 ORDER_METIS
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 */
121 struct ma86_control control_;
122 double umax_;
123 int ordering_;
124
125 public:
126
127 Ma86SolverInterface() :
128 val_(NULL), order_(NULL), keep_(NULL), pivtol_changed_(false)
129 {}
130 ~Ma86SolverInterface();
131
132 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
133
134 bool InitializeImpl(const OptionsList& options,
135 const std::string& prefix);
136
145 ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
146 const Index* ia,
147 const Index* ja);
148
155 double* GetValuesArrayPtr()
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
206 Index NumberOfNegEVals() const
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
233 EMatrixFormat MatrixFormat() const
234 {
235 return CSR_Format_1_Offset;
236 }
238
244 bool ProvidesDegeneracyDetection() const
245 {
246 return false;
247 }
250 ESymSolverStatus DetermineDependentRows(const Index* ia,
251 const Index* ja,
252 std::list<Index>& c_deps)
253 {
254 return SYMSOLVER_FATAL_ERROR;
255 }
256 };
257
258 } // namespace Ipopt
259
260 #endif
Ipopt::Ma86SolverInterface::val_
double * val_
Definition: IpMa86SolverInterface.hpp:114
Ipopt::Ma86SolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMa86SolverInterface.hpp:233
Ipopt::Ma86SolverInterface::ORDER_METIS
Definition: IpMa86SolverInterface.hpp:110
Ipopt::Ma86SolverInterface::DetermineDependentRows
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.
Definition: IpMa86SolverInterface.hpp:250
Ipopt::Ma86SolverInterface::order_
Index * order_
Definition: IpMa86SolverInterface.hpp:116
Ipopt::Ma86SolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
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::InitializeStructure
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal stuctures.
Ipopt::Ma86SolverInterface::ORDER_AUTO
Definition: IpMa86SolverInterface.hpp:108
Ipopt::Ma86SolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:98
IpSparseSymLinearSolverInterface.hpp
Ipopt::Ma86SolverInterface::Ma86SolverInterface
Ma86SolverInterface()
Definition: IpMa86SolverInterface.hpp:127
Ipopt::Ma86SolverInterface::ProvidesInertia
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMa86SolverInterface.hpp:225
Ipopt::Ma86SolverInterface::numneg_
int numneg_
Definition: IpMa86SolverInterface.hpp:115
Ipopt::Ma86SolverInterface::NumberOfNegEVals
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Definition: IpMa86SolverInterface.hpp:206
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:155
hsl_ma86d.h
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:110
Ipopt::Ma86SolverInterface::~Ma86SolverInterface
~Ma86SolverInterface()
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::Ma86SolverInterface::IncreaseQuality
bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::Ma86SolverInterface::ordering_
int ordering_
Definition: IpMa86SolverInterface.hpp:123
Ipopt::Ma86SolverInterface::pivtol_changed_
bool pivtol_changed_
Definition: IpMa86SolverInterface.hpp:118
Ipopt::Ma86SolverInterface::ndim_
int ndim_
Definition: IpMa86SolverInterface.hpp:113
Ipopt::Ma86SolverInterface::control_
struct ma86_control control_
Definition: IpMa86SolverInterface.hpp:121
Ipopt::Ma86SolverInterface::keep_
void * keep_
Definition: IpMa86SolverInterface.hpp:117
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:33
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:102
ma86_control
#define ma86_control
Definition: hsl_ma86d.h:13
Ipopt::Ma86SolverInterface::ORDER_AMD
Definition: IpMa86SolverInterface.hpp:109
Ipopt::Ma86SolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpMa86SolverInterface.hpp:104
Ipopt::Ma86SolverInterface::umax_
double umax_
Definition: IpMa86SolverInterface.hpp:122
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:244
Ipopt::Ma86SolverInterface::order_opts
order_opts
Definition: IpMa86SolverInterface.hpp:107