Ipopt Documentation  
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 // Authors: Carl Laird, Andreas Waechter IBM 2005-03-17
6 
7 #ifndef __IPWSMPSOLVERINTERFACE_HPP__
8 #define __IPWSMPSOLVERINTERFACE_HPP__
9 
11 
12 //#define PARDISO_MATCHING_PREPROCESS
13 
14 namespace Ipopt
15 {
16 
21 {
22 public:
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 
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  virtual bool ProvidesDegeneracyDetection() const;
83 
85  const Index* ia,
86  const Index* ja,
87  std::list<Index>& c_deps
88  );
89 
90 private:
101  const WsmpSolverInterface&
102  );
103 
105  void operator=(
106  const WsmpSolverInterface&
107  );
109 
114 
117 
119  double* a_;
120 
121 #ifdef PARDISO_MATCHING_PREPROCESS
122 
124  ipfint* ia2;
125  ipfint* ja2;
126  double* a2_;
127  ipfint* perm2;
128  double* scale2;
130 #endif
131 
133 
156 
159 
165 
189 
195  double* DPARM_;
203 
208  const Index* ia,
209  const Index* ja
210  );
211 
214  const Index* ia,
215  const Index* ja,
216  Index numberOfNegEVals
217  );
218 
221  const Index* ia,
222  const Index* ja,
223  bool check_NegEVals,
224  Index numberOfNegEVals
225  );
226 
229  const Index* ia,
230  const Index* ja,
231  Index nrhs,
232  double* rhs_vals
233  );
235 };
236 
237 } // namespace Ipopt
238 #endif
Ipopt::WsmpSolverInterface::wsmp_singularity_threshold_
Number wsmp_singularity_threshold_
WSMP's singularity threshold.
Definition: IpWsmpSolverInterface.hpp:148
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:20
Ipopt::WsmpSolverInterface::InternalSymFact
ESymSolverStatus InternalSymFact(const Index *ia, const Index *ja, Index numberOfNegEVals)
Call Wsmp to really do the analysis phase.
Ipopt::WsmpSolverInterface::skip_inertia_check_
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
Definition: IpWsmpSolverInterface.hpp:152
Ipopt::WsmpSolverInterface::have_symbolic_factorization_
bool have_symbolic_factorization_
Flag indicating whether symbolic factorization and order has already been performed.
Definition: IpWsmpSolverInterface.hpp:183
Ipopt::WsmpSolverInterface::PERM_
ipfint * PERM_
WSSMP's permutation vector.
Definition: IpWsmpSolverInterface.hpp:197
Ipopt::WsmpSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:101
Ipopt::WsmpSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Wsmp to do the analysis phase.
Ipopt::WsmpSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpWsmpSolverInterface.hpp:65
Ipopt::WsmpSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
Ipopt::WsmpSolverInterface::Solve
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Wsmp to do the Solve.
Ipopt::WsmpSolverInterface::matrix_file_number_
Index matrix_file_number_
Counter for matrix file numbers.
Definition: IpWsmpSolverInterface.hpp:158
Ipopt::WsmpSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpWsmpSolverInterface.hpp:70
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
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::WsmpSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpWsmpSolverInterface.hpp:163
Ipopt::WsmpSolverInterface::INVP_
ipfint * INVP_
WSSMP's inverse permutation vector.
Definition: IpWsmpSolverInterface.hpp:199
Ipopt::WsmpSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
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:174
Ipopt::WsmpSolverInterface::wsmp_pivtolmax_
Number wsmp_pivtolmax_
Maximal pivot tolerance.
Definition: IpWsmpSolverInterface.hpp:141
Ipopt::WsmpSolverInterface::WsmpSolverInterface
WsmpSolverInterface()
Constructor.
Ipopt::WsmpSolverInterface::a_
double * a_
Array for storing the values of the matrix.
Definition: IpWsmpSolverInterface.hpp:119
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
@ CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:107
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:187
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:97
Ipopt::WsmpSolverInterface::wsmp_no_pivoting_
bool wsmp_no_pivoting_
Flag indicating whether the positive definite version of WSMP should be used.
Definition: IpWsmpSolverInterface.hpp:154
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::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::WsmpSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Wsmp to factorize the Matrix.
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:24
Ipopt::WsmpSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Ipopt::WsmpSolverInterface::DPARM_
double * DPARM_
Double precision parameter array for WSSMP.
Definition: IpWsmpSolverInterface.hpp:195
Ipopt::WsmpSolverInterface::nonzeros_
Index nonzeros_
Number of nonzeros of the matrix in triplet representation.
Definition: IpWsmpSolverInterface.hpp:116
Ipopt::WsmpSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpWsmpSolverInterface.hpp:172
Ipopt::WsmpSolverInterface::wsmp_num_threads_
Index wsmp_num_threads_
Option that controls the matching strategy.
Definition: IpWsmpSolverInterface.hpp:137
Ipopt::WsmpSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
Ipopt::WsmpSolverInterface::wsmp_pivtol_
Number wsmp_pivtol_
Pivot tolerance.
Definition: IpWsmpSolverInterface.hpp:139
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:179
Ipopt::WsmpSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
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::WsmpSolverInterface
WsmpSolverInterface(const WsmpSolverInterface &)
Copy Constructor.
Ipopt::WsmpSolverInterface::~WsmpSolverInterface
virtual ~WsmpSolverInterface()
Destructor.
IpSparseSymLinearSolverInterface.hpp
Ipopt::WsmpSolverInterface::operator=
void operator=(const WsmpSolverInterface &)
Default Assignment Operator.
Ipopt::WsmpSolverInterface::MRP_
ipfint * MRP_
WSSMP's internal MRP array.
Definition: IpWsmpSolverInterface.hpp:201
Ipopt::WsmpSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpWsmpSolverInterface.hpp:113
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::WsmpSolverInterface::wsmp_scaling_
Index wsmp_scaling_
Indicating which of WSMP's scaling methods should be used.
Definition: IpWsmpSolverInterface.hpp:143
Ipopt::WsmpSolverInterface::wsmp_write_matrix_iteration_
Index wsmp_write_matrix_iteration_
iteration number in which matrices are to be written out
Definition: IpWsmpSolverInterface.hpp:150
Ipopt::WsmpSolverInterface
Interface to the linear solver Wsmp, derived from SparseSymLinearSolverInterface.
Definition: IpWsmpSolverInterface.hpp:21
Ipopt::WsmpSolverInterface::IPARM_
ipfint * IPARM_
Integer parameter array for WSSMP.
Definition: IpWsmpSolverInterface.hpp:193