Ipopt Documentation  
IpIterativePardisoSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Andreas Waechter IBM 2008-09-18
6 // based on IpPardisoSolverInterface.hpp rev 1119
7 
8 #ifndef __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
9 #define __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
10 
12 #include "IpInexactCq.hpp"
14 
15 namespace Ipopt
16 {
17 
22 {
23 public:
28  IterativeSolverTerminationTester& normal_tester,
30  );
31 
35 
36  bool InitializeImpl(
37  const OptionsList& options,
38  const std::string& prefix
39  );
40 
45  Index dim,
46  Index nonzeros,
47  const Index* ia,
48  const Index* ja
49  );
50 
54  virtual double* GetValuesArrayPtr();
55 
58  bool new_matrix,
59  const Index* ia,
60  const Index* ja,
61  Index nrhs,
62  double* rhs_vals,
63  bool check_NegEVals,
64  Index numberOfNegEVals
65  );
66 
70  virtual Index NumberOfNegEVals() const;
72 
73  //* @name Options of Linear solver */
75 
77  virtual bool IncreaseQuality();
78 
83  virtual bool ProvidesInertia() const
84  {
85  return true;
86  }
87 
92  {
93  return CSR_Format_1_Offset;
94  }
96 
97  static void RegisterOptions(
99  );
100 
101 private:
114 
118  );
119 
121  void operator=(
123  );
125 
130 
133 
135  double* a_;
137 
143 
148  {
152  };
173 
184 
194 
197 
205 
214 
218  void** PT_;
231  double* DPARM_;
235 
241 
246  const Index* ia,
247  const Index* ja
248  );
249 
252  const Index* ia,
253  const Index* ja,
254  bool check_NegEVals,
255  Index numberOfNegEVals
256  );
257 
261  const Index* ia,
262  const Index* ja,
263  Index nrhs,
264  double* rhs_vals
265  );
267 
270  {
271  InexactData& inexact_data = static_cast<InexactData&>(IpData().AdditionalData());
272  DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
273  return inexact_data;
274  }
275 
278  {
279  InexactCq& inexact_cq = static_cast<InexactCq&>(IpCq().AdditionalCq());
280  DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
281  return inexact_cq;
282  }
283 
286 
289 
290 };
291 
292 } // namespace Ipopt
293 
294 #endif
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_max_levels_
Index normal_pardiso_iter_max_levels_
Definition: IpIterativePardisoSolverInterface.hpp:188
Ipopt::IterativePardisoSolverInterface::MultiSolve
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *ia, const Index *ja, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
Ipopt::IterativePardisoSolverInterface::IPARM_
ipfint * IPARM_
Parameter and info array for Pardiso.
Definition: IpIterativePardisoSolverInterface.hpp:229
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:19
Ipopt::IterativePardisoSolverInterface::pardiso_iter_dropping_schur_
Number pardiso_iter_dropping_schur_
Definition: IpIterativePardisoSolverInterface.hpp:181
Ipopt::IterativePardisoSolverInterface::match_strat_
PardisoMatchingStrategy match_strat_
Option that controls the matching strategy.
Definition: IpIterativePardisoSolverInterface.hpp:154
Ipopt::IterativePardisoSolverInterface::pardiso_max_iter_
Index pardiso_max_iter_
Options for the preconditioner.
Definition: IpIterativePardisoSolverInterface.hpp:176
Ipopt::AlgorithmStrategyObject::IpCq
IpoptCalculatedQuantities & IpCq() const
Definition: IpAlgStrategy.hpp:150
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_relative_tol_
Number normal_pardiso_iter_relative_tol_
Definition: IpIterativePardisoSolverInterface.hpp:186
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:100
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_dropping_factor_
Number normal_pardiso_iter_dropping_factor_
Definition: IpIterativePardisoSolverInterface.hpp:189
Ipopt::IterativePardisoSolverInterface::have_symbolic_factorization_
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been performed.
Definition: IpIterativePardisoSolverInterface.hpp:158
Ipopt::IterativePardisoSolverInterface::normal_pardiso_max_iter_
Index normal_pardiso_max_iter_
Definition: IpIterativePardisoSolverInterface.hpp:185
IpInexactCq.hpp
Ipopt::IterativePardisoSolverInterface::pardiso_iter_dropping_factor_
Number pardiso_iter_dropping_factor_
Definition: IpIterativePardisoSolverInterface.hpp:180
Ipopt::IterativePardisoSolverInterface::operator=
void operator=(const IterativePardisoSolverInterface &)
Overloaded Assignment Operator.
Ipopt::IterativePardisoSolverInterface::pardiso_iter_max_levels_
Index pardiso_iter_max_levels_
Definition: IpIterativePardisoSolverInterface.hpp:179
Ipopt::InexactData
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
Definition: IpInexactData.hpp:18
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:13
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_inverse_norm_factor_
Number normal_pardiso_iter_inverse_norm_factor_
Definition: IpIterativePardisoSolverInterface.hpp:192
Ipopt::IterativePardisoSolverInterface::MTYPE_
ipfint MTYPE_
Matrix type; real and symmetric indefinite.
Definition: IpIterativePardisoSolverInterface.hpp:227
Ipopt::IterativePardisoSolverInterface::DPARM_
double * DPARM_
Parameter and info array for Pardiso.
Definition: IpIterativePardisoSolverInterface.hpp:231
Ipopt::IterativePardisoSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
Ipopt::IterativePardisoSolverInterface::PardisoMatchingStrategy
PardisoMatchingStrategy
Type for matching strategies.
Definition: IpIterativePardisoSolverInterface.hpp:147
Ipopt::IterativePardisoSolverInterface::PT_
void ** PT_
Internal data address pointers.
Definition: IpIterativePardisoSolverInterface.hpp:218
Ipopt::AlgorithmStrategyObject::IpData
IpoptData & IpData() const
Definition: IpAlgStrategy.hpp:144
IpIterativeSolverTerminationTester.hpp
Ipopt::IterativePardisoSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::IterativePardisoSolverInterface::pardiso_iter_relative_tol_
Number pardiso_iter_relative_tol_
Definition: IpIterativePardisoSolverInterface.hpp:177
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
@ CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:107
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:96
Ipopt::IterativePardisoSolverInterface::Solve
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Pardiso to do the Solve.
Ipopt::IterativePardisoSolverInterface::pardiso_iter_dropping_factor_used_
Number pardiso_iter_dropping_factor_used_
Actually used dropping tolerances.
Definition: IpIterativePardisoSolverInterface.hpp:200
Ipopt::IterativePardisoSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpIterativePardisoSolverInterface.hpp:141
Ipopt::IterativePardisoSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpIterativePardisoSolverInterface.hpp:212
Ipopt::IterativePardisoSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements are to be stored.
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_dropping_factor_used_
Number normal_pardiso_iter_dropping_factor_used_
Definition: IpIterativePardisoSolverInterface.hpp:202
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::IterativePardisoSolverInterface::MSGLVL_
ipfint MSGLVL_
Message level.
Definition: IpIterativePardisoSolverInterface.hpp:233
Ipopt::IterativePardisoSolverInterface::pardiso_redo_symbolic_fact_only_if_inertia_wrong_
bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_
Flag indicating whether the symbolic factorization should only be done after perturbed elements,...
Definition: IpIterativePardisoSolverInterface.hpp:162
Ipopt::IterativePardisoSolverInterface::pardiso_iter_coarse_size_
Index pardiso_iter_coarse_size_
Definition: IpIterativePardisoSolverInterface.hpp:178
Ipopt::IterativePardisoSolverInterface::InexData
InexactData & InexData()
Method to easily access Inexact data.
Definition: IpIterativePardisoSolverInterface.hpp:269
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_coarse_size_
Index normal_pardiso_iter_coarse_size_
Definition: IpIterativePardisoSolverInterface.hpp:187
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
Ipopt::IterativePardisoSolverInterface::pardiso_iter_max_row_fill_
Index pardiso_iter_max_row_fill_
Definition: IpIterativePardisoSolverInterface.hpp:182
Ipopt::IpoptData::AdditionalData
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
Definition: IpIpoptData.hpp:606
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
Ipopt::IterativePardisoSolverInterface::~IterativePardisoSolverInterface
virtual ~IterativePardisoSolverInterface()
Destructor.
Ipopt::IterativePardisoSolverInterface::decr_factor_
Number decr_factor_
Decrease factor for dropping tolerances.
Definition: IpIterativePardisoSolverInterface.hpp:196
Ipopt::IterativePardisoSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Pardiso to factorize the Matrix.
Ipopt::IterativePardisoSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpIterativePardisoSolverInterface.hpp:129
Ipopt::IterativePardisoSolverInterface::COMPLETE
@ COMPLETE
Definition: IpIterativePardisoSolverInterface.hpp:149
Ipopt::IterativePardisoSolverInterface::MNUM_
ipfint MNUM_
Actual matrix for the solution phase.
Definition: IpIterativePardisoSolverInterface.hpp:225
Ipopt::IterativePardisoSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Pardiso to do the analysis phase.
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_dropping_schur_
Number normal_pardiso_iter_dropping_schur_
Definition: IpIterativePardisoSolverInterface.hpp:190
Ipopt::IterativePardisoSolverInterface::pardiso_max_droptol_corrections_
Index pardiso_max_droptol_corrections_
Maximal number of decreases of drop tolerance during one solve.
Definition: IpIterativePardisoSolverInterface.hpp:171
Ipopt::IterativePardisoSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::IterativePardisoSolverInterface::pardiso_iter_dropping_schur_used_
Number pardiso_iter_dropping_schur_used_
Definition: IpIterativePardisoSolverInterface.hpp:201
Ipopt::IterativeSolverTerminationTester
This base class is for the termination tests for the iterative linear solver in the inexact version o...
Definition: IpIterativeSolverTerminationTester.hpp:19
Ipopt::IterativePardisoSolverInterface::nonzeros_
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
Definition: IpIterativePardisoSolverInterface.hpp:132
Ipopt::IpoptCalculatedQuantities::AdditionalCq
IpoptAdditionalCq & AdditionalCq()
Definition: IpIpoptCalculatedQuantities.hpp:574
Ipopt::IterativePardisoSolverInterface::InexCq
InexactCq & InexCq()
Method to easily access Inexact calculated quantities.
Definition: IpIterativePardisoSolverInterface.hpp:277
Ipopt::IterativePardisoSolverInterface
Interface to the linear solver Pardiso, derived from SparseSymLinearSolverInterface.
Definition: IpIterativePardisoSolverInterface.hpp:21
Ipopt::IterativePardisoSolverInterface::pd_tester_
SmartPtr< IterativeSolverTerminationTester > pd_tester_
Termination tester for primal-dual step computation.
Definition: IpIterativePardisoSolverInterface.hpp:288
Ipopt::IterativePardisoSolverInterface::COMPLETE2x2
@ COMPLETE2x2
Definition: IpIterativePardisoSolverInterface.hpp:150
Ipopt::IterativePardisoSolverInterface::skip_inertia_check_
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
Definition: IpIterativePardisoSolverInterface.hpp:169
Ipopt::IterativePardisoSolverInterface::IterativePardisoSolverInterface
IterativePardisoSolverInterface()
Default Constructor.
Ipopt::IterativePardisoSolverInterface::normal_pardiso_iter_dropping_schur_used_
Number normal_pardiso_iter_dropping_schur_used_
Definition: IpIterativePardisoSolverInterface.hpp:203
Ipopt::IterativePardisoSolverInterface::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::IterativePardisoSolverInterface::normal_pardiso_iter_max_row_fill_
Index normal_pardiso_iter_max_row_fill_
Definition: IpIterativePardisoSolverInterface.hpp:191
Ipopt::IterativePardisoSolverInterface::MAXFCT_
ipfint MAXFCT_
Maximal number of factors with identical nonzero structure.
Definition: IpIterativePardisoSolverInterface.hpp:223
IpSparseSymLinearSolverInterface.hpp
Ipopt::IterativePardisoSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpIterativePardisoSolverInterface.hpp:83
Ipopt::IterativePardisoSolverInterface::debug_last_iter_
Index debug_last_iter_
Definition: IpIterativePardisoSolverInterface.hpp:238
Ipopt::IterativePardisoSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::IterativePardisoSolverInterface::normal_tester_
SmartPtr< IterativeSolverTerminationTester > normal_tester_
Termination tester for normal step computation.
Definition: IpIterativePardisoSolverInterface.hpp:285
Ipopt::IterativePardisoSolverInterface::debug_cnt_
Index debug_cnt_
Definition: IpIterativePardisoSolverInterface.hpp:239
Ipopt::IterativePardisoSolverInterface::pardiso_iter_inverse_norm_factor_
Number pardiso_iter_inverse_norm_factor_
Definition: IpIterativePardisoSolverInterface.hpp:183
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:28
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::IterativePardisoSolverInterface::a_
double * a_
Array for storing the values of the matrix.
Definition: IpIterativePardisoSolverInterface.hpp:135
Ipopt::IterativePardisoSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpIterativePardisoSolverInterface.hpp:91
Ipopt::InexactCq
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpInexactCq.hpp:20
Ipopt::IterativePardisoSolverInterface::CONSTRAINT
@ CONSTRAINT
Definition: IpIterativePardisoSolverInterface.hpp:151
Ipopt::IterativePardisoSolverInterface::pardiso_repeated_perturbation_means_singular_
bool pardiso_repeated_perturbation_means_singular_
Flag indicating whether repeated perturbed elements even after a new symbolic factorization should be...
Definition: IpIterativePardisoSolverInterface.hpp:167