Ipopt  trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
IpSparseSymLinearSolverInterface.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2004, 2007 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Eclipse Public License.
00004 //
00005 // $Id$
00006 //
00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-03-17
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,
00113       CSR_Full_Format_0_Offset,
00116       CSR_Full_Format_1_Offset
00117     };
00120     SparseSymLinearSolverInterface()
00121     {}
00122 
00123     virtual ~SparseSymLinearSolverInterface()
00124     {}
00126 
00128     virtual bool InitializeImpl(const OptionsList& options,
00129                                 const std::string& prefix) = 0;
00130 
00139     virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00140         const Index* ia,
00141         const Index* ja) = 0;
00142 
00149     virtual double* GetValuesArrayPtr() = 0;
00150 
00183     virtual ESymSolverStatus MultiSolve(bool new_matrix,
00184                                         const Index* ia,
00185                                         const Index* ja,
00186                                         Index nrhs,
00187                                         double* rhs_vals,
00188                                         bool check_NegEVals,
00189                                         Index numberOfNegEVals)=0;
00190 
00197     virtual Index NumberOfNegEVals() const =0;
00199 
00200     //* @name Options of Linear solver */
00202 
00208     virtual bool IncreaseQuality() =0;
00209 
00213     virtual bool ProvidesInertia() const =0;
00214 
00218     virtual EMatrixFormat MatrixFormat() const =0;
00220 
00226     virtual bool ProvidesDegeneracyDetection() const
00227     {
00228       return false;
00229     }
00232     virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
00233         const Index* ja,
00234         std::list<Index>& c_deps)
00235     {
00236       return SYMSOLVER_FATAL_ERROR;
00237     }
00238   };
00239 
00240 } // namespace Ipopt
00241 
00242 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines