- Main Page
- Classes
- Files

- File List
- File Members

# src/Algorithm/Inexact/IpIterativePardisoSolverInterface.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2008 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpIterativePardisoSolverInterface.hpp 2442 2013-11-26 11:32:00Z stefan $
    00006 //
    00007 // Authors:  Andreas Waechter            IBM    2008-09-18
    00008 //            based on IpPardisoSolverInterface.hpp rev 1119
    00009
    00010
    00011 #ifndef __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
    00012 #define __IPITERATIVEPARDISOSOLVERINTERFACE_HPP__
    00013
    00014 #include "IpSparseSymLinearSolverInterface.hpp"
    00015 #include "IpInexactCq.hpp"
    00016 #include "IpIterativeSolverTerminationTester.hpp"
    00017
    00018 namespace Ipopt
    00019 {
    00020
    00025   class IterativePardisoSolverInterface: public SparseSymLinearSolverInterface
    00026   {
    00027   public:
    00031     IterativePardisoSolverInterface(IterativeSolverTerminationTester& normal_tester,
    00032                                     IterativeSolverTerminationTester& pd_tester);
    00033
    00035     virtual ~IterativePardisoSolverInterface();
    00037
    00039     bool InitializeImpl(const OptionsList& options,
    00040                         const std::string& prefix);
    00041
    00042
    00046     virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
    00047         const Index *ia,
    00048         const Index *ja);
    00049
    00052     virtual double* GetValuesArrayPtr();
    00053
    00055     virtual ESymSolverStatus MultiSolve(bool new_matrix,
    00056                                         const Index* ia,
    00057                                         const Index* ja,
    00058                                         Index nrhs,
    00059                                         double* rhs_vals,
    00060                                         bool check_NegEVals,
    00061                                         Index numberOfNegEVals);
    00062
    00066     virtual Index NumberOfNegEVals() const;
    00068
    00069     //* @name Options of Linear solver */
    00071
    00073     virtual bool IncreaseQuality();
    00074
    00078     virtual bool ProvidesInertia() const
    00079     {
    00080       return true;
    00081     }
    00085     EMatrixFormat MatrixFormat() const
    00086     {
    00087       return CSR_Format_1_Offset;
    00088     }
    00090
    00093     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00095
    00096   private:
    00106     IterativePardisoSolverInterface();
    00107
    00109     IterativePardisoSolverInterface(const IterativePardisoSolverInterface&);
    00110
    00112     void operator=(const IterativePardisoSolverInterface&);
    00114
    00118     Index dim_;
    00119
    00121     Index nonzeros_;
    00122
    00124     double* a_;
    00126
    00130     Index negevals_;
    00132
    00136     enum PardisoMatchingStrategy
    00137     {
    00138       COMPLETE,
    00139       COMPLETE2x2,
    00140       CONSTRAINT
    00141     };
    00143     PardisoMatchingStrategy match_strat_;
    00146     bool have_symbolic_factorization_;
    00149     bool pardiso_redo_symbolic_fact_only_if_inertia_wrong_;
    00153     bool pardiso_repeated_perturbation_means_singular_;
    00156     bool skip_inertia_check_;
    00158     Index pardiso_max_droptol_corrections_;
    00160
    00163     Index pardiso_max_iter_;
    00164     Number pardiso_iter_relative_tol_;
    00165     Index pardiso_iter_coarse_size_;
    00166     Index pardiso_iter_max_levels_;
    00167     Number pardiso_iter_dropping_factor_;
    00168     Number pardiso_iter_dropping_schur_;
    00169     Index pardiso_iter_max_row_fill_;
    00170     Number pardiso_iter_inverse_norm_factor_;
    00171
    00172     Index normal_pardiso_max_iter_;
    00173     Number normal_pardiso_iter_relative_tol_;
    00174     Index normal_pardiso_iter_coarse_size_;
    00175     Index normal_pardiso_iter_max_levels_;
    00176     Number normal_pardiso_iter_dropping_factor_;
    00177     Number normal_pardiso_iter_dropping_schur_;
    00178     Index normal_pardiso_iter_max_row_fill_;
    00179     Number normal_pardiso_iter_inverse_norm_factor_;
    00181
    00183     Number decr_factor_;
    00184
    00187     Number pardiso_iter_dropping_factor_used_;
    00188     Number pardiso_iter_dropping_schur_used_;
    00189     Number normal_pardiso_iter_dropping_factor_used_;
    00190     Number normal_pardiso_iter_dropping_schur_used_;
    00192
    00197     bool initialized_;
    00199
    00203     void** PT_;
    00206     ipfint MAXFCT_;
    00208     ipfint MNUM_;
    00210     ipfint MTYPE_;
    00212     ipfint* IPARM_;
    00214     double* DPARM_;
    00216     ipfint MSGLVL_;
    00218
    00221     Index debug_last_iter_;
    00222     Index debug_cnt_;
    00224
    00229     ESymSolverStatus SymbolicFactorization(const Index* ia,
    00230                                            const Index* ja);
    00231
    00234     ESymSolverStatus Factorization(const Index* ia,
    00235                                    const Index* ja,
    00236                                    bool check_NegEVals,
    00237                                    Index numberOfNegEVals);
    00238
    00241     ESymSolverStatus Solve(const Index* ia,
    00242                            const Index* ja,
    00243                            Index nrhs,
    00244                            double *rhs_vals);
    00246
    00248     InexactData& InexData()
    00249     {
    00250       InexactData& inexact_data =
    00251         static_cast<InexactData&>(IpData().AdditionalData());
    00252       DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
    00253       return inexact_data;
    00254     }
    00255
    00257     InexactCq& InexCq()
    00258     {
    00259       InexactCq& inexact_cq =
    00260         static_cast<InexactCq&>(IpCq().AdditionalCq());
    00261       DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
    00262       return inexact_cq;
    00263     }
    00264
    00266     SmartPtr<IterativeSolverTerminationTester> normal_tester_;
    00267
    00269     SmartPtr<IterativeSolverTerminationTester> pd_tester_;
    00270
    00271   };
    00272
    00273 } // namespace Ipopt
    00274 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines