Ipopt Documentation  
IpPardisoMKLSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2010 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Carl Laird, Andreas Waechter IBM 2005-03-17
6 
7 #ifndef __IPPARDISOMKLSOLVERINTERFACE_HPP__
8 #define __IPPARDISOMKLSOLVERINTERFACE_HPP__
9 
10 #include "IpoptConfig.h"
12 #include "IpLibraryLoader.hpp"
13 #include "IpTypes.h"
14 
15 namespace Ipopt
16 {
17 
22 {
23 public:
25 
28 
32 
33  bool InitializeImpl(
34  const OptionsList& options,
35  const std::string& prefix
36  );
37 
41  Index dim,
42  Index nonzeros,
43  const Index* ia,
44  const Index* ja
45  );
46 
47  virtual Number* GetValuesArrayPtr();
48 
50  bool new_matrix,
51  const Index* ia,
52  const Index* ja,
53  Index nrhs,
54  Number* rhs_vals,
55  bool check_NegEVals,
56  Index numberOfNegEVals);
57 
58  virtual Index NumberOfNegEVals() const;
60 
61  //* @name Options of Linear solver */
63  virtual bool IncreaseQuality();
64 
65  virtual bool ProvidesInertia() const
66  {
67  return true;
68  }
69 
71  {
72  return CSR_Format_1_Offset;
73  }
75 
77  static void RegisterOptions(
79  );
81 
82 private:
90 
94 
96  void operator=(
99 
101 
104 
107 
111 
113 
117 
119 
122  {
126  };
145 
147 
153 
155 
157  void** PT_;
173 
179 
181 
184  const Index* ia,
185  const Index* ja
186  );
187 
190  const Index* ia,
191  const Index* ja,
192  bool check_NegEVals,
193  Index numberOfNegEVals
194  );
195 
198  const Index* ia,
199  const Index* ja,
200  Index nrhs,
201  Number* rhs_vals
202  );
204 };
205 
206 } // namespace Ipopt
207 
208 #endif /* __IPPARDISOMKLSOLVERINTERFACE_HPP__ */
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *ia, const Index *ja, Index nrhs, Number *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
ESymSolverStatus
Enum to report outcome of a linear solve.
PardisoMKLSolverInterface()
Constructor.
Number * DPARM_
Parameter and info array for Pardiso.
virtual ~PardisoMKLSolverInterface()
Destructor.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_
Flag indicating whether the symbolic factorization should only be done after perturbed elements...
Interface to the linear solver Pardiso as distributed by Intel MKL, derived from SparseSymLinearSolve...
Number * a_
Array for storing the values of the matrix.
void operator=(const PardisoMKLSolverInterface &)
Default Assignment Operator.
Index negevals_
Number of negative eigenvalues.
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
Compressed sparse row format for lower triangular part, with 1 offset.
This file contains a base class for all exceptions and a set of macros to help with exceptions...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:164
Index dim_
Number of rows and columns of the matrix.
This class stores a list of user set options.
bool initialized_
Flag indicating if internal data is initialized.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Index MNUM_
Actual matrix for the solution phase.
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been performed.
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, Number *rhs_vals)
Call Pardiso to do the Solve.
virtual Number * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Index * IPARM_
Parameter and info array for Pardiso.
PardisoMatchingStrategy match_strat_
Option that controls the matching strategy.
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Pardiso to do the analysis phase.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
EMatrixFormat
Enum to specify sparse matrix format.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Index MAXFCT_
Maximal number of factors with identical nonzero structure.
bool pardiso_repeated_perturbation_means_singular_
Flag indicating whether repeated perturbed elements even after a new symbolic factorization should be...
PardisoMatchingStrategy
Type for matching strategies.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
void ** PT_
Internal data address pointers.
Index MTYPE_
Matrix type; real and symmetric indefinite.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Pardiso to factorize the Matrix.