Ipopt Documentation  
 
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// Authors: Michael Hagemann Univ of Basel 2005-10-28
6// original version (based on MA27TSolverInterface.hpp)
7
8#ifndef __IPMA57TSOLVERINTERFACE_HPP__
9#define __IPMA57TSOLVERINTERFACE_HPP__
10
12
13#ifdef FUNNY_MA57_FINT
14#include <cstddef>
15typedef ptrdiff_t ma57int;
16#else
18#endif
19
20namespace Ipopt
21{
26{
27public:
30
32
36
38 const OptionsList& options,
39 const std::string& prefix
40 );
41
45 Index dim,
46 Index nonzeros,
47 const Index* airn,
48 const Index* ajcn
49 );
50
51 virtual double* GetValuesArrayPtr();
52
54 bool new_matrix,
55 const Index* airn,
56 const Index* ajcn,
57 Index nrhs,
58 double* rhs_vals,
59 bool check_NegEVals,
60 Index numberOfNegEVals
61 );
62
63 virtual Index NumberOfNegEVals() const;
65
66 //* @name Options of Linear solver */
68 virtual bool IncreaseQuality();
69
70 virtual bool ProvidesInertia() const
71 {
72 return true;
73 }
74
76 {
77 return Triplet_Format;
78 }
80
82 static void RegisterOptions(
84 );
86
87private:
96
99 );
100
104 );
106
109
111
115
118
121
124
139
142
153
158 double wd_cntl_[5];
160
162 double wd_rinfo_[20];
163
164 ma57int wd_lkeep_; /* LKEEP >= 5*N + NE + max(N,NE) + 42. */
166
167 ma57int* wd_iwork_; /* 5 * N. */
168
169 double* wd_fact_;
173
175 double* a_;
177
180
186 const Index* airn,
187 const Index* ajcn
188 );
189
196 const Index* airn,
197 const Index* ajcn,
198 bool check_NegEVals,
199 Index numberOfNegEVals
200 );
201
204 Index nrhs,
205 double* rhs_vals
206 );
208};
209
210} // namespace Ipopt
211#endif
ipfint ma57int
IPOPT_FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
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 returning an internal array into which the nonzero elements (in the same order as ja) will be ...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
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 structures.
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 &)
Default Assignment Operator.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
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.
double * a_
factor A of matrix
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.
Definition: IpSmartPtr.hpp:172
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
EMatrixFormat
Enum to specify sparse matrix format.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ESymSolverStatus
Enum to report outcome of a linear solve.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
double Number
Type of all numbers.
Definition: IpTypes.hpp:15