IpMa77SolverInterface.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __IPMA77SOLVERINTERFACE_HPP__
00012 #define __IPMA77SOLVERINTERFACE_HPP__
00013
00014 #include "IpSparseSymLinearSolverInterface.hpp"
00015
00016 extern "C" {
00017 #include "hsl_ma77d.h"
00018 }
00019
00020 namespace Ipopt
00021 {
00022
00102 class Ma77SolverInterface: public SparseSymLinearSolverInterface
00103 {
00104 private:
00105 int ndim_;
00106 double *val_;
00107 int numneg_;
00108 void *keep_;
00109 bool pivtol_changed_;
00110
00111
00112 struct ma77_control control_;
00113 double umax_;
00114
00115 public:
00116
00117 Ma77SolverInterface() :
00118 val_(NULL), keep_(NULL), pivtol_changed_(false)
00119 {}
00120 ~Ma77SolverInterface();
00121
00122 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00123
00124 bool InitializeImpl(const OptionsList& options,
00125 const std::string& prefix);
00126
00135 ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00136 const Index* ia,
00137 const Index* ja);
00138
00145 double* GetValuesArrayPtr() { return val_; }
00146
00179 ESymSolverStatus MultiSolve(bool new_matrix,
00180 const Index* ia,
00181 const Index* ja,
00182 Index nrhs,
00183 double* rhs_vals,
00184 bool check_NegEVals,
00185 Index numberOfNegEVals);
00186
00193 Index NumberOfNegEVals() const { return numneg_; }
00195
00196
00198
00204 bool IncreaseQuality();
00205
00209 bool ProvidesInertia() const { return true; }
00210
00214 EMatrixFormat MatrixFormat() const { return CSR_Full_Format_0_Offset; }
00216
00222 bool ProvidesDegeneracyDetection() const { return false; }
00225 ESymSolverStatus DetermineDependentRows(const Index* ia,
00226 const Index* ja,
00227 std::list<Index>& c_deps)
00228 {
00229 return SYMSOLVER_FATAL_ERROR;
00230 }
00231
00233 static void MetisOrder(const int dim, const Index *ptr, const Index *row, Index *perm);
00234 };
00235
00236 }
00237
00238 #endif