Ipopt Documentation  
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 #ifndef __IPMUMPSSOLVERINTERFACE_HPP__
14 #define __IPMUMPSSOLVERINTERFACE_HPP__
15 
17 
18 namespace Ipopt
19 {
20 
25 {
26 public:
28 
31 
33  virtual ~MumpsSolverInterface();
35 
36  bool InitializeImpl(
37  const OptionsList& options,
38  const std::string& prefix
39  );
40 
44  Index dim,
45  Index nonzeros,
46  const Index* airn,
47  const Index* ajcn
48  );
49 
50  virtual double* GetValuesArrayPtr();
51 
53  bool new_matrix,
54  const Index* airn,
55  const Index* ajcn,
56  Index nrhs,
57  double* rhs_vals,
58  bool check_NegEVals,
59  Index numberOfNegEVals
60  );
61 
62  virtual Index NumberOfNegEVals() const;
64 
65  //* @name Options of Linear solver */
67  virtual bool IncreaseQuality();
68 
69  virtual bool ProvidesInertia() const
70  {
71  return true;
72  }
73 
75  {
76  return Triplet_Format;
77  }
79 
80  static void RegisterOptions(
82  );
83 
84  virtual bool ProvidesDegeneracyDetection() const;
85 
87  const Index* ia,
88  const Index* ja,
89  std::list<Index>& c_deps
90  );
91 
92 private:
100 
103  const MumpsSolverInterface&
104  );
105 
107  void operator=(
108  const MumpsSolverInterface&
109  );
111 
113 
115  void* mumps_ptr_;
117 
119 
123 
125 
143  static int instancecount_mpi;
145 
147 
150 
153 
156 
159 
162 
165 
168 
174 
177 
179 
184 
190  bool check_NegEVals,
191  Index numberOfNegEVals
192  );
193 
196  Index nrhs,
197  double* rhs_vals
198  );
200 };
201 
202 } // namespace Ipopt
203 #endif
ESymSolverStatus Factorization(bool check_NegEVals, Index numberOfNegEVals)
Call MUMPS (job=2) to factorize the Matrix.
ESymSolverStatus
Enum to report outcome of a linear solve.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal structures.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Index mumps_scaling_
Scaling in MUMPS.
ESymSolverStatus Solve(Index nrhs, double *rhs_vals)
Call MUMPS (job=3) to do the solve.
bool initialized_
Flag indicating if internal data is initialized.
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.
virtual ~MumpsSolverInterface()
Destructor.
Index mumps_pivot_order_
Pivot order in MUMPS.
This file contains a base class for all exceptions and a set of macros to help with exceptions...
Index negevals_
Number of negative eigenvalues.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
This class stores a list of user set options.
MumpsSolverInterface()
Constructor.
Index mumps_permuting_scaling_
Permutation and scaling method in MUMPS.
void * mumps_ptr_
Primary MUMP data structure.
Number pivtolmax_
Maximal pivot tolerance.
bool have_symbolic_factorization_
Flag indicating if symbolic factorization has already been called.
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before...
Number mumps_dep_tol_
Threshold in MUMPS to state that a constraint is linearly dependent.
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
virtual bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver...
Index mem_percent_
Percent increase in memory.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
EMatrixFormat
Enum to specify sparse matrix format.
static int instancecount_mpi
Counter on number of alive Mumps interface objects, if we have called MPI_Initialize.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
virtual double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
ESymSolverStatus SymbolicFactorization()
Call MUMPS (job=1) to perform symbolic manipulations, and reserve memory.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
void operator=(const MumpsSolverInterface &)
Default Assignment Operator.
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.
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed...
Interface to the linear solver Mumps, derived from SparseSymLinearSolverInterface.