00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __IPMA57TSOLVERINTERFACE_HPP__
00011 #define __IPMA57TSOLVERINTERFACE_HPP__
00012
00013 #include "IpSparseSymLinearSolverInterface.hpp"
00014
00015 #ifdef FUNNY_MA57_FINT
00016 #include <cstddef>
00017 typedef ptrdiff_t ma57int;
00018 #else
00019 typedef ipfint ma57int;
00020 #endif
00021
00022 namespace Ipopt
00023 {
00027 class Ma57TSolverInterface: public SparseSymLinearSolverInterface
00028 {
00029 public:
00033 Ma57TSolverInterface();
00034
00036 virtual ~Ma57TSolverInterface();
00038
00040 bool InitializeImpl(const OptionsList& options,
00041 const std::string& prefix);
00042
00043
00051 virtual ESymSolverStatus InitializeStructure(
00052 Index dim,
00053 Index nonzeros,
00054 const Index *airn,
00055 const Index *ajcn);
00056
00062 virtual double* GetValuesArrayPtr();
00063
00067 virtual ESymSolverStatus MultiSolve(bool new_matrix,
00068 const Index* airn,
00069 const Index* ajcn,
00070 Index nrhs,
00071 double* rhs_vals,
00072 bool check_NegEVals,
00073 Index numberOfNegEVals);
00074
00081 virtual Index NumberOfNegEVals() const;
00083
00084
00086
00091 virtual bool IncreaseQuality();
00092
00096 virtual bool ProvidesInertia() const
00097 {
00098 return true;
00099 }
00103 EMatrixFormat MatrixFormat() const
00104 {
00105 return Triplet_Format;
00106 }
00108
00111 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00113
00114 private:
00124 Ma57TSolverInterface(const Ma57TSolverInterface&);
00125
00127 void operator=(const Ma57TSolverInterface&);
00129
00133 Index dim_;
00134
00136 Index nonzeros_;
00138
00142 Index negevals_;
00144
00149 bool initialized_;
00152 bool pivtol_changed_;
00156 bool refactorize_;
00158
00162 Number pivtol_;
00164 Number pivtolmax_;
00166 Number ma57_pre_alloc_;
00169 bool warm_start_same_structure_;
00171
00176 double wd_cntl_[5];
00177 ma57int wd_icntl_[20];
00178
00179 ma57int wd_info_[40];
00180 double wd_rinfo_[20];
00181
00182 ma57int wd_lkeep_;
00183 ma57int *wd_keep_;
00184
00185 ma57int *wd_iwork_;
00186
00187 double *wd_fact_;
00188 ma57int wd_lfact_;
00189 ma57int *wd_ifact_;
00190 ma57int wd_lifact_;
00191
00192
00194 double* a_;
00196
00203 ESymSolverStatus SymbolicFactorization(const Index* airn,
00204 const Index* ajcn);
00205
00210 ESymSolverStatus Factorization(const Index* airn,
00211 const Index* ajcn,
00212 bool check_NegEVals,
00213 Index numberOfNegEVals);
00214
00217 ESymSolverStatus Backsolve(Index nrhs,
00218 double *rhs_vals);
00220 };
00221
00222 }
00223 #endif