Ipopt Documentation  
 
Loading...
Searching...
No Matches
IpMa77SolverInterface.hpp
Go to the documentation of this file.
1// Copyright (C) 2009, Jonathan Hogg <jdh41.at.cantab.net>
2// Copyright (C) 2004, 2007 International Business Machines and others.
3// All Rights Reserved.
4// This code is published under the Eclipse Public License.
5//
6// Authors: Jonathan Hogg STFC 2013-30-05
7// Jonathan Hogg 2009-07-29
8// Carl Laird, Andreas Waechter IBM 2004-03-17
9
10#ifndef __IPMA77SOLVERINTERFACE_HPP__
11#define __IPMA77SOLVERINTERFACE_HPP__
12
14
15extern "C"
16{
17#include "hsl_ma77d.h"
18}
19
20namespace Ipopt
21{
22
24{
25private:
27 {
30 };
31
32 int ndim_;
33 double* val_;
34 int numneg_;
35 void* keep_;
37
38 /* Options */
40 double umax_;
42
43public:
44
46 : val_(NULL),
47 keep_(NULL),
48 pivtol_changed_(false)
49 { }
50
52
53 static void RegisterOptions(
55 );
56
58 const OptionsList& options,
59 const std::string& prefix
60 );
61
65 Index dim,
66 Index nonzeros,
67 const Index* ia,
68 const Index* ja
69 );
70
72 {
73 return val_;
74 }
75
77 bool new_matrix,
78 const Index* ia,
79 const Index* ja,
80 Index nrhs,
81 double* rhs_vals,
82 bool check_NegEVals,
83 Index numberOfNegEVals
84 );
85
87 {
88 return numneg_;
89 }
91
92 //* @name Options of Linear solver */
95
96 bool ProvidesInertia() const
97 {
98 return true;
99 }
100
102 {
104 }
106
111 {
112 return false;
113 }
114
116 const Index* /*ia*/,
117 const Index* /*ja*/,
118 std::list<Index>& /*c_deps*/
119 )
120 {
122 }
123};
124
125} // namespace Ipopt
126
127#endif
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
ESymSolverStatus DetermineDependentRows(const Index *, const Index *, std::list< Index > &)
This method determines the list of row indices of the linearly dependent rows.
bool pivtol_changed_
indicates if pivtol has been changed
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
void * keep_
Stores pointer to factors (only understood by Fortran code!)
double * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
bool ProvidesDegeneracyDetection() const
Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
double * val_
Storage for variables.
ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja)
Method for initializing internal structures.
bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
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.
int numneg_
Number of negative pivots in last factorization.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool IncreaseQuality()
Request to increase quality of solution for next solve.
int ndim_
Number of dimensions.
This class stores a list of user set options.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
EMatrixFormat
Enum to specify sparse matrix format.
@ CSR_Full_Format_1_Offset
Compressed sparse row format for both lwr and upr parts, with 1 offset.
#define ma77_control
Definition: hsl_ma77d.h:12
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ESymSolverStatus
Enum to report outcome of a linear solve.
@ SYMSOLVER_FATAL_ERROR
Unrecoverable error in linear solver occurred.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17