Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
Algorithm
LinearSolvers
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
// $Id: IpMa77SolverInterface.hpp 2332 2013-06-14 14:05:12Z stefan $
7
//
8
// Authors: Jonathan Hogg STFC 2013-30-05
9
// Jonathan Hogg 2009-07-29
10
// Carl Laird, Andreas Waechter IBM 2004-03-17
11
12
#ifndef __IPMA77SOLVERINTERFACE_HPP__
13
#define __IPMA77SOLVERINTERFACE_HPP__
14
15
#include "
IpSparseSymLinearSolverInterface.hpp
"
16
17
extern
"C"
{
18
#include "
hsl_ma77d.h
"
19
}
20
21
namespace
Ipopt
22
{
23
103
class
Ma77SolverInterface
:
public
SparseSymLinearSolverInterface
104
{
105
private
:
106
enum
order_opts
{
107
ORDER_AMD
,
108
ORDER_METIS
109
};
110
111
int
ndim_
;
// Number of dimensions
112
double
*
val_
;
// Storage for variables
113
int
numneg_
;
// Number of negative pivots in last factorization
114
void
*
keep_
;
// Stores pointer to factors (only understood by Fortran code!)
115
bool
pivtol_changed_
;
// indicates if pivtol has been changed
116
117
/* Options */
118
struct
ma77_control
control_
;
119
double
umax_
;
120
int
ordering_
;
121
122
public
:
123
124
Ma77SolverInterface
() :
125
val_
(NULL),
keep_
(NULL),
pivtol_changed_
(false)
126
{}
127
~Ma77SolverInterface
();
128
129
static
void
RegisterOptions
(
SmartPtr<RegisteredOptions>
roptions);
130
131
bool
InitializeImpl
(
const
OptionsList
& options,
132
const
std::string& prefix);
133
142
ESymSolverStatus
InitializeStructure
(
Index
dim,
Index
nonzeros,
143
const
Index
* ia,
144
const
Index
* ja);
145
152
double
*
GetValuesArrayPtr
()
153
{
154
return
val_
;
155
}
156
189
ESymSolverStatus
MultiSolve
(
bool
new_matrix,
190
const
Index
* ia,
191
const
Index
* ja,
192
Index
nrhs,
193
double
* rhs_vals,
194
bool
check_NegEVals,
195
Index
numberOfNegEVals);
196
203
Index
NumberOfNegEVals
()
const
204
{
205
return
numneg_
;
206
}
208
209
//* @name Options of Linear solver */
211
217
bool
IncreaseQuality
();
218
222
bool
ProvidesInertia
()
const
223
{
224
return
true
;
225
}
226
230
EMatrixFormat
MatrixFormat
()
const
231
{
232
return
CSR_Full_Format_1_Offset
;
233
}
235
241
bool
ProvidesDegeneracyDetection
()
const
242
{
243
return
false
;
244
}
247
ESymSolverStatus
DetermineDependentRows
(
const
Index
* ia,
248
const
Index
* ja,
249
std::list<Index>& c_deps)
250
{
251
return
SYMSOLVER_FATAL_ERROR
;
252
}
253
};
254
255
}
// namespace Ipopt
256
257
#endif
Generated on Mon Oct 21 2013 19:08:15 for Ipopt by
1.8.4