/home/coin/SVN-release/Ipopt-3.8.0/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 1583 2009-10-15 21:04:37Z 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_;
00147     bool wsmp_no_pivoting_;
00149 
00151     Index matrix_file_number_;
00152 
00156     Index negevals_;
00158 
00163     bool initialized_;
00167     bool pivtol_changed_;
00170     bool have_symbolic_factorization_;
00173     Index factorizations_since_recomputed_ordering_;
00175 
00179     ipfint* IPARM_;
00181     double* DPARM_;
00183     ipfint* PERM_;
00185     ipfint* INVP_;
00187     ipfint* MRP_;
00189 
00194     ESymSolverStatus SymbolicFactorization(const Index* ia, const Index* ja);
00195 
00197     ESymSolverStatus InternalSymFact(const Index* ia, const Index* ja,
00198                                      Index numberOfNegEVals);
00199 
00202     ESymSolverStatus Factorization(const Index* ia,
00203                                    const Index* ja,
00204                                    bool check_NegEVals,
00205                                    Index numberOfNegEVals);
00206 
00209     ESymSolverStatus Solve(const Index* ia,
00210                            const Index* ja,
00211                            Index nrhs,
00212                            double *rhs_vals);
00214   };
00215 
00216 } // namespace Ipopt
00217 #endif

Generated on Fri Oct 30 03:00:43 2009 by  doxygen 1.4.7