• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/tmp/buildd/coinor-ipopt-3.8.3/Ipopt/src/Algorithm/LinearSolvers/IpMa77SolverInterface.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2009, Jonathan Hogg <jdh41.at.cantab.net>
00002 // Copyright (C) 2004, 2007 International Business Machines and others.
00003 // All Rights Reserved.
00004 // This code is published under the Common Public License.
00005 //
00006 // $Id: IpMa77SolverInterface.hpp 1692 2010-06-21 19:10:07Z andreasw $
00007 //
00008 // Authors: Jonathan Hogg                           2009-07-29 
00009 //          Carl Laird, Andreas Waechter     IBM    2004-03-17
00010 
00011 #ifndef __IPMA77SOLVERINTERFACE_HPP__
00012 #define __IPMA77SOLVERINTERFACE_HPP__
00013 
00014 #include "IpSparseSymLinearSolverInterface.hpp"
00015 
00016 namespace Ipopt
00017 {
00018 
00098   class Ma77SolverInterface: public SparseSymLinearSolverInterface
00099   {
00100   private:
00101     int ndim_; // Number of dimensions
00102     double *val_; // Storage for variables
00103     int numneg_; // Number of negative pivots in last factorization
00104 
00105     /* Options */
00106     int icntl_[8];
00107     double rcntl_[3];
00108     int ma77_print_level_;
00109     int ma77_buffer_lpage_;
00110     int ma77_buffer_npage_;
00111     int ma77_file_size_;
00112     int ma77_maxstore_;
00113     int ma77_nemin_;
00114     double ma77_small_;
00115     double ma77_static_;
00116     double ma77_u_;
00117 
00118   public:
00119 
00120     Ma77SolverInterface() : val_(NULL) {}
00121     ~Ma77SolverInterface();
00122 
00123     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00124 
00125     bool InitializeImpl(const OptionsList& options,
00126                         const std::string& prefix);
00127 
00136     ESymSolverStatus InitializeStructure(Index dim, Index nonzeros,
00137         const Index* ia,
00138         const Index* ja);
00139 
00146     double* GetValuesArrayPtr() { return val_; }
00147 
00180     ESymSolverStatus MultiSolve(bool new_matrix,
00181                                 const Index* ia,
00182                                 const Index* ja,
00183                                 Index nrhs,
00184                                 double* rhs_vals,
00185                                 bool check_NegEVals,
00186                                 Index numberOfNegEVals);
00187 
00194     Index NumberOfNegEVals() const { return numneg_; }
00196 
00197     //* @name Options of Linear solver */
00199 
00205     bool IncreaseQuality() { return false; }
00206 
00210     bool ProvidesInertia() const { return true; }
00211 
00215     EMatrixFormat MatrixFormat() const { return CSR_Full_Format_1_Offset; }
00217 
00223     bool ProvidesDegeneracyDetection() const { return false; }
00226     ESymSolverStatus DetermineDependentRows(const Index* ia,
00227         const Index* ja,
00228         std::list<Index>& c_deps) { return SYMSOLVER_FATAL_ERROR; }
00229 
00231     static void MetisOrder(const int dim, const Index *ptr, const Index *row, Index *perm);
00232   };
00233 
00234 } // namespace Ipopt
00235 
00236 #endif

Generated on Thu Jul 29 2010 19:56:08 by  doxygen 1.7.1