00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __IPMUMPSSOLVERINTERFACE_HPP__
00015 #define __IPMUMPSSOLVERINTERFACE_HPP__
00016
00017 #include "IpSparseSymLinearSolverInterface.hpp"
00018
00019 namespace Ipopt
00020 {
00021
00026 class MumpsSolverInterface: public SparseSymLinearSolverInterface
00027 {
00028 public:
00032 MumpsSolverInterface();
00033
00035 virtual ~MumpsSolverInterface();
00037
00039 bool InitializeImpl(const OptionsList& options,
00040 const std::string& prefix);
00041
00049 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00050 const Index *airn,
00051 const Index *ajcn);
00052
00058 virtual double* GetValuesArrayPtr();
00059
00063 virtual ESymSolverStatus MultiSolve(bool new_matrix,
00064 const Index* airn,
00065 const Index* ajcn,
00066 Index nrhs,
00067 double* rhs_vals,
00068 bool check_NegEVals,
00069 Index numberOfNegEVals);
00070
00077 virtual Index NumberOfNegEVals() const;
00079
00080
00082
00087 virtual bool IncreaseQuality();
00088
00092 virtual bool ProvidesInertia() const
00093 {
00094 return true;
00095 }
00099 EMatrixFormat MatrixFormat() const
00100 {
00101 return Triplet_Format;
00102 }
00104
00107 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00109
00112 virtual bool ProvidesDegeneracyDetection() const;
00113
00116 virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
00117 const Index* ja,
00118 std::list<Index>& c_deps);
00119
00120 private:
00130 MumpsSolverInterface(const MumpsSolverInterface&);
00131
00133 void operator=(const MumpsSolverInterface&);
00135
00139 void* mumps_ptr_;
00141
00145 Index negevals_;
00147
00152 bool initialized_;
00155 bool pivtol_changed_;
00159 bool refactorize_;
00161
00165 Number pivtol_;
00166
00168 Number pivtolmax_;
00169
00171 Index mem_percent_;
00172
00174 Index mumps_permuting_scaling_;
00175
00177 Index mumps_pivot_order_;
00178
00180 Index mumps_scaling_;
00181
00184 Number mumps_dep_tol_;
00185
00188 bool warm_start_same_structure_;
00190
00193 bool have_symbolic_factorization_;
00194
00200 ESymSolverStatus SymbolicFactorization();
00201
00206 ESymSolverStatus Factorization(bool check_NegEVals,
00207 Index numberOfNegEVals);
00208
00211 ESymSolverStatus Solve(Index nrhs, double *rhs_vals);
00213 };
00214
00215 }
00216 #endif