Ipopt 3.11.9
Loading...
Searching...
No Matches
IpMa57TSolverInterface.hpp
Go to the documentation of this file.
1// Copyright (C) 2005, 2006 International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// $Id: IpMa57TSolverInterface.hpp 2158 2012-12-04 19:24:42Z stefan $
6//
7// Authors: Michael Hagemann Univ of Basel 2005-10-28
8// original version (based on MA27TSolverInterface.hpp)
9
10#ifndef __IPMA57TSOLVERINTERFACE_HPP__
11#define __IPMA57TSOLVERINTERFACE_HPP__
12
14
15#ifdef FUNNY_MA57_FINT
16#include <cstddef>
17typedef ptrdiff_t ma57int;
18#else
20#endif
21
22namespace Ipopt
23{
28 {
29 public:
34
38
40 bool InitializeImpl(const OptionsList& options,
41 const std::string& prefix);
42
43
52 Index dim,
53 Index nonzeros,
54 const Index *airn,
55 const Index *ajcn);
56
62 virtual double* GetValuesArrayPtr();
63
67 virtual ESymSolverStatus MultiSolve(bool new_matrix,
68 const Index* airn,
69 const Index* ajcn,
70 Index nrhs,
71 double* rhs_vals,
72 bool check_NegEVals,
73 Index numberOfNegEVals);
74
81 virtual Index NumberOfNegEVals() const;
83
84 //* @name Options of Linear solver */
86
91 virtual bool IncreaseQuality();
92
96 virtual bool ProvidesInertia() const
97 {
98 return true;
99 }
104 {
105 return Triplet_Format;
106 }
108
113
114 private:
125
129
134
138
144
158
171
176 double wd_cntl_[5];
178
180 double wd_rinfo_[20];
181
182 ma57int wd_lkeep_; /* LKEEP >= 5*N + NE + max(N,NE) + 42. */
184
185 ma57int *wd_iwork_; /* 5 * N. */
186
187 double *wd_fact_;
191
192
194 double* a_;
196
204 const Index* ajcn);
205
211 const Index* ajcn,
212 bool check_NegEVals,
213 Index numberOfNegEVals);
214
218 double *rhs_vals);
220 };
221
222} // namespace Ipopt
223#endif
ipfint ma57int
FORTRAN_INTEGER_TYPE ipfint
Definition IpTypes.hpp:26
Interface to the symmetric linear solver MA57, derived from SparseSymLinearSolverInterface.
Number ma57_pre_alloc_
Factor for estimating initial size of work arrays.
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as airn and ajcn...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Index negevals_
Number of negative eigenvalues.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal stuctures.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
ESymSolverStatus Backsolve(Index nrhs, double *rhs_vals)
Call MA57CD to do the backsolve.
Index nonzeros_
Number of nonzeros of the matrix.
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA57BD to factorize the Matrix.
ESymSolverStatus SymbolicFactorization(const Index *airn, const Index *ajcn)
Call MA57AD and reserve memory for MA57 data.
Ma57TSolverInterface()
Constructor.
void operator=(const Ma57TSolverInterface &)
Overloaded Equals Operator.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
bool initialized_
Flag indicating if internal data is initialized.
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
Ma57TSolverInterface(const Ma57TSolverInterface &)
Copy Constructor.
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed.
Number pivtolmax_
Maximal pivot tolerance.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before.
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *airn, const Index *ajcn, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
virtual ~Ma57TSolverInterface()
Destructor.
Index dim_
Number of rows and columns of the matrix.
This class stores a list of user set options.
Template class for Smart Pointers.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
ESymSolverStatus
Enum to report outcome of a linear solve.
int Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:19
double Number
Type of all numbers.
Definition IpTypes.hpp:17