Ipopt
3.11.0
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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 2085 2012-02-16 11:01:51Z stefan $
7
//
8
// Authors: Jonathan Hogg 2009-07-29
9
// Carl Laird, Andreas Waechter IBM 2004-03-17
10
11
#ifndef __IPMA77SOLVERINTERFACE_HPP__
12
#define __IPMA77SOLVERINTERFACE_HPP__
13
14
#include "
IpSparseSymLinearSolverInterface.hpp
"
15
16
extern
"C"
{
17
#include "
hsl_ma77d.h
"
18
}
19
20
namespace
Ipopt
21
{
22
102
class
Ma77SolverInterface
:
public
SparseSymLinearSolverInterface
103
{
104
private
:
105
int
ndim_
;
// Number of dimensions
106
double
*
val_
;
// Storage for variables
107
int
numneg_
;
// Number of negative pivots in last factorization
108
void
*
keep_
;
// Stores pointer to factors (only understood by Fortran code!)
109
bool
pivtol_changed_
;
// indicates if pivtol has been changed
110
111
/* Options */
112
struct
ma77_control
control_
;
113
double
umax_
;
114
115
public
:
116
117
Ma77SolverInterface
() :
118
val_
(NULL),
keep_
(NULL),
pivtol_changed_
(false)
119
{}
120
~Ma77SolverInterface
();
121
122
static
void
RegisterOptions
(
SmartPtr<RegisteredOptions>
roptions);
123
124
bool
InitializeImpl
(
const
OptionsList
& options,
125
const
std::string& prefix);
126
135
ESymSolverStatus
InitializeStructure
(
Index
dim,
Index
nonzeros,
136
const
Index
* ia,
137
const
Index
* ja);
138
145
double
*
GetValuesArrayPtr
() {
return
val_
; }
146
179
ESymSolverStatus
MultiSolve
(
bool
new_matrix,
180
const
Index
* ia,
181
const
Index
* ja,
182
Index
nrhs,
183
double
* rhs_vals,
184
bool
check_NegEVals,
185
Index
numberOfNegEVals);
186
193
Index
NumberOfNegEVals
()
const
{
return
numneg_
; }
195
196
//* @name Options of Linear solver */
198
204
bool
IncreaseQuality
();
205
209
bool
ProvidesInertia
()
const
{
return
true
; }
210
214
EMatrixFormat
MatrixFormat
()
const
{
return
CSR_Full_Format_0_Offset
; }
216
222
bool
ProvidesDegeneracyDetection
()
const
{
return
false
; }
225
ESymSolverStatus
DetermineDependentRows
(
const
Index
* ia,
226
const
Index
* ja,
227
std::list<Index>& c_deps)
228
{
229
return
SYMSOLVER_FATAL_ERROR
;
230
}
231
233
static
void
MetisOrder
(
const
int
dim,
const
Index
*ptr,
const
Index
*row,
Index
*perm);
234
};
235
236
}
// namespace Ipopt
237
238
#endif
Generated by
1.8.4