Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 // $Id: IpSymLinearSolver.hpp 2322 2013-06-12 17:45:57Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9 #ifndef __IPSYMLINEARSOLVER_HPP__
10 #define __IPSYMLINEARSOLVER_HPP__
11
12 #include "IpUtils.hpp"
13 #include "IpSymMatrix.hpp"
14 #include "IpAlgStrategy.hpp"
15 #include <vector>
16
17 namespace Ipopt
18 {
19
21 enum ESymSolverStatus {
23 SYMSOLVER_SUCCESS,
25 SYMSOLVER_SINGULAR,
27 SYMSOLVER_WRONG_INERTIA,
30 SYMSOLVER_CALL_AGAIN,
33 SYMSOLVER_FATAL_ERROR
34 };
35
50 class SymLinearSolver: public AlgorithmStrategyObject
51 {
52 public:
55 SymLinearSolver()
56 {}
57
58 virtual ~SymLinearSolver()
59 {}
61
63 virtual bool InitializeImpl(const OptionsList& options,
64 const std::string& prefix) = 0;
65
80 virtual ESymSolverStatus MultiSolve(const SymMatrix &A,
81 std::vector<SmartPtr<const Vector> >& rhsV,
82 std::vector<SmartPtr<Vector> >& solV,
83 bool check_NegEVals,
84 Index numberOfNegEVals)=0;
85
89 ESymSolverStatus Solve(const SymMatrix &A,
90 const Vector& rhs, Vector& sol,
91 bool check_NegEVals,
92 Index numberOfNegEVals)
93 {
94 std::vector<SmartPtr<const Vector> > rhsV(1);
95 rhsV[0] = &rhs;
96 std::vector<SmartPtr<Vector> > solV(1);
97 solV[0] = &sol;
98 return MultiSolve(A, rhsV, solV, check_NegEVals,
99 numberOfNegEVals);
100 }
101
108 virtual Index NumberOfNegEVals() const =0;
110
111 //* @name Options of Linear solver */
113
118 virtual bool IncreaseQuality() =0;
119
123 virtual bool ProvidesInertia() const =0;
125 };
126
127
128 } // namespace Ipopt
129
130 #endif
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
IpUtils.hpp
Ipopt::SymLinearSolver::IncreaseQuality
virtual bool IncreaseQuality()=0
Request to increase quality of solution for next solve.
IpAlgStrategy.hpp
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
IpSymMatrix.hpp
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:47
Ipopt::SymLinearSolver::SymLinearSolver
SymLinearSolver()
Definition: IpSymLinearSolver.hpp:55
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:89
Ipopt::SymMatrix
This is the base class for all derived symmetric matrix types.
Definition: IpSymMatrix.hpp:23
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::SYMSOLVER_WRONG_INERTIA
The number of negative eigenvalues is not correct.
Definition: IpSymLinearSolver.hpp:27
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::SYMSOLVER_SINGULAR
Matrix seems to be singular; solve was aborted.
Definition: IpSymLinearSolver.hpp:25
Ipopt::SymLinearSolver::~SymLinearSolver
virtual ~SymLinearSolver()
Definition: IpSymLinearSolver.hpp:58
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::SymLinearSolver::ProvidesInertia
virtual bool ProvidesInertia() const =0
Query whether inertia is computed by linear solver.
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::SymLinearSolver::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)=0
overloaded from AlgorithmStrategyObject
Ipopt::SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
Definition: IpSymLinearSolver.hpp:33
Ipopt::SymLinearSolver
Base class for all derived symmetric linear solvers.
Definition: IpSymLinearSolver.hpp:50
Ipopt::SYMSOLVER_SUCCESS
Successful solve.
Definition: IpSymLinearSolver.hpp:23
Ipopt::SymLinearSolver::NumberOfNegEVals
virtual Index NumberOfNegEVals() const =0
Number of negative eigenvalues detected during last factorization.
Ipopt::SYMSOLVER_CALL_AGAIN
Call the solver interface again after the matrix values have been restored.
Definition: IpSymLinearSolver.hpp:30