Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
13 #include "IpSparseSymLinearSolverInterface.hpp"
14
15 #ifdef FUNNY_MA57_FINT
16 #include <cstddef>
17 typedef ptrdiff_t ma57int;
18 #else
19 typedef ipfint ma57int;
20 #endif
21
22 namespace Ipopt
23 {
27 class Ma57TSolverInterface: public SparseSymLinearSolverInterface
28 {
29 public:
33 Ma57TSolverInterface();
34
36 virtual ~Ma57TSolverInterface();
38
40 bool InitializeImpl(const OptionsList& options,
41 const std::string& prefix);
42
43
51 virtual ESymSolverStatus InitializeStructure(
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 }
103 EMatrixFormat MatrixFormat() const
104 {
105 return Triplet_Format;
106 }
108
111 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
113
114 private:
124 Ma57TSolverInterface(const Ma57TSolverInterface&);
125
127 void operator=(const Ma57TSolverInterface&);
129
133 Index dim_;
134
136 Index nonzeros_;
138
142 Index negevals_;
144
149 bool initialized_;
152 bool pivtol_changed_;
156 bool refactorize_;
158
162 Number pivtol_;
164 Number pivtolmax_;
166 Number ma57_pre_alloc_;
169 bool warm_start_same_structure_;
171
176 double wd_cntl_[5];
177 ma57int wd_icntl_[20];
178
179 ma57int wd_info_[40];
180 double wd_rinfo_[20];
181
182 ma57int wd_lkeep_; /* LKEEP >= 5*N + NE + max(N,NE) + 42. */
183 ma57int *wd_keep_;
184
185 ma57int *wd_iwork_; /* 5 * N. */
186
187 double *wd_fact_;
188 ma57int wd_lfact_;
189 ma57int *wd_ifact_;
190 ma57int wd_lifact_;
191
192
194 double* a_;
196
203 ESymSolverStatus SymbolicFactorization(const Index* airn,
204 const Index* ajcn);
205
210 ESymSolverStatus Factorization(const Index* airn,
211 const Index* ajcn,
212 bool check_NegEVals,
213 Index numberOfNegEVals);
214
217 ESymSolverStatus Backsolve(Index nrhs,
218 double *rhs_vals);
220 };
221
222 } // namespace Ipopt
223 #endif
Ipopt::Ma57TSolverInterface::warm_start_same_structure_
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
Definition: IpMa57TSolverInterface.hpp:169
Ipopt::Ma57TSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMa57TSolverInterface.hpp:96
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
Ipopt::Ma57TSolverInterface::pivtol_
Number pivtol_
Pivol tolerance.
Definition: IpMa57TSolverInterface.hpp:162
Ipopt::Ma57TSolverInterface::nonzeros_
Index nonzeros_
Number of nonzeros of the matrix.
Definition: IpMa57TSolverInterface.hpp:136
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:26
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:98
IpSparseSymLinearSolverInterface.hpp
Ipopt::Ma57TSolverInterface::wd_info_
ma57int wd_info_[40]
Definition: IpMa57TSolverInterface.hpp:179
ma57int
ipfint ma57int
Definition: IpMa57TSolverInterface.hpp:19
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::Ma57TSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMa57TSolverInterface.hpp:103
Ipopt::Ma57TSolverInterface::wd_iwork_
ma57int * wd_iwork_
Definition: IpMa57TSolverInterface.hpp:185
Ipopt::Ma57TSolverInterface::wd_lkeep_
ma57int wd_lkeep_
Definition: IpMa57TSolverInterface.hpp:182
Ipopt::Ma57TSolverInterface::refactorize_
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
Definition: IpMa57TSolverInterface.hpp:156
Ipopt::Ma57TSolverInterface::wd_rinfo_
double wd_rinfo_[20]
Definition: IpMa57TSolverInterface.hpp:180
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::Ma57TSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::SparseSymLinearSolverInterface::Triplet_Format
Triplet (MA27) format.
Definition: IpSparseSymLinearSolverInterface.hpp:104
Ipopt::Ma57TSolverInterface::wd_lifact_
ma57int wd_lifact_
Definition: IpMa57TSolverInterface.hpp:190
Ipopt::Ma57TSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::Ma57TSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA57BD to factorize the Matrix.
Ipopt::Ma57TSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as airn and ajcn...
Ipopt::Ma57TSolverInterface::wd_keep_
ma57int * wd_keep_
Definition: IpMa57TSolverInterface.hpp:183
Ipopt::Ma57TSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal stuctures.
Ipopt::Ma57TSolverInterface::ma57_pre_alloc_
Number ma57_pre_alloc_
Factor for estimating initial size of work arrays.
Definition: IpMa57TSolverInterface.hpp:166
Ipopt::Ma57TSolverInterface::wd_fact_
double * wd_fact_
Definition: IpMa57TSolverInterface.hpp:187
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::Ma57TSolverInterface::pivtol_changed_
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Definition: IpMa57TSolverInterface.hpp:152
Ipopt::Ma57TSolverInterface::wd_icntl_
ma57int wd_icntl_[20]
Definition: IpMa57TSolverInterface.hpp:177
Ipopt::Ma57TSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::Ma57TSolverInterface::MultiSolve
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.
Ipopt::Ma57TSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpMa57TSolverInterface.hpp:149
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:102
Ipopt::Ma57TSolverInterface::operator=
void operator=(const Ma57TSolverInterface &)
Overloaded Equals Operator.
Ipopt::Ma57TSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::Ma57TSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpMa57TSolverInterface.hpp:133
Ipopt::Ma57TSolverInterface::~Ma57TSolverInterface
virtual ~Ma57TSolverInterface()
Destructor.
Ipopt::Ma57TSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpMa57TSolverInterface.hpp:142
Ipopt::Ma57TSolverInterface::pivtolmax_
Number pivtolmax_
Maximal pivot tolerance.
Definition: IpMa57TSolverInterface.hpp:164
Ipopt::Ma57TSolverInterface::wd_cntl_
double wd_cntl_[5]
Definition: IpMa57TSolverInterface.hpp:176
Ipopt::Ma57TSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *airn, const Index *ajcn)
Call MA57AD and reserve memory for MA57 data.
Ipopt::Ma57TSolverInterface::Ma57TSolverInterface
Ma57TSolverInterface()
Constructor.
Ipopt::Ma57TSolverInterface::wd_ifact_
ma57int * wd_ifact_
Definition: IpMa57TSolverInterface.hpp:189
Ipopt::Ma57TSolverInterface::wd_lfact_
ma57int wd_lfact_
Definition: IpMa57TSolverInterface.hpp:188
Ipopt::Ma57TSolverInterface
Interface to the symmetric linear solver MA57, derived from SparseSymLinearSolverInterface.
Definition: IpMa57TSolverInterface.hpp:27
Ipopt::Ma57TSolverInterface::a_
double * a_
factor A of matrix
Definition: IpMa57TSolverInterface.hpp:194
Ipopt::Ma57TSolverInterface::Backsolve
ESymSolverStatus Backsolve(Index nrhs, double *rhs_vals)
Call MA57CD to do the backsolve.