Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpMumpsSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2006, 2007 Damien Hocking, KBC Advanced Technologies
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Damien Hocking KBC 2006-03-20
6 // (included his original contribution into Ipopt package on 2006-03-25)
7 // Andreas Waechter IBM 2006-03-25
8 // (minor changes and corrections)
9 // Scott Turnberg CMU 2006-05-12
10 // (major revision)
11 // (incorporated by AW on 2006-11-11 into Ipopt package)
12
13
14 #ifndef __IPMUMPSSOLVERINTERFACE_HPP__
15 #define __IPMUMPSSOLVERINTERFACE_HPP__
16
17 #include "IpSparseSymLinearSolverInterface.hpp"
18
19 namespace Ipopt
20 {
21
26 class MumpsSolverInterface: public SparseSymLinearSolverInterface
27 {
28 public:
32 MumpsSolverInterface();
33
35 virtual ~MumpsSolverInterface();
37
39 bool InitializeImpl(const OptionsList& options,
40 const std::string& prefix);
41
49 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
50 const Index *airn,
51 const Index *ajcn);
52
58 virtual double* GetValuesArrayPtr();
59
63 virtual ESymSolverStatus MultiSolve(bool new_matrix,
64 const Index* airn,
65 const Index* ajcn,
66 Index nrhs,
67 double* rhs_vals,
68 bool check_NegEVals,
69 Index numberOfNegEVals);
70
77 virtual Index NumberOfNegEVals() const;
79
80 //* @name Options of Linear solver */
82
87 virtual bool IncreaseQuality();
88
92 virtual bool ProvidesInertia() const
93 {
94 return true;
95 }
99 EMatrixFormat MatrixFormat() const
100 {
101 return Triplet_Format;
102 }
104
107 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
109
112 virtual bool ProvidesDegeneracyDetection() const;
113
116 virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
117 const Index* ja,
118 std::list<Index>& c_deps);
119
120 private:
130 MumpsSolverInterface(const MumpsSolverInterface&);
131
133 void operator=(const MumpsSolverInterface&);
135
139 void* mumps_ptr_;
141
145 Index negevals_;
147
152 bool initialized_;
155 bool pivtol_changed_;
159 bool refactorize_;
164 static int instancecount_mpi;
166
170 Number pivtol_;
171
173 Number pivtolmax_;
174
176 Index mem_percent_;
177
179 Index mumps_permuting_scaling_;
180
182 Index mumps_pivot_order_;
183
185 Index mumps_scaling_;
186
189 Number mumps_dep_tol_;
190
193 bool warm_start_same_structure_;
195
198 bool have_symbolic_factorization_;
199
205 ESymSolverStatus SymbolicFactorization();
206
211 ESymSolverStatus Factorization(bool check_NegEVals,
212 Index numberOfNegEVals);
213
216 ESymSolverStatus Solve(Index nrhs, double *rhs_vals);
218 };
219
220 } // namespace Ipopt
221 #endif
Ipopt::MumpsSolverInterface::Factorization
ESymSolverStatus Factorization(bool check_NegEVals, Index numberOfNegEVals)
Call MUMPS (job=2) to factorize the Matrix.
Ipopt::ESymSolverStatus
ESymSolverStatus
Enum to report outcome of a linear solve.
Definition: IpSymLinearSolver.hpp:21
Ipopt::MumpsSolverInterface::InitializeStructure
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal stuctures.
Ipopt::SparseSymLinearSolverInterface
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
Definition: IpSparseSymLinearSolverInterface.hpp:98
IpSparseSymLinearSolverInterface.hpp
Ipopt::MumpsSolverInterface::IncreaseQuality
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::MumpsSolverInterface::mumps_scaling_
Index mumps_scaling_
Scaling in MUMPS.
Definition: IpMumpsSolverInterface.hpp:185
Ipopt::MumpsSolverInterface::Solve
ESymSolverStatus Solve(Index nrhs, double *rhs_vals)
Call MUMPS (job=3) to do the solve.
Ipopt::MumpsSolverInterface::initialized_
bool initialized_
Flag indicating if internal data is initialized.
Definition: IpMumpsSolverInterface.hpp:152
Ipopt::MumpsSolverInterface::pivtol_
Number pivtol_
Pivol tolerance.
Definition: IpMumpsSolverInterface.hpp:170
Ipopt::MumpsSolverInterface::DetermineDependentRows
virtual ESymSolverStatus DetermineDependentRows(const Index *ia, const Index *ja, std::list< Index > &c_deps)
This method determines the list of row indices of the linearly dependent rows.
Ipopt::MumpsSolverInterface::ProvidesDegeneracyDetection
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver...
Ipopt::MumpsSolverInterface::~MumpsSolverInterface
virtual ~MumpsSolverInterface()
Destructor.
Ipopt::MumpsSolverInterface::mumps_pivot_order_
Index mumps_pivot_order_
Pivot order in MUMPS.
Definition: IpMumpsSolverInterface.hpp:182
Ipopt::MumpsSolverInterface::negevals_
Index negevals_
Number of negative eigenvalues.
Definition: IpMumpsSolverInterface.hpp:145
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::MumpsSolverInterface::MumpsSolverInterface
MumpsSolverInterface()
Constructor.
Ipopt::MumpsSolverInterface::mumps_permuting_scaling_
Index mumps_permuting_scaling_
Permution and scaling method in MUMPS.
Definition: IpMumpsSolverInterface.hpp:179
Ipopt::MumpsSolverInterface::mumps_ptr_
void * mumps_ptr_
Primary MUMP data structure.
Definition: IpMumpsSolverInterface.hpp:139
Ipopt::MumpsSolverInterface::pivtolmax_
Number pivtolmax_
Maximal pivot tolerance.
Definition: IpMumpsSolverInterface.hpp:173
Ipopt::MumpsSolverInterface::have_symbolic_factorization_
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been called.
Definition: IpMumpsSolverInterface.hpp:198
Ipopt::SparseSymLinearSolverInterface::Triplet_Format
Triplet (MA27) format.
Definition: IpSparseSymLinearSolverInterface.hpp:104
Ipopt::MumpsSolverInterface::warm_start_same_structure_
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
Definition: IpMumpsSolverInterface.hpp:193
Ipopt::MumpsSolverInterface::mumps_dep_tol_
Number mumps_dep_tol_
Threshold in MUMPS to stay that a constraint is linearly dependent.
Definition: IpMumpsSolverInterface.hpp:189
Ipopt::MumpsSolverInterface::MatrixFormat
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Definition: IpMumpsSolverInterface.hpp:99
Ipopt::MumpsSolverInterface::InitializeImpl
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::MumpsSolverInterface::NumberOfNegEVals
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
Ipopt::MumpsSolverInterface::mem_percent_
Index mem_percent_
Percent increase in memory.
Definition: IpMumpsSolverInterface.hpp:176
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::SparseSymLinearSolverInterface::EMatrixFormat
EMatrixFormat
Enum to specify sparse matrix format.
Definition: IpSparseSymLinearSolverInterface.hpp:102
Ipopt::MumpsSolverInterface::instancecount_mpi
static int instancecount_mpi
Counter on number of alive Mumps interface objects, if we have called MPI_Initialize.
Definition: IpMumpsSolverInterface.hpp:164
Ipopt::MumpsSolverInterface::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::MumpsSolverInterface::ProvidesInertia
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Definition: IpMumpsSolverInterface.hpp:92
Ipopt::MumpsSolverInterface::GetValuesArrayPtr
virtual double * GetValuesArrayPtr()
Method returing an internal array into which the nonzero elements (in the same order as airn and ajcn...
Ipopt::MumpsSolverInterface::refactorize_
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
Definition: IpMumpsSolverInterface.hpp:159
Ipopt::MumpsSolverInterface::SymbolicFactorization
ESymSolverStatus SymbolicFactorization()
Call MUMPS (job=1) to perform symbolic manipulations, and reserve memory.
Ipopt::MumpsSolverInterface::operator=
void operator=(const MumpsSolverInterface &)
Overloaded Equals Operator.
Ipopt::MumpsSolverInterface::MultiSolve
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *airn, const Index *ajcn, Index nrhs, double *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
Ipopt::MumpsSolverInterface::pivtol_changed_
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Definition: IpMumpsSolverInterface.hpp:155
Ipopt::MumpsSolverInterface
Interface to the linear solver Mumps, derived from SparseSymLinearSolverInterface.
Definition: IpMumpsSolverInterface.hpp:26