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:
25 
28  IterativeSolverTerminationTester& normal_tester,
30  );
31 
35 
36  bool InitializeImpl(
37  const OptionsList& options,
38  const std::string& prefix
39  );
40 
42 
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:
111 
114 
118  );
119 
121  void operator=(
123  );
125 
127 
130 
133 
135  double* a_;
137 
139 
143 
145 
148  {
152  };
173 
184 
194 
197 
205 
207 
214 
216 
218  void** PT_;
231  double* DPARM_;
235 
241 
243 
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_FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Pardiso to do the Solve.
ESymSolverStatus
Enum to report outcome of a linear solve.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
SmartPtr< IterativeSolverTerminationTester > normal_tester_
Termination tester for normal step computation.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
ipfint MAXFCT_
Maximal number of factors with identical nonzero structure.
Interface to the linear solver Pardiso, derived from SparseSymLinearSolverInterface.
This base class is for the termination tests for the iterative linear solver in the inexact version o...
InexactData & InexData()
Method to easily access Inexact data.
bool initialized_
Flag indicating if internal data is initialized.
IpoptCalculatedQuantities & IpCq() const
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Pardiso to factorize the Matrix.
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.
Compressed sparse row format for lower triangular part, with 1 offset.
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
This file contains a base class for all exceptions and a set of macros to help with exceptions...
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been performed.
Index pardiso_max_iter_
Options for the preconditioner.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
This class stores a list of user set options.
PardisoMatchingStrategy match_strat_
Option that controls the matching strategy.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
IterativePardisoSolverInterface()
Default Constructor.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
SmartPtr< IterativeSolverTerminationTester > pd_tester_
Termination tester for primal-dual step computation.
double * DPARM_
Parameter and info array for Pardiso.
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
double * a_
Array for storing the values of the matrix.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Number pardiso_iter_dropping_factor_used_
Actually used dropping tolerances.
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements are to be stored.
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:27
bool pardiso_repeated_perturbation_means_singular_
Flag indicating whether repeated perturbed elements even after a new symbolic factorization should be...
bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_
Flag indicating whether the symbolic factorization should only be done after perturbed elements...
ipfint * IPARM_
Parameter and info array for Pardiso.
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpInexactCq.hpp:20
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm...
EMatrixFormat
Enum to specify sparse matrix format.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
virtual ~IterativePardisoSolverInterface()
Destructor.
Number decr_factor_
Decrease factor for dropping tolerances.
ipfint MNUM_
Actual matrix for the solution phase.
void operator=(const IterativePardisoSolverInterface &)
Overloaded Assignment Operator.
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Pardiso to do the analysis phase.
Index pardiso_max_droptol_corrections_
Maximal number of decreases of drop tolerance during one solve.
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
Index dim_
Number of rows and columns of the matrix.
InexactCq & InexCq()
Method to easily access Inexact calculated quantities.
ipfint MTYPE_
Matrix type; real and symmetric indefinite.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.