Ipopt Documentation  
IpSymLinearSolver.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2006 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-08-13
6 
7 #ifndef __IPSYMLINEARSOLVER_HPP__
8 #define __IPSYMLINEARSOLVER_HPP__
9 
10 #include "IpUtils.hpp"
11 #include "IpSymMatrix.hpp"
12 #include "IpAlgStrategy.hpp"
13 #include <vector>
14 
15 namespace Ipopt
16 {
17 
20 {
33 };
34 
51 {
52 public:
56  { }
57 
58  virtual ~SymLinearSolver()
59  { }
61 
62  virtual bool InitializeImpl(
63  const OptionsList& options,
64  const std::string& prefix
65  ) = 0;
66 
68 
83  const SymMatrix& A,
84  std::vector<SmartPtr<const Vector> >& rhsV,
85  std::vector<SmartPtr<Vector> >& solV,
86  bool check_NegEVals,
87  Index numberOfNegEVals
88  ) = 0;
89 
96  const SymMatrix& A,
97  const Vector& rhs,
98  Vector& sol,
99  bool check_NegEVals,
100  Index numberOfNegEVals
101  )
102  {
103  std::vector<SmartPtr<const Vector> > rhsV(1);
104  rhsV[0] = &rhs;
105  std::vector<SmartPtr<Vector> > solV(1);
106  solV[0] = &sol;
107  return MultiSolve(A, rhsV, solV, check_NegEVals, numberOfNegEVals);
108  }
109 
117  virtual Index NumberOfNegEVals() const = 0;
119 
120  //* @name Options of Linear solver */
122 
129  virtual bool IncreaseQuality() = 0;
130 
135  virtual bool ProvidesInertia() const = 0;
137 };
138 
139 } // namespace Ipopt
140 
141 #endif
IpUtils.hpp
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:20
Ipopt::SymLinearSolver::MultiSolve
virtual ESymSolverStatus MultiSolve(const SymMatrix &A, std::vector< SmartPtr< const Vector > > &rhsV, std::vector< SmartPtr< Vector > > &solV, bool check_NegEVals, Index numberOfNegEVals)=0
Solve operation for multiple right hand sides.
Ipopt::SYMSOLVER_SINGULAR
@ SYMSOLVER_SINGULAR
Matrix seems to be singular; solve was aborted.
Definition: IpSymLinearSolver.hpp:24
Ipopt::SymLinearSolver::IncreaseQuality
virtual bool IncreaseQuality()=0
Request to increase quality of solution for next solve.
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::SymLinearSolver::~SymLinearSolver
virtual ~SymLinearSolver()
Definition: IpSymLinearSolver.hpp:58
IPOPTLIB_EXPORT
#define IPOPTLIB_EXPORT
Definition: config_default.h:10
Ipopt::SymLinearSolver::Solve
ESymSolverStatus Solve(const SymMatrix &A, const Vector &rhs, Vector &sol, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for a single right hand side.
Definition: IpSymLinearSolver.hpp:95
Ipopt::SymLinearSolver::NumberOfNegEVals
virtual Index NumberOfNegEVals() const =0
Number of negative eigenvalues detected during last factorization.
Ipopt::SymLinearSolver
Base class for all derived symmetric linear solvers.
Definition: IpSymLinearSolver.hpp:51
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:165
Ipopt::SymLinearSolver::ProvidesInertia
virtual bool ProvidesInertia() const =0
Query whether inertia is computed by linear solver.
Ipopt::SymLinearSolver::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::Index
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
Ipopt::SYMSOLVER_SUCCESS
@ SYMSOLVER_SUCCESS
Successful solve.
Definition: IpSymLinearSolver.hpp:22
IpSymMatrix.hpp
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::SymMatrix
This is the base class for all derived symmetric matrix types.
Definition: IpSymMatrix.hpp:21
Ipopt::SYMSOLVER_WRONG_INERTIA
@ SYMSOLVER_WRONG_INERTIA
The number of negative eigenvalues is not correct.
Definition: IpSymLinearSolver.hpp:26
IpAlgStrategy.hpp
Ipopt::SYMSOLVER_CALL_AGAIN
@ SYMSOLVER_CALL_AGAIN
Call the solver interface again after the matrix values have been restored.
Definition: IpSymLinearSolver.hpp:28
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:48
Ipopt::SYMSOLVER_FATAL_ERROR
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:32