- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/SVN-release/Ipopt-3.7.1/Ipopt/src/Algorithm/LinearSolvers/IpWsmpSolverInterface.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2009 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Common Public License.
    00004 //
    00005 // $Id: IpWsmpSolverInterface.hpp 1578 2009-10-06 23:40:31Z 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 namespace Ipopt
    00016 {
    00017
    00022   class WsmpSolverInterface: public SparseSymLinearSolverInterface
    00023   {
    00024   public:
    00028     WsmpSolverInterface();
    00029
    00031     virtual ~WsmpSolverInterface();
    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
    00094     virtual bool ProvidesDegeneracyDetection() const;
    00095
    00098     virtual ESymSolverStatus DetermineDependentRows(const Index* ia,
    00099         const Index* ja,
    00100         std::list<Index>& c_deps);
    00101
    00102   private:
    00112     WsmpSolverInterface(const WsmpSolverInterface&);
    00113
    00115     void operator=(const WsmpSolverInterface&);
    00117
    00121     Index dim_;
    00122
    00124     double* a_;
    00126
    00130     Index wsmp_num_threads_;
    00132     Number wsmp_pivtol_;
    00134     Number wsmp_pivtolmax_;
    00136     Index wsmp_scaling_;
    00139     Number wsmp_singularity_threshold_;
    00141     Index wsmp_write_matrix_iteration_;
    00144     bool skip_inertia_check_;
    00146
    00148     Index matrix_file_number_;
    00149
    00153     Index negevals_;
    00155
    00160     bool initialized_;
    00164     bool pivtol_changed_;
    00167     bool have_symbolic_factorization_;
    00170     Index factorizations_since_recomputed_ordering_;
    00172
    00176     ipfint* IPARM_;
    00178     double* DPARM_;
    00180     ipfint* PERM_;
    00182     ipfint* INVP_;
    00184     ipfint* MRP_;
    00186
    00191     ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
    00192
    00194     ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja);
    00195
    00198     ESymSolverStatus Factorization(const Index* ia,
    00199                                    const Index* ja,
    00200                                    bool check_NegEVals,
    00201                                    Index numberOfNegEVals);
    00202
    00205     ESymSolverStatus Solve(const Index* ia,
    00206                            const Index* ja,
    00207                            Index nrhs,
    00208                            double *rhs_vals);
    00210   };
    00211
    00212 } // namespace Ipopt
    00213 #endif