Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 // $Id: IpIterativePardisoSolverInterface.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Andreas Waechter IBM 2008-09-18
8 // based on IpPardisoSolverInterface.hpp rev 1119
9 
10 
11 #ifndef __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
12 #define __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
13 
15 #include "IpInexactCq.hpp"
17 
18 namespace Ipopt
19 {
20 
26  {
27  public:
33 
37 
39  bool InitializeImpl(const OptionsList& options,
40  const std::string& prefix);
41 
42 
46  virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
47  const Index *ia,
48  const Index *ja);
49 
52  virtual double* GetValuesArrayPtr();
53 
55  virtual ESymSolverStatus MultiSolve(bool new_matrix,
56  const Index* ia,
57  const Index* ja,
58  Index nrhs,
59  double* rhs_vals,
60  bool check_NegEVals,
61  Index numberOfNegEVals);
62 
66  virtual Index NumberOfNegEVals() const;
68 
69  //* @name Options of Linear solver */
71 
73  virtual bool IncreaseQuality();
74 
78  virtual bool ProvidesInertia() const
79  {
80  return true;
81  }
86  {
87  return CSR_Format_1_Offset;
88  }
90 
93  static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
95 
96  private:
107 
110 
114 
119 
122 
124  double* a_;
126 
132 
137  {
141  };
160 
171 
181 
184 
192 
199 
203  void** PT_;
214  double* DPARM_;
218 
224 
230  const Index* ja);
231 
235  const Index* ja,
236  bool check_NegEVals,
237  Index numberOfNegEVals);
238 
241  ESymSolverStatus Solve(const Index* ia,
242  const Index* ja,
243  Index nrhs,
244  double *rhs_vals);
246 
249  {
250  InexactData& inexact_data =
251  static_cast<InexactData&>(IpData().AdditionalData());
252  DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
253  return inexact_data;
254  }
255 
258  {
259  InexactCq& inexact_cq =
260  static_cast<InexactCq&>(IpCq().AdditionalCq());
261  DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
262  return inexact_cq;
263  }
264 
267 
270 
271  };
272 
273 } // namespace Ipopt
274 #endif
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.
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:26
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.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
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 interia is always assumed to be correct.
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:172
This class stores a list of user set options.
PardisoMatchingStrategy match_strat_
Option that controls the matching strategy.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
IterativePardisoSolverInterface()
Default Constructor.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
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:19
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Number pardiso_iter_dropping_factor_used_
Actualy used dropping tolerances.
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements are to be stored.
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:38
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:22
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm...
EMatrixFormat
Enum to specify sparse matrix format.
virtual ~IterativePardisoSolverInterface()
Destructor.
Number decr_factor_
Decrease factor for dropping tolerances.
ipfint MNUM_
Actual matrix for the solution phase.
void operator=(const IterativePardisoSolverInterface &)
Overloaded Equals 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.
IpoptCalculatedQuantities & IpCq() const
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 bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal stuctures.