/home/coin/SVN-release/Ipopt-3.2.1/Ipopt/src/Algorithm/LinearSolvers/IpPardisoSolverInterface.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, 2006 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: IpPardisoSolverInterface.hpp 759 2006-07-07 03:07:08Z andreasw $
00006 //
00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2005-03-17
00008 
00009 
00010 #ifndef __IPPARDISOSOLVERINTERFACE_HPP__
00011 #define __IPPARDISOSOLVERINTERFACE_HPP__
00012 
00013 #include "IpSparseSymLinearSolverInterface.hpp"
00014 
00015 namespace Ipopt
00016 {
00017 
00022   class PardisoSolverInterface: public SparseSymLinearSolverInterface
00023   {
00024   public:
00028     PardisoSolverInterface();
00029 
00031     virtual ~PardisoSolverInterface();
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     //* @name Options of Linear solver */
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 
00092   private:
00102     PardisoSolverInterface(const PardisoSolverInterface&);
00103 
00105     void operator=(const PardisoSolverInterface&);
00107 
00111     Index dim_;
00112 
00114     Index nonzeros_;
00115 
00117     double* a_;
00119 
00123     Index negevals_;
00125 
00129     enum PardisoMatchingStrategy {
00130       COMPLETE,
00131       COMPLETE2x2,
00132       CONSTRAINT
00133     };
00135     PardisoMatchingStrategy match_strat_;
00138     bool have_symbolic_factorization_;
00141     bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_;
00145     bool pardiso_repeated_perturbation_means_singular_;
00147 
00152     bool initialized_;
00154 
00158     void** PT_;
00161     ipfint MAXFCT_;
00163     ipfint MNUM_;
00165     ipfint MTYPE_;
00167     ipfint* IPARM_;
00169     ipfint MSGLVL_;
00171 
00174     Index debug_last_iter_;
00175     Index debug_cnt_;
00177 
00182     ESymSolverStatus SymbolicFactorization(const Index* ia,
00183                                            const Index* ja);
00184 
00187     ESymSolverStatus Factorization(const Index* ia,
00188                                    const Index* ja,
00189                                    bool check_NegEVals,
00190                                    Index numberOfNegEVals);
00191 
00194     ESymSolverStatus Solve(const Index* ia,
00195                            const Index* ja,
00196                            Index nrhs,
00197                            double *rhs_vals);
00199   };
00200 
00201 } // namespace Ipopt
00202 #endif

Generated on Thu May 15 22:17:57 2008 by  doxygen 1.4.7