/home/coin/SVN-release/Ipopt-3.2.2/Ipopt/src/Algorithm/LinearSolvers/IpMumpsSolverInterface.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2006 Damien Hocking, KBC Advanced Technologies
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors: Damien Hocking                 KBC    2006-03-20
00006 //        (included his original contribution into Ipopt package on 2006-03-25)
00007 //          Andreas Waechter               IBM    2006-03-25
00008 //           (minor changes and corrections)
00009 
00010 
00011 #ifndef __IPMUMPSSOLVERINTERFACE_HPP__
00012 #define __IPMUMPSSOLVERINTERFACE_HPP__
00013 
00014 #include "IpSparseSymLinearSolverInterface.hpp"
00015 
00016 extern "C"
00017 {
00018 #include "dmumps_c.h"
00019 }
00020 
00021 namespace Ipopt
00022 {
00023 
00028   class MumpsSolverInterface: public SparseSymLinearSolverInterface
00029   {
00030   public:
00034     MumpsSolverInterface();
00035 
00037     virtual ~MumpsSolverInterface();
00039 
00041     bool InitializeImpl(const OptionsList& options,
00042                         const std::string& prefix);
00043 
00044 
00048     virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *ia, 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 Triplet_Format;
00088     }
00090 
00093     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00095 
00096   private:
00106     MumpsSolverInterface(const MumpsSolverInterface&);
00107 
00109     void operator=(const MumpsSolverInterface&);
00111 
00117     Index n;
00118 
00120     Index nz;
00121 
00123     double* a;
00124 
00126     int* irn_;
00128     int* jcn_;
00130 
00133     Index negevals;
00135 
00138 
00139 
00142 
00143 
00148 
00149 
00156     ESymSolverStatus Factorization(const Index* ia,
00157                                    const Index* ja,
00158                                    bool check_NegEVals,
00159                                    Index numberOfNegEVals);
00160 
00163     ESymSolverStatus Solve(const Index* ia,
00164                            const Index* ja,
00165                            Index nrhs,
00166                            double *rhs_vals);
00168     //MUMPS data structure
00169     DMUMPS_STRUC_C mumps_data;
00170 
00171   };
00172 
00173 } // namespace Ipopt
00174 #endif

Generated on Thu May 15 22:19:50 2008 by  doxygen 1.4.7