Ipopt Documentation  
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>
15 typedef ptrdiff_t ma57int;
16 #else
17 typedef ipfint ma57int;
18 #endif
19 
20 namespace Ipopt
21 {
26 {
27 public:
29 
32 
34  virtual ~Ma57TSolverInterface();
36 
37  bool InitializeImpl(
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 
87 private:
95 
99  );
100 
102  void operator=(
103  const Ma57TSolverInterface&
104  );
106 
108 
111 
115 
117 
121 
123 
139 
141 
153 
157  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 
179 
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
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
IPOPT_FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
ESymSolverStatus
Enum to report outcome of a linear solve.
Index nonzeros_
Number of nonzeros of the matrix.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
ipfint ma57int
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
This file contains a base class for all exceptions and a set of macros to help with exceptions...
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
This class stores a list of user set options.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA57BD to factorize the Matrix.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal structures.
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:17
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 &)
Default Assignment Operator.
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.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.