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 
97 {
98 public:
101  {
112  };
113 
117  { }
118 
120  { }
122 
123  virtual bool InitializeImpl(
124  const OptionsList& options,
125  const std::string& prefix
126  ) = 0;
127 
138  Index dim,
139  Index nonzeros,
140  const Index* ia,
141  const Index* ja
142  ) = 0;
143 
153  virtual double* GetValuesArrayPtr() = 0;
154 
189  bool new_matrix,
190  const Index* ia,
191  const Index* ja,
192  Index nrhs,
193  double* rhs_vals,
194  bool check_NegEVals,
195  Index numberOfNegEVals
196  ) = 0;
197 
205  virtual Index NumberOfNegEVals() const = 0;
207 
208  //* @name Options of Linear solver */
210 
218  virtual bool IncreaseQuality() = 0;
219 
224  virtual bool ProvidesInertia() const = 0;
225 
229  virtual EMatrixFormat MatrixFormat() const = 0;
231 
238  virtual bool ProvidesDegeneracyDetection() const
239  {
240  return false;
241  }
242 
247  const Index* /*ia*/,
248  const Index* /*ja*/,
249  std::list<Index>& /*c_deps*/
250  )
251  {
252  return SYMSOLVER_FATAL_ERROR;
253  }
254 };
255 
256 } // namespace Ipopt
257 
258 #endif
IpUtils.hpp
Ipopt::SparseSymLinearSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)=0
Method for initializing internal structures.
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:19
Ipopt::SparseSymLinearSolverInterface::DetermineDependentRows
virtual ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
Definition: IpSparseSymLinearSolverInterface.hpp:246
Ipopt::SparseSymLinearSolverInterface::Triplet_Format
@ Triplet_Format
Triplet (MA27) format.
Definition: IpSparseSymLinearSolverInterface.hpp:103
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:100
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:13
Ipopt::SparseSymLinearSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()=0
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
IpSymLinearSolver.hpp
Ipopt::SparseSymLinearSolverInterface::~SparseSymLinearSolverInterface
virtual ~SparseSymLinearSolverInterface()
Definition: IpSparseSymLinearSolverInterface.hpp:119
Ipopt::SparseSymLinearSolverInterface::MatrixFormat
virtual EMatrixFormat MatrixFormat() const =0
Query of requested matrix type that the linear solver understands.
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::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:96
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::SparseSymLinearSolverInterface::SparseSymLinearSolverInterface
SparseSymLinearSolverInterface()
Definition: IpSparseSymLinearSolverInterface.hpp:116
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:34
Ipopt::SparseSymLinearSolverInterface::CSR_Full_Format_1_Offset
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lwr and upr parts, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:111
Ipopt::SparseSymLinearSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const =0
Number of negative eigenvalues detected during last factorization.
Ipopt::SparseSymLinearSolverInterface::CSR_Format_0_Offset
@ CSR_Format_0_Offset
Compressed sparse row format for lower triangular part, with 0 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:105
IpAlgStrategy.hpp
Ipopt::SparseSymLinearSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()=0
Request to increase quality of solution for next solve.
Ipopt::SparseSymLinearSolverInterface::MultiSolve
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.
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::SparseSymLinearSolverInterface::InitializeImpl
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.
Ipopt::SparseSymLinearSolverInterface::CSR_Full_Format_0_Offset
@ CSR_Full_Format_0_Offset
Compressed sparse row format for both lwr and upr parts, with 0 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:109
Ipopt::SparseSymLinearSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const =0
Query whether inertia is computed by linear solver.
Ipopt::SparseSymLinearSolverInterface::ProvidesDegeneracyDetection
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
Definition: IpSparseSymLinearSolverInterface.hpp:238
Ipopt::SYMSOLVER_FATAL_ERROR
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:32