00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __IPMA27TSOLVERINTERFACE_HPP__
00010 #define __IPMA27TSOLVERINTERFACE_HPP__
00011
00012 #include "IpSparseSymLinearSolverInterface.hpp"
00013
00014 namespace Ipopt
00015 {
00019 class Ma27TSolverInterface: public SparseSymLinearSolverInterface
00020 {
00021 public:
00025 Ma27TSolverInterface();
00026
00028 virtual ~Ma27TSolverInterface();
00030
00032 bool InitializeImpl(const OptionsList& options,
00033 const std::string& prefix);
00034
00035
00043 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00044 const Index *airn,
00045 const Index *ajcn);
00046
00052 virtual double* GetValuesArrayPtr();
00053
00057 virtual ESymSolverStatus MultiSolve(bool new_matrix,
00058 const Index* airn,
00059 const Index* ajcn,
00060 Index nrhs,
00061 double* rhs_vals,
00062 bool check_NegEVals,
00063 Index numberOfNegEVals);
00064
00071 virtual Index NumberOfNegEVals() const;
00073
00074
00076
00081 virtual bool IncreaseQuality();
00082
00086 virtual bool ProvidesInertia() const
00087 {
00088 return true;
00089 }
00093 EMatrixFormat MatrixFormat() const
00094 {
00095 return Triplet_Format;
00096 }
00098
00101 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00103
00104 private:
00114 Ma27TSolverInterface(const Ma27TSolverInterface&);
00115
00117 void operator=(const Ma27TSolverInterface&);
00119
00123 Index dim_;
00124
00126 Index nonzeros_;
00128
00132 Index negevals_;
00134
00139 bool initialized_;
00142 bool pivtol_changed_;
00146 bool refactorize_;
00148
00152 Number pivtol_;
00153
00155 Number pivtolmax_;
00156
00158 Number liw_init_factor_;
00160 Number la_init_factor_;
00162 Number meminc_factor_;
00165 bool warm_start_same_structure_;
00167
00173 ipfint icntl_[30];
00175 double cntl_[5];
00176
00178 ipfint liw_;
00180 ipfint* iw_;
00181
00183 ipfint* ikeep_;
00185 ipfint nsteps_;
00187 ipfint maxfrt_;
00188
00190 ipfint la_;
00192 double* a_;
00193
00196 bool la_increase_;
00199 bool liw_increase_;
00201
00208 ESymSolverStatus SymbolicFactorization(const Index* airn,
00209 const Index* ajcn);
00210
00215 ESymSolverStatus Factorization(const Index* airn,
00216 const Index* ajcn,
00217 bool check_NegEVals,
00218 Index numberOfNegEVals);
00219
00222 ESymSolverStatus Backsolve(Index nrhs,
00223 double *rhs_vals);
00225 };
00226
00227 }
00228 #endif