Ipopt Documentation  
 
Loading...
Searching...
No Matches
IpPardisoSolverInterface.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 __IPPARDISOSOLVERINTERFACE_HPP__
8#define __IPPARDISOSOLVERINTERFACE_HPP__
9
11
12//#define PARDISO_MATCHING_PREPROCESS
13
14namespace Ipopt
15{
16
21{
22public:
25
27
31
33 const OptionsList& options,
34 const std::string& prefix
35 );
36
40 Index dim,
41 Index nonzeros,
42 const Index* ia,
43 const Index* ja
44 );
45
46 virtual double* GetValuesArrayPtr();
47
49 bool new_matrix,
50 const Index* ia,
51 const Index* ja,
52 Index nrhs,
53 double* rhs_vals,
54 bool check_NegEVals,
55 Index numberOfNegEVals);
56
57 virtual Index NumberOfNegEVals() const;
59
60 //* @name Options of Linear solver */
62 virtual bool IncreaseQuality();
63
64 virtual bool ProvidesInertia() const
65 {
66 return true;
67 }
68
70 {
72 }
74
76 static void RegisterOptions(
78 );
80
81private:
90
93
98
101
103
106
108 double* a_;
110
111#ifdef PARDISO_MATCHING_PREPROCESS
113 ipfint* ia2;
114 ipfint* ja2;
115 double* a2_;
116 ipfint* perm2;
117 double* scale2;
118#endif
119
122
125
128
130 {
134 };
157
160
165
168
169 void** PT_;
181 double* DPARM_;
185
191
194
196 const Index* ia,
197 const Index* ja
198 );
199
202 const Index* ia,
203 const Index* ja,
204 bool check_NegEVals,
205 Index numberOfNegEVals
206 );
207
210 const Index* ia,
211 const Index* ja,
212 Index nrhs,
213 double* rhs_vals
214 );
216};
217
218} // namespace Ipopt
219#endif
IPOPT_FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
This class stores a list of user set options.
Interface to the linear solver Pardiso, derived from SparseSymLinearSolverInterface.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
PardisoSolverInterface(const PardisoSolverInterface &)
Copy Constructor.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been performed.
double * DPARM_
Parameter and info array for Pardiso.
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
PardisoMatchingStrategy match_strat_
Option that controls the matching strategy.
Index pardiso_max_droptol_corrections_
Maximal number of decreases of drop tolerance during one solve.
ipfint MAXFCT_
Maximal number of factors with identical nonzero structure.
bool pardiso_iterative_
Flag indicating whether we are using the iterative solver in Pardiso.
PardisoSolverInterface()
Constructor.
Index negevals_
Number of negative eigenvalues.
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
ipfint MNUM_
Actual matrix for the solution phase.
bool pardiso_repeated_perturbation_means_singular_
Flag indicating whether repeated perturbed elements even after a new symbolic factorization should be...
ipfint * IPARM_
Parameter and info array for Pardiso.
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Pardiso to factorize the Matrix.
void operator=(const PardisoSolverInterface &)
Default Assignment Operator.
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Pardiso to do the analysis phase.
ipfint MTYPE_
Matrix type; real and symmetric indefinite.
bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_
Flag indicating whether the symbolic factorization should only be done after perturbed elements,...
Index dim_
Number of rows and columns of the matrix.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
double * a_
Array for storing the values of the matrix.
bool initialized_
Flag indicating if internal data is initialized.
virtual ~PardisoSolverInterface()
Destructor.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
PardisoMatchingStrategy
Type for matching strategies.
void ** PT_
Internal data address pointers.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Pardiso to do the Solve.
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.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
EMatrixFormat
Enum to specify sparse matrix format.
@ CSR_Format_1_Offset
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.
ESymSolverStatus
Enum to report outcome of a linear solve.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17