Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpWsmpSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2010 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpWsmpSolverInterface.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2005-03-17
8
9
10 #ifndef __IPWSMPSOLVERINTERFACE_HPP__
11 #define __IPWSMPSOLVERINTERFACE_HPP__
12
13 #include "IpSparseSymLinearSolverInterface.hpp"
14
15 //#define PARDISO_MATCHING_PREPROCESS
16
17 namespace Ipopt
18 {
19
24 class WsmpSolverInterface: public SparseSymLinearSolverInterface
25 {
26 public:
30 WsmpSolverInterface();
31
33 virtual ~WsmpSolverInterface();
35
37 bool InitializeImpl(const OptionsList& options,
38 const std::string& prefix);
39
40
44 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
45 const Index *ia,
46 const Index *ja);
47
50 virtual double* GetValuesArrayPtr();
51
53 virtual ESymSolverStatus MultiSolve(bool new_matrix,
54 const Index* ia,
55 const Index* ja,
56 Index nrhs,
57 double* rhs_vals,
58 bool check_NegEVals,
59 Index numberOfNegEVals);
60
64 virtual Index NumberOfNegEVals() const;
66
67 //* @name Options of Linear solver */
69
71 virtual bool IncreaseQuality();
72
76 virtual bool ProvidesInertia() const
77 {
78 return true;
79 }
83 EMatrixFormat MatrixFormat() const
84 {
85 return CSR_Format_1_Offset;
86 }
88
91 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
93
96 virtual bool ProvidesDegeneracyDetection() const;
97
100 virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
101 const Index* ja,
102 std::list<Index>& c_deps);
103
104 private:
114 WsmpSolverInterface(const WsmpSolverInterface&);
115
117 void operator=(const WsmpSolverInterface&);
119
123 Index dim_;
124
126 Index nonzeros_;
127
129 double* a_;
130
131 #ifdef PARDISO_MATCHING_PREPROCESS
132
135 ipfint* ia2;
136 ipfint* ja2;
137 double* a2_;
138 ipfint* perm2;
139 double* scale2;
141
142 #endif
143
145
149 Index wsmp_num_threads_;
151 Number wsmp_pivtol_;
153 Number wsmp_pivtolmax_;
155 Index wsmp_scaling_;
158 Number wsmp_singularity_threshold_;
160 Index wsmp_write_matrix_iteration_;
163 bool skip_inertia_check_;
166 bool wsmp_no_pivoting_;
168
170 Index matrix_file_number_;
171
175 Index negevals_;
177
182 bool initialized_;
185 bool printed_num_threads_;
189 bool pivtol_changed_;
192 bool have_symbolic_factorization_;
195 Index factorizations_since_recomputed_ordering_;
197
201 ipfint* IPARM_;
203 double* DPARM_;
205 ipfint* PERM_;
207 ipfint* INVP_;
209 ipfint* MRP_;
211
216 ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
217
219 ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja,
220 Index numberOfNegEVals);
221
224 ESymSolverStatus Factorization(const Index* ia,
225 const Index* ja,
226 bool check_NegEVals,
227 Index numberOfNegEVals);
228
231 ESymSolverStatus Solve(const Index* ia,
232 const Index* ja,
233 Index nrhs,
234 double *rhs_vals);
236 };
237
238 } // namespace Ipopt
239 #endif
Ipopt::WsmpSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpWsmpSolverInterface.hpp:123
Ipopt::WsmpSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements are to be stored.
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
Ipopt::WsmpSolverInterface::matrix_file_number_
Index matrix_file_number_
Counter for matrix file numbers.
Definition: IpWsmpSolverInterface.hpp:170
Ipopt::WsmpSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal stuctures.
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:26
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:98
Ipopt::WsmpSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpWsmpSolverInterface.hpp:175
IpSparseSymLinearSolverInterface.hpp
Ipopt::WsmpSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpWsmpSolverInterface.hpp:182
Ipopt::WsmpSolverInterface::DetermineDependentRows
virtual ESymSolverStatus DetermineDependentRows(const Index *ia, const Index *ja, std::list< Index > &c_deps)
This method determines the list of row indices of the linearly dependent rows.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::WsmpSolverInterface::wsmp_no_pivoting_
bool wsmp_no_pivoting_
Flag indicating whether the positive definite version of WSMP should be used.
Definition: IpWsmpSolverInterface.hpp:166
Ipopt::WsmpSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpWsmpSolverInterface.hpp:76
Ipopt::WsmpSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::WsmpSolverInterface::InternalSymFact
ESymSolverStatus InternalSymFact(const Index *ia, const Index *ja, Index numberOfNegEVals)
Call Wsmp to really do the analysis phase.
Ipopt::WsmpSolverInterface::WsmpSolverInterface
WsmpSolverInterface()
Constructor.
Ipopt::WsmpSolverInterface::skip_inertia_check_
bool skip_inertia_check_
Flag indicating if the interia is always assumed to be correct.
Definition: IpWsmpSolverInterface.hpp:163
Ipopt::WsmpSolverInterface::factorizations_since_recomputed_ordering_
Index factorizations_since_recomputed_ordering_
Counter indicating how many factorizations have been done sine the last recomputation of the ordering...
Definition: IpWsmpSolverInterface.hpp:195
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:110
Ipopt::WsmpSolverInterface::pivtol_changed_
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Definition: IpWsmpSolverInterface.hpp:189
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::WsmpSolverInterface::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::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::WsmpSolverInterface::~WsmpSolverInterface
virtual ~WsmpSolverInterface()
Destructor.
Ipopt::WsmpSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Wsmp to do the analysis phase.
Ipopt::WsmpSolverInterface::ProvidesDegeneracyDetection
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver...
Ipopt::WsmpSolverInterface::wsmp_num_threads_
Index wsmp_num_threads_
Option that controls the matching strategy.
Definition: IpWsmpSolverInterface.hpp:149
Ipopt::WsmpSolverInterface::wsmp_pivtol_
Number wsmp_pivtol_
Pivol tolerance.
Definition: IpWsmpSolverInterface.hpp:151
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::WsmpSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpWsmpSolverInterface.hpp:83
Ipopt::WsmpSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::WsmpSolverInterface::DPARM_
double * DPARM_
Double precision parameter array for WSSMP.
Definition: IpWsmpSolverInterface.hpp:203
Ipopt::WsmpSolverInterface::printed_num_threads_
bool printed_num_threads_
Flag indicating if we already printed how many threads are used by WSMP.
Definition: IpWsmpSolverInterface.hpp:185
Ipopt::WsmpSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:102
Ipopt::WsmpSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::WsmpSolverInterface::MRP_
ipfint * MRP_
WSSMP&#39;s internal MRP array.
Definition: IpWsmpSolverInterface.hpp:209
Ipopt::WsmpSolverInterface::wsmp_scaling_
Index wsmp_scaling_
Indicating which of WSMP&#39;s scaling methods should be used.
Definition: IpWsmpSolverInterface.hpp:155
Ipopt::WsmpSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Wsmp to factorize the Matrix.
Ipopt::WsmpSolverInterface::wsmp_singularity_threshold_
Number wsmp_singularity_threshold_
WSMP&#39;s singularity threshold.
Definition: IpWsmpSolverInterface.hpp:158
Ipopt::WsmpSolverInterface
Interface to the linear solver Wsmp, derived from SparseSymLinearSolverInterface. ...
Definition: IpWsmpSolverInterface.hpp:24
Ipopt::WsmpSolverInterface::operator=
void operator=(const WsmpSolverInterface &)
Overloaded Equals Operator.
Ipopt::WsmpSolverInterface::have_symbolic_factorization_
bool have_symbolic_factorization_
Flag indicating whether symbolic factorization and order has already been performed.
Definition: IpWsmpSolverInterface.hpp:192
Ipopt::WsmpSolverInterface::IPARM_
ipfint * IPARM_
Integer parameter array for WSSMP.
Definition: IpWsmpSolverInterface.hpp:201
Ipopt::WsmpSolverInterface::nonzeros_
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
Definition: IpWsmpSolverInterface.hpp:126
Ipopt::WsmpSolverInterface::wsmp_write_matrix_iteration_
Index wsmp_write_matrix_iteration_
iteration number in which matrices are to be written out
Definition: IpWsmpSolverInterface.hpp:160
Ipopt::WsmpSolverInterface::Solve
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Wsmpx to do the Solve.
Ipopt::WsmpSolverInterface::INVP_
ipfint * INVP_
WSSMP&#39;s inverse permutation vector.
Definition: IpWsmpSolverInterface.hpp:207
Ipopt::WsmpSolverInterface::PERM_
ipfint * PERM_
WSSMP&#39;s permutation vector.
Definition: IpWsmpSolverInterface.hpp:205
Ipopt::WsmpSolverInterface::wsmp_pivtolmax_
Number wsmp_pivtolmax_
Maximal pivot tolerance.
Definition: IpWsmpSolverInterface.hpp:153
Ipopt::WsmpSolverInterface::a_
double * a_
Array for storing the values of the matrix.
Definition: IpWsmpSolverInterface.hpp:129