IpLapackSolverInterface.hpp

Go to the documentation of this file.
00001 
00002 #ifndef __IPLAPACKSOLVERINTERFACE_HPP__
00003 
00004 #define __IPLAPACKSSOLVERINTERFACE_HPP__
00005 
00006 #include "IpSparseSymLinearSolverInterface.hpp"
00007 
00008 namespace Ipopt
00009 {
00010 
00015   class LapackSolverInterface: public SparseSymLinearSolverInterface
00016   {
00017   public:
00021     LapackSolverInterface();
00022 
00024     virtual ~LapackSolverInterface();
00026 
00028     bool InitializeImpl(const OptionsList& options,
00029                         const std::string& prefix);
00030 
00031 
00035     virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, const Index *ja);
00036 
00039     virtual double* GetValuesArrayPtr();
00040 
00042     virtual ESymSolverStatus MultiSolve(bool new_matrix,
00043                                         const Index* ia,
00044                                         const Index* ja,
00045                                         Index nrhs,
00046                                         double* rhs_vals,
00047                                         bool check_NegEVals,
00048                                         Index numberOfNegEVals);
00049 
00053     virtual Index NumberOfNegEVals() const;
00055 
00056     //* @name Options of Linear solver */
00058 
00060     virtual bool IncreaseQuality();
00061 
00065     virtual bool ProvidesInertia() const
00066     {
00067       return true;
00068     }
00072     EMatrixFormat MatrixFormat() const
00073     {
00074       return Dense_Format;
00075     }
00077 
00080     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00082 
00083   private:
00093     LapackSolverInterface(const LapackSolverInterface&);
00094 
00096     void operator=(const LapackSolverInterface&);
00098 
00104     Index n;
00105 
00107     Index nz;
00108 
00110     double* a;
00111 
00113     double* afact;
00114 
00116     int* irn_;
00118     int* jcn_;
00120 
00123     Index negevals_;
00124 
00125     bool isFactored;
00126 
00128 
00131 
00132 
00135 
00136 
00141 
00142 
00149     ESymSolverStatus Factorization(const Index* ia,
00150                                    const Index* ja,
00151                                    bool check_NegEVals,
00152                                    Index numberOfNegEVals);
00153 
00156     ESymSolverStatus Solve(const Index* ia,
00157                            const Index* ja,
00158                            Index nrhs,
00159                            double *rhs_vals);
00161     //MUMPS data structure
00162 //    DMUMPS_STRUC_C mumps_data;
00163 
00164   };
00165 
00166 } // namespace Ipopt
00167 #endif

Generated on Fri Sep 26 07:44:12 2008 for SimTKcore by  doxygen 1.5.6