Ipopt Documentation  
IpIterativeWsmpSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Andreas Waechter IBM 2009-09-18
6 // based on IpWsmpSolverInterface.hpp (rev 1483)
7 
8 #ifndef __IPITERATIVEWSMPSOLVERINTERFACE_HPP__
9 #define __IPITERATIVEWSMPSOLVERINTERFACE_HPP__
10 
12 #include "IpTypes.h"
13 
14 namespace Ipopt
15 {
16 
21 {
22 public:
24 
27 
31 
32  bool InitializeImpl(
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 false;
68  }
69 
71  {
72  return CSR_Format_1_Offset;
73  }
75 
76  static void RegisterOptions(
78  );
79 
80 private:
89 
93  );
94 
96  void operator=(
98  );
100 
102 
105 
107  double* a_;
109 
111 
125 
128 
130 #if 0
132 
133  Index negevals_;
134 #endif
135 
138 
152 
154 
158  double* DPARM_;
160 
162 
166  const Index* ia,
167  const Index* ja
168  );
169 
172  const Index* ia,
173  const Index* ja
174  );
175 
178  const Index* ia,
179  const Index* ja,
180  bool check_NegEVals,
181  Index numberOfNegEVals
182  );
183 
186  const Index* ia,
187  const Index* ja,
188  Index nrhs,
189  double* rhs_vals
190  );
192 };
193 
194 } // namespace Ipopt
195 #endif
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
double * DPARM_
Double precision parameter array for WISMP.
ESymSolverStatus
Enum to report outcome of a linear 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.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Wsmp to factorize the Matrix.
ipindex * IPARM_
Integer parameter array for WISMP.
Index wsmp_write_matrix_iteration_
iteration number in which matrices are to be written out
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Wsmp to do the analysis phase.
Index wsmp_scaling_
Indicating which of WSMP's scaling methods should be used.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Compressed sparse row format for lower triangular part, with 1 offset.
double * a_
Array for storing the values of the matrix.
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
This class stores a list of user set options.
bool have_symbolic_factorization_
Flag indicating whether symbolic factorization and order has already been performed.
Interface to the linear solver WISMP, derived from SparseSymLinearSolverInterface.
Index matrix_file_number_
Counter for matrix file numbers.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
void operator=(const IterativeWsmpSolverInterface &)
Default Assignment Operator.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17
ESymSolverStatus InternalSymFact(const Index *ia, const Index *ja)
Call Wsmp to really do the analysis phase.
Index dim_
Number of rows and columns of the matrix.
EMatrixFormat
Enum to specify sparse matrix format.
int ipindex
Type of all indices of vectors, matrices etc.
Definition: IpTypes.h:68
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Wsmpx to do the Solve.
virtual ~IterativeWsmpSolverInterface()
Destructor.
Index wsmp_num_threads_
Option that controls the matching strategy.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
bool initialized_
Flag indicating if internal data is initialized.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.