/home/coin/SVN-release/CoinAll-1.1.0/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 1119 2007-11-08 17:13:50Z 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     {
00131       COMPLETE,
00132       COMPLETE2x2,
00133       CONSTRAINT
00134     };
00136     PardisoMatchingStrategy match_strat_;
00139     bool have_symbolic_factorization_;
00142     bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_;
00146     bool pardiso_repeated_perturbation_means_singular_;
00149     bool skip_inertia_check_;
00151 
00156     bool initialized_;
00158 
00162     void** PT_;
00165     ipfint MAXFCT_;
00167     ipfint MNUM_;
00169     ipfint MTYPE_;
00171     ipfint* IPARM_;
00173     ipfint MSGLVL_;
00175 
00178     Index debug_last_iter_;
00179     Index debug_cnt_;
00181 
00186     ESymSolverStatus SymbolicFactorization(const Index* ia,
00187                                            const Index* ja);
00188 
00191     ESymSolverStatus Factorization(const Index* ia,
00192                                    const Index* ja,
00193                                    bool check_NegEVals,
00194                                    Index numberOfNegEVals);
00195 
00198     ESymSolverStatus Solve(const Index* ia,
00199                            const Index* ja,
00200                            Index nrhs,
00201                            double *rhs_vals);
00203   };
00204 
00205 } // namespace Ipopt
00206 #endif

Generated on Sun Nov 14 14:06:35 2010 for Coin-All by  doxygen 1.4.7