Ipopt Documentation  
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 // Authors: Carl Laird, Andreas Waechter IBM 2004-03-17
6 
7 #ifndef __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
8 #define __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
9 
10 #include "IpUtils.hpp"
11 #include "IpAlgStrategy.hpp"
12 #include "IpSymLinearSolver.hpp"
13 
14 namespace Ipopt
15 {
16 
99 {
100 public:
103  {
114  };
115 
119  { }
120 
122  { }
124 
125  virtual bool InitializeImpl(
126  const OptionsList& options,
127  const std::string& prefix
128  ) = 0;
129 
132 
140  Index dim,
141  Index nonzeros,
142  const Index* ia,
143  const Index* ja
144  ) = 0;
145 
155  virtual Number* GetValuesArrayPtr() = 0;
156 
191  bool new_matrix,
192  const Index* ia,
193  const Index* ja,
194  Index nrhs,
195  Number* rhs_vals,
196  bool check_NegEVals,
197  Index numberOfNegEVals
198  ) = 0;
199 
207  virtual Index NumberOfNegEVals() const = 0;
209 
210  //* @name Options of Linear solver */
212 
220  virtual bool IncreaseQuality() = 0;
221 
226  virtual bool ProvidesInertia() const = 0;
227 
231  virtual EMatrixFormat MatrixFormat() const = 0;
233 
237 
240  virtual bool ProvidesDegeneracyDetection() const
241  {
242  return false;
243  }
244 
249  const Index* /*ia*/,
250  const Index* /*ja*/,
251  std::list<Index>& /*c_deps*/
252  )
253  {
254  return SYMSOLVER_FATAL_ERROR;
255  }
256 };
257 
258 } // namespace Ipopt
259 
260 #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 Number * GetValuesArrayPtr()=0
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
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 structures.
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)=0
Implementation of the initialization method that has to be overloaded by for each derived class.
EMatrixFormat
Enum to specify sparse matrix format.
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lower and upper parts, with 1 offset.
@ CSR_Format_1_Offset
Compressed sparse row format for upper triangular part, with 1 offset.
@ CSR_Format_0_Offset
Compressed sparse row format for upper triangular part, with 0 offset.
@ Triplet_Format
Triplet (MA27) format for lower triangular part.
@ CSR_Full_Format_0_Offset
Compressed sparse row format for both lower and upper parts, with 0 offset.
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *ia, const Index *ja, Index nrhs, Number *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)=0
Solve operation for multiple right hand sides.
virtual ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
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.
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.
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17