00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __IPWSMPSOLVERINTERFACE_HPP__
00011 #define __IPWSMPSOLVERINTERFACE_HPP__
00012
00013 #include "IpSparseSymLinearSolverInterface.hpp"
00014
00015 namespace Ipopt
00016 {
00017
00022 class WsmpSolverInterface: public SparseSymLinearSolverInterface
00023 {
00024 public:
00028 WsmpSolverInterface();
00029
00031 virtual ~WsmpSolverInterface();
00033
00035 bool InitializeImpl(const OptionsList& options,
00036 const std::string& prefix);
00037
00038
00042 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00043 const Index *ia,
00044 const Index *ja);
00045
00048 virtual double* GetValuesArrayPtr();
00049
00051 virtual ESymSolverStatus MultiSolve(bool new_matrix,
00052 const Index* ia,
00053 const Index* ja,
00054 Index nrhs,
00055 double* rhs_vals,
00056 bool check_NegEVals,
00057 Index numberOfNegEVals);
00058
00062 virtual Index NumberOfNegEVals() const;
00064
00065
00067
00069 virtual bool IncreaseQuality();
00070
00074 virtual bool ProvidesInertia() const
00075 {
00076 return true;
00077 }
00081 EMatrixFormat MatrixFormat() const
00082 {
00083 return CSR_Format_1_Offset;
00084 }
00086
00089 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00091
00094 virtual bool ProvidesDegeneracyDetection() const;
00095
00098 virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
00099 const Index* ja,
00100 std::list<Index>& c_deps);
00101
00102 private:
00112 WsmpSolverInterface(const WsmpSolverInterface&);
00113
00115 void operator=(const WsmpSolverInterface&);
00117
00121 Index dim_;
00122
00124 double* a_;
00126
00130 Index wsmp_num_threads_;
00132 Index wsmp_ordering_option_;
00134 Number wsmp_pivtol_;
00136 Number wsmp_pivtolmax_;
00138 Index wsmp_scaling_;
00141 Number wsmp_singularity_threshold_;
00143 Index wsmp_write_matrix_iteration_;
00145
00147 Index matrix_file_number_;
00148
00152 Index negevals_;
00154
00159 bool initialized_;
00162 bool pivtol_changed_;
00165 bool have_symbolic_factorization_;
00167
00171 ipfint* IPARM_;
00173 double* DPARM_;
00175 ipfint* PERM_;
00177 ipfint* INVP_;
00179 ipfint* MRP_;
00181
00186 ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
00187
00189 ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja);
00190
00193 ESymSolverStatus Factorization(const Index* ia,
00194 const Index* ja,
00195 bool check_NegEVals,
00196 Index numberOfNegEVals);
00197
00200 ESymSolverStatus Solve(const Index* ia,
00201 const Index* ja,
00202 Index nrhs,
00203 double *rhs_vals);
00205 };
00206
00207 }
00208 #endif