Ipopt  3.12.10
 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 
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 {
28  {
29  public:
34 
36  virtual ~Ma57TSolverInterface();
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 
111  static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
113 
114  private:
125 
127  void operator=(const Ma57TSolverInterface&);
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
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
ESymSolverStatus
Enum to report outcome of a linear solve.
Index nonzeros_
Number of nonzeros of the matrix.
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:26
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
ipfint ma57int
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
This class stores a list of user set options.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA57BD to factorize the Matrix.
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as airn and ajcn...
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal stuctures.
Number ma57_pre_alloc_
Factor for estimating initial size of work arrays.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
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.
bool initialized_
Flag indicating if internal data is initialized.
EMatrixFormat
Enum to specify sparse matrix format.
void operator=(const Ma57TSolverInterface &)
Overloaded Equals Operator.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Index dim_
Number of rows and columns of the matrix.
virtual ~Ma57TSolverInterface()
Destructor.
Index negevals_
Number of negative eigenvalues.
Number pivtolmax_
Maximal pivot tolerance.
ESymSolverStatus SymbolicFactorization(const Index *airn, const Index *ajcn)
Call MA57AD and reserve memory for MA57 data.
Ma57TSolverInterface()
Constructor.
Interface to the symmetric linear solver MA57, derived from SparseSymLinearSolverInterface.
double * a_
factor A of matrix
ESymSolverStatus Backsolve(Index nrhs, double *rhs_vals)
Call MA57CD to do the backsolve.