Ipopt  3.11.9
IpSparseSymLinearSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2007 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpSparseSymLinearSolverInterface.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-03-17
8 
9 #ifndef __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
10 #define __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
11 
12 #include "IpUtils.hpp"
13 #include "IpAlgStrategy.hpp"
14 #include "IpSymLinearSolver.hpp"
15 
16 namespace Ipopt
17 {
18 
99  {
100  public:
117  };
121  {}
122 
124  {}
126 
128  virtual bool InitializeImpl(const OptionsList& options,
129  const std::string& prefix) = 0;
130 
140  const Index* ia,
141  const Index* ja) = 0;
142 
149  virtual double* GetValuesArrayPtr() = 0;
150 
183  virtual ESymSolverStatus MultiSolve(bool new_matrix,
184  const Index* ia,
185  const Index* ja,
186  Index nrhs,
187  double* rhs_vals,
188  bool check_NegEVals,
189  Index numberOfNegEVals)=0;
190 
197  virtual Index NumberOfNegEVals() const =0;
199 
200  //* @name Options of Linear solver */
202 
208  virtual bool IncreaseQuality() =0;
209 
213  virtual bool ProvidesInertia() const =0;
214 
218  virtual EMatrixFormat MatrixFormat() const =0;
220 
226  virtual bool ProvidesDegeneracyDetection() const
227  {
228  return false;
229  }
233  const Index* ja,
234  std::list<Index>& c_deps)
235  {
236  return SYMSOLVER_FATAL_ERROR;
237  }
238  };
239 
240 } // namespace Ipopt
241 
242 #endif
This is the base class for all algorithm strategy objects.
This class stores a list of user set options.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
virtual Index NumberOfNegEVals() const =0
Number of negative eigenvalues detected during last factorization.
virtual bool ProvidesInertia() const =0
Query whether inertia is computed by linear solver.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)=0
Method for initializing internal stuctures.
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
virtual double * GetValuesArrayPtr()=0
Method returing an internal array into which the nonzero elements (in the same order as ja) will be s...
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)=0
overloaded from AlgorithmStrategyObject
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *ia, const Index *ja, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)=0
Solve operation for multiple right hand sides.
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.
EMatrixFormat
Enum to specify sparse matrix format.
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lwr and upr parts, with 1 offset.
@ CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
@ CSR_Format_0_Offset
Compressed sparse row format for lower triangular part, with 0 offset.
@ CSR_Full_Format_0_Offset
Compressed sparse row format for both lwr and upr parts, with 0 offset.
virtual EMatrixFormat MatrixFormat() const =0
Query of requested matrix type that the linear solver understands.
virtual bool IncreaseQuality()=0
Request to increase quality of solution for next solve.
ESymSolverStatus
Enum to report outcome of a linear solve.
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19