- Main Page
- Classes
- Files

- File List
- File Members

# src/Algorithm/LinearSolvers/IpWsmpSolverInterface.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2010 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpWsmpSolverInterface.hpp 1861 2010-12-21 21:34:47Z andreasw $
    00006 //
    00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2005-03-17
    00008
    00009
    00010 #ifndef __IPWSMPSOLVERINTERFACE_HPP__
    00011 #define __IPWSMPSOLVERINTERFACE_HPP__
    00012
    00013 #include "IpSparseSymLinearSolverInterface.hpp"
    00014
    00015 //#define PARDISO_MATCHING_PREPROCESS
    00016
    00017 namespace Ipopt
    00018 {
    00019
    00024   class WsmpSolverInterface: public SparseSymLinearSolverInterface
    00025   {
    00026   public:
    00030     WsmpSolverInterface();
    00031
    00033     virtual ~WsmpSolverInterface();
    00035
    00037     bool InitializeImpl(const OptionsList& options,
    00038                         const std::string& prefix);
    00039
    00040
    00044     virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
    00045         const Index *ia,
    00046         const Index *ja);
    00047
    00050     virtual double* GetValuesArrayPtr();
    00051
    00053     virtual ESymSolverStatus MultiSolve(bool new_matrix,
    00054                                         const Index* ia,
    00055                                         const Index* ja,
    00056                                         Index nrhs,
    00057                                         double* rhs_vals,
    00058                                         bool check_NegEVals,
    00059                                         Index numberOfNegEVals);
    00060
    00064     virtual Index NumberOfNegEVals() const;
    00066
    00067     //* @name Options of Linear solver */
    00069
    00071     virtual bool IncreaseQuality();
    00072
    00076     virtual bool ProvidesInertia() const
    00077     {
    00078       return true;
    00079     }
    00083     EMatrixFormat MatrixFormat() const
    00084     {
    00085       return CSR_Format_1_Offset;
    00086     }
    00088
    00091     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00093
    00096     virtual bool ProvidesDegeneracyDetection() const;
    00097
    00100     virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
    00101         const Index* ja,
    00102         std::list<Index>& c_deps);
    00103
    00104   private:
    00114     WsmpSolverInterface(const WsmpSolverInterface&);
    00115
    00117     void operator=(const WsmpSolverInterface&);
    00119
    00123     Index dim_;
    00124
    00126     Index nonzeros_;
    00127
    00129     double* a_;
    00130
    00131 #ifdef PARDISO_MATCHING_PREPROCESS
    00132
    00135     ipfint* ia2;
    00136     ipfint* ja2;
    00137     double* a2_;
    00138     ipfint* perm2;
    00139     double* scale2;
    00141
    00142 #endif
    00143
    00145
    00149     Index wsmp_num_threads_;
    00151     Number wsmp_pivtol_;
    00153     Number wsmp_pivtolmax_;
    00155     Index wsmp_scaling_;
    00158     Number wsmp_singularity_threshold_;
    00160     Index wsmp_write_matrix_iteration_;
    00163     bool skip_inertia_check_;
    00166     bool wsmp_no_pivoting_;
    00168
    00170     Index matrix_file_number_;
    00171
    00175     Index negevals_;
    00177
    00182     bool initialized_;
    00185     bool printed_num_threads_;
    00189     bool pivtol_changed_;
    00192     bool have_symbolic_factorization_;
    00195     Index factorizations_since_recomputed_ordering_;
    00197
    00201     ipfint* IPARM_;
    00203     double* DPARM_;
    00205     ipfint* PERM_;
    00207     ipfint* INVP_;
    00209     ipfint* MRP_;
    00211
    00216     ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
    00217
    00219     ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja,
    00220                                      Index numberOfNegEVals);
    00221
    00224     ESymSolverStatus Factorization(const Index* ia,
    00225                                    const Index* ja,
    00226                                    bool check_NegEVals,
    00227                                    Index numberOfNegEVals);
    00228
    00231     ESymSolverStatus Solve(const Index* ia,
    00232                            const Index* ja,
    00233                            Index nrhs,
    00234                            double *rhs_vals);
    00236   };
    00237
    00238 } // namespace Ipopt
    00239 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines