Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpIterativeWsmpSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpIterativeWsmpSolverInterface.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Andreas Waechter IBM 2009-09-18
8 // based on IpWsmpSolverInterface.hpp (rev 1483)
9
10
11 #ifndef __IPITERATIVEWSMPSOLVERINTERFACE_HPP__
12 #define __IPITERATIVEWSMPSOLVERINTERFACE_HPP__
13
14 #include "IpSparseSymLinearSolverInterface.hpp"
15
16 namespace Ipopt
17 {
18
23 class IterativeWsmpSolverInterface: public SparseSymLinearSolverInterface
24 {
25 public:
29 IterativeWsmpSolverInterface();
30
32 virtual ~IterativeWsmpSolverInterface();
34
36 bool InitializeImpl(const OptionsList& options,
37 const std::string& prefix);
38
39
43 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
44 const Index *ia,
45 const Index *ja);
46
49 virtual double* GetValuesArrayPtr();
50
52 virtual ESymSolverStatus MultiSolve(bool new_matrix,
53 const Index* ia,
54 const Index* ja,
55 Index nrhs,
56 double* rhs_vals,
57 bool check_NegEVals,
58 Index numberOfNegEVals);
59
63 virtual Index NumberOfNegEVals() const;
65
66 //* @name Options of Linear solver */
68
70 virtual bool IncreaseQuality();
71
75 virtual bool ProvidesInertia() const
76 {
77 return false;
78 }
82 EMatrixFormat MatrixFormat() const
83 {
84 return CSR_Format_1_Offset;
85 }
87
90 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
92
93 private:
103 IterativeWsmpSolverInterface(const IterativeWsmpSolverInterface&);
104
106 void operator=(const IterativeWsmpSolverInterface&);
108
112 Index dim_;
113
115 double* a_;
117
121 Index wsmp_num_threads_;
123 Number wsmp_pivtol_;
125 Number wsmp_pivtolmax_;
127 Index wsmp_scaling_;
129 Index wsmp_write_matrix_iteration_;
130 Number wsmp_inexact_droptol_;
131 Number wsmp_inexact_fillin_limit_;
133
135 Index matrix_file_number_;
136
139 #if 0
140
141 Index negevals_;
142 #endif
143
144
149 bool initialized_;
152 bool pivtol_changed_;
155 bool have_symbolic_factorization_;
157
161 ipfint* IPARM_;
163 double* DPARM_;
165
170 ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
171
173 ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja);
174
177 ESymSolverStatus Factorization(const Index* ia,
178 const Index* ja,
179 bool check_NegEVals,
180 Index numberOfNegEVals);
181
184 ESymSolverStatus Solve(const Index* ia,
185 const Index* ja,
186 Index nrhs,
187 double *rhs_vals);
189 };
190
191 } // namespace Ipopt
192 #endif
Ipopt::IterativeWsmpSolverInterface::DPARM_
double * DPARM_
Double precision parameter array for WISMP.
Definition: IpIterativeWsmpSolverInterface.hpp:163
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
Ipopt::IterativeWsmpSolverInterface::IPARM_
ipfint * IPARM_
Integer parameter array for WISMP.
Definition: IpIterativeWsmpSolverInterface.hpp:161
Ipopt::IterativeWsmpSolverInterface::MultiSolve
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *ia, const Index *ja, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
Ipopt::IterativeWsmpSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal stuctures.
Ipopt::IterativeWsmpSolverInterface::pivtol_changed_
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Definition: IpIterativeWsmpSolverInterface.hpp:152
ipfint
FORTRAN_INTEGER_TYPE ipfint
Definition: IpTypes.hpp:26
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:98
IpSparseSymLinearSolverInterface.hpp
Ipopt::IterativeWsmpSolverInterface::Factorization
ESymSolverStatus Factorization(const Index *ia, const Index *ja, bool check_NegEVals, Index numberOfNegEVals)
Call Wsmp to factorize the Matrix.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::IterativeWsmpSolverInterface::wsmp_write_matrix_iteration_
Index wsmp_write_matrix_iteration_
iteration number in which matrices are to be written out
Definition: IpIterativeWsmpSolverInterface.hpp:129
Ipopt::IterativeWsmpSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements are to be stored.
Ipopt::IterativeWsmpSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization(const Index *ia, const Index *ja)
Call Wsmp to do the analysis phase.
Ipopt::IterativeWsmpSolverInterface::wsmp_scaling_
Index wsmp_scaling_
Indicating which of WSMP&#39;s scaling methods should be used.
Definition: IpIterativeWsmpSolverInterface.hpp:127
Ipopt::IterativeWsmpSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::SparseSymLinearSolverInterface::CSR_Format_1_Offset
Compressed sparse row format for lower triangular part, with 1 offset.
Definition: IpSparseSymLinearSolverInterface.hpp:110
Ipopt::IterativeWsmpSolverInterface::a_
double * a_
Array for storing the values of the matrix.
Definition: IpIterativeWsmpSolverInterface.hpp:115
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::IterativeWsmpSolverInterface::have_symbolic_factorization_
bool have_symbolic_factorization_
Flag indicating whether symbolic factorization and order has already been performed.
Definition: IpIterativeWsmpSolverInterface.hpp:155
Ipopt::IterativeWsmpSolverInterface
Interface to the linear solver WISMP, derived from SparseSymLinearSolverInterface.
Definition: IpIterativeWsmpSolverInterface.hpp:23
Ipopt::IterativeWsmpSolverInterface::matrix_file_number_
Index matrix_file_number_
Counter for matrix file numbers.
Definition: IpIterativeWsmpSolverInterface.hpp:135
Ipopt::IterativeWsmpSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpIterativeWsmpSolverInterface.hpp:75
Ipopt::IterativeWsmpSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::IterativeWsmpSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::IterativeWsmpSolverInterface::operator=
void operator=(const IterativeWsmpSolverInterface &)
Overloaded Equals Operator.
Ipopt::IterativeWsmpSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::IterativeWsmpSolverInterface::wsmp_inexact_droptol_
Number wsmp_inexact_droptol_
Definition: IpIterativeWsmpSolverInterface.hpp:130
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::IterativeWsmpSolverInterface::InternalSymFact
ESymSolverStatus InternalSymFact(const Index *ia, const Index *ja)
Call Wsmp to really do the analysis phase.
Ipopt::IterativeWsmpSolverInterface::IterativeWsmpSolverInterface
IterativeWsmpSolverInterface()
Constructor.
Ipopt::IterativeWsmpSolverInterface::wsmp_pivtolmax_
Number wsmp_pivtolmax_
Maximal pivot tolerance.
Definition: IpIterativeWsmpSolverInterface.hpp:125
Ipopt::IterativeWsmpSolverInterface::dim_
Index dim_
Number of rows and columns of the matrix.
Definition: IpIterativeWsmpSolverInterface.hpp:112
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:102
Ipopt::IterativeWsmpSolverInterface::Solve
ESymSolverStatus Solve(const Index *ia, const Index *ja, Index nrhs, double *rhs_vals)
Call Wsmpx to do the Solve.
Ipopt::IterativeWsmpSolverInterface::~IterativeWsmpSolverInterface
virtual ~IterativeWsmpSolverInterface()
Destructor.
Ipopt::IterativeWsmpSolverInterface::wsmp_num_threads_
Index wsmp_num_threads_
Option that controls the matching strategy.
Definition: IpIterativeWsmpSolverInterface.hpp:121
Ipopt::IterativeWsmpSolverInterface::wsmp_inexact_fillin_limit_
Number wsmp_inexact_fillin_limit_
Definition: IpIterativeWsmpSolverInterface.hpp:131
Ipopt::IterativeWsmpSolverInterface::wsmp_pivtol_
Number wsmp_pivtol_
Pivol tolerance.
Definition: IpIterativeWsmpSolverInterface.hpp:123
Ipopt::IterativeWsmpSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpIterativeWsmpSolverInterface.hpp:149
Ipopt::IterativeWsmpSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpIterativeWsmpSolverInterface.hpp:82