00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
00010 #define __IPSPARSESYMLINEARSOLVERINTERFACE_HPP__
00011
00012 #include "IpUtils.hpp"
00013 #include "IpAlgStrategy.hpp"
00014 #include "IpSymLinearSolver.hpp"
00015
00016 namespace Ipopt
00017 {
00018
00098 class SparseSymLinearSolverInterface: public AlgorithmStrategyObject
00099 {
00100 public:
00102 enum EMatrixFormat {
00104 Triplet_Format,
00107 CSR_Format_0_Offset,
00110 CSR_Format_1_Offset
00111 };
00114 SparseSymLinearSolverInterface()
00115 {}
00116
00117 virtual ~SparseSymLinearSolverInterface()
00118 {}
00120
00122 virtual bool InitializeImpl(const OptionsList& options,
00123 const std::string& prefix) = 0;
00124
00133 virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00134 const Index* ia,
00135 const Index* ja) = 0;
00136
00143 virtual double* GetValuesArrayPtr() = 0;
00144
00177 virtual ESymSolverStatus MultiSolve(bool new_matrix,
00178 const Index* ia,
00179 const Index* ja,
00180 Index nrhs,
00181 double* rhs_vals,
00182 bool check_NegEVals,
00183 Index numberOfNegEVals)=0;
00184
00191 virtual Index NumberOfNegEVals() const =0;
00193
00194
00196
00202 virtual bool IncreaseQuality() =0;
00203
00207 virtual bool ProvidesInertia() const =0;
00208
00212 virtual EMatrixFormat MatrixFormat() const =0;
00214
00220 virtual bool ProvidesDegeneracyDetection() const
00221 {
00222 return false;
00223 }
00226 virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
00227 const Index* ja,
00228 std::list<Index>& c_deps)
00229 {
00230 return SYMSOLVER_FATAL_ERROR;
00231 }
00232 };
00233
00234 }
00235
00236 #endif