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:
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 
87 private:
99  );
100 
102  void operator=(
103  const Ma57TSolverInterface&
104  );
106 
111 
115 
121 
139 
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 
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
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:20
Ipopt::Ma57TSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpMa57TSolverInterface.hpp:119
Ipopt::SparseSymLinearSolverInterface::Triplet_Format
@ Triplet_Format
Triplet (MA27) format.
Definition: IpSparseSymLinearSolverInterface.hpp:103
Ipopt::Ma57TSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *airn, const Index *ajcn)
Call MA57AD and reserve memory for MA57 data.
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:101
Ipopt::Ma57TSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMa57TSolverInterface.hpp:75
Ipopt::Ma57TSolverInterface::a_
double * a_
factor A of matrix
Definition: IpMa57TSolverInterface.hpp:175
Ipopt::Ma57TSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::Ma57TSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMa57TSolverInterface.hpp:70
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::Ma57TSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::Ma57TSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA57BD to factorize the Matrix.
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:151
Ipopt::Ma57TSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal structures.
Ipopt::Ma57TSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
Ipopt::Ma57TSolverInterface::pivtol_
Number pivtol_
Pivot tolerance.
Definition: IpMa57TSolverInterface.hpp:143
Ipopt::Ma57TSolverInterface::nonzeros_
Index nonzeros_
Number of nonzeros of the matrix.
Definition: IpMa57TSolverInterface.hpp:113
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:97
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
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::wd_iwork_
ma57int * wd_iwork_
Definition: IpMa57TSolverInterface.hpp:167
Ipopt::Ma57TSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpMa57TSolverInterface.hpp:110
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::Ma57TSolverInterface::wd_icntl_
ma57int wd_icntl_[20]
Definition: IpMa57TSolverInterface.hpp:159
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
Ipopt::Ma57TSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpMa57TSolverInterface.hpp:128
Ipopt::Ma57TSolverInterface::wd_lkeep_
ma57int wd_lkeep_
Definition: IpMa57TSolverInterface.hpp:164
Ipopt::Ma57TSolverInterface::operator=
void operator=(const Ma57TSolverInterface &)
Default Assignment Operator.
Ipopt::Ma57TSolverInterface::pivtolmax_
Number pivtolmax_
Maximal pivot tolerance.
Definition: IpMa57TSolverInterface.hpp:145
Ipopt::Ma57TSolverInterface::wd_cntl_
double wd_cntl_[5]
Definition: IpMa57TSolverInterface.hpp:158
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:137
Ipopt::Ma57TSolverInterface::wd_rinfo_
double wd_rinfo_[20]
Definition: IpMa57TSolverInterface.hpp:162
Ipopt::Ma57TSolverInterface::~Ma57TSolverInterface
virtual ~Ma57TSolverInterface()
Destructor.
ma57int
ipfint ma57int
Definition: IpMa57TSolverInterface.hpp:17
Ipopt::Ma57TSolverInterface::wd_lifact_
ma57int wd_lifact_
Definition: IpMa57TSolverInterface.hpp:172
Ipopt::Ma57TSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Ipopt::Ma57TSolverInterface::wd_keep_
ma57int * wd_keep_
Definition: IpMa57TSolverInterface.hpp:165
Ipopt::Ma57TSolverInterface::Ma57TSolverInterface
Ma57TSolverInterface(const Ma57TSolverInterface &)
Copy Constructor.
Ipopt::Ma57TSolverInterface::Ma57TSolverInterface
Ma57TSolverInterface()
Constructor.
Ipopt::Ma57TSolverInterface::wd_ifact_
ma57int * wd_ifact_
Definition: IpMa57TSolverInterface.hpp:171
Ipopt::Ma57TSolverInterface::Backsolve
ESymSolverStatus Backsolve(Index nrhs, double *rhs_vals)
Call MA57CD to do the backsolve.
Ipopt::Ma57TSolverInterface::ma57_pre_alloc_
Number ma57_pre_alloc_
Factor for estimating initial size of work arrays.
Definition: IpMa57TSolverInterface.hpp:147
Ipopt::Ma57TSolverInterface::wd_lfact_
ma57int wd_lfact_
Definition: IpMa57TSolverInterface.hpp:170
Ipopt::Ma57TSolverInterface
Interface to the symmetric linear solver MA57, derived from SparseSymLinearSolverInterface.
Definition: IpMa57TSolverInterface.hpp:26
IpSparseSymLinearSolverInterface.hpp
Ipopt::Ma57TSolverInterface::wd_fact_
double * wd_fact_
Definition: IpMa57TSolverInterface.hpp:169
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:132
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::Ma57TSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::Ma57TSolverInterface::wd_info_
ma57int wd_info_[40]
Definition: IpMa57TSolverInterface.hpp:161