Amesos Package Browser (Single Doxygen Collection) Development
Superludist2_OO.h
Go to the documentation of this file.
00001 
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 //                Amesos: Direct Sparse Solver Package
00006 //                 Copyright (2004) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ***********************************************************************
00028 // @HEADER
00029 
00030 #include "Amesos_ConfigDefs.h"
00031 
00032 #include "superlu_ddefs.h"
00033 #include "supermatrix.h"
00034 //  SuperLU defines Reduce to be a macro in util.h, this conflicts with Reduce() in Epetra_MultiVector.h
00035 #undef Reduce
00036 
00037 #ifndef _SUPERLUDIST2_OO_H_
00038 #define _SUPERLUDIST2_OO_H_
00039 
00040 class Epetra_Comm;
00041 class Epetra_BlockMap;
00042 class Epetra_MultiVector;
00043 class Epetra_RowMatrix;
00044 #include "Epetra_LinearProblem.h"
00045 #include "Epetra_LinearProblemRedistor.h"
00046 #include "Epetra_Object.h"
00048 
00155 class Superludist2_OO {
00156     
00157   public:
00159 
00160 
00171   Superludist2_OO(const Epetra_LinearProblem& LinearProblem);
00172 
00174 
00176   virtual ~Superludist2_OO(void);
00178 
00180 
00182 
00185   void SetTrans( bool trans ) { 
00186     assert( trans == false) ; 
00187     Transpose_ = trans ;} ; 
00188 
00189 
00191 
00192     
00194   bool GetTrans( ) const { return Transpose_ ;} ;
00195 
00197 
00200   int CheckInput() const ;
00201 
00203 
00205 
00237 
00239 
00241 
00243   double Condest() const;
00244 
00246 
00247 
00249 
00250 
00253   int Solve(bool Factor) ;
00254 
00256  protected:
00257 
00258   //
00259   //  These are not used in release 0.1
00260   //
00261   const Epetra_LinearProblem * Problem_;
00262   Epetra_LinearProblemRedistor *redistor;
00263   Epetra_LinearProblem *redistProblem;
00264   //
00265   //  Here are the values returned by ExtractHbData
00266   //
00267   int M,N,nz;
00268   int *ptr, *ind;
00269   double *val, *rhs, *lhs;
00270   int Nrhs, ldrhs, ldlhs;
00271   
00272 
00273   bool Transpose_ ;
00274   bool Factored_;
00275   bool FirstCallToSolve_;
00276   //
00277   //  Here are the SuperLU data structures for A, L and U:
00278   //
00279   SOLVEstruct_t SOLVEstruct; 
00280   int numprocs;
00281   int nprow;
00282   int npcol;
00283   gridinfo_t grid;                 // SuperLU's grid information
00284   superlu_options_t options;
00285   SuperMatrix A;
00286   ScalePermstruct_t ScalePermstruct;
00287   SuperLUStat_t stat;
00288   LUstruct_t LUstruct;
00289   vector <int> Ap;
00290   vector <int> Ai;
00291   vector <double> Aval;
00292   bool A_and_LU_built ;            // Tells us whether to free them 
00293 
00294 
00295   //  This is needed by the old Superludist2_OO.cpp
00296   int numrows ; 
00297 
00298 };
00299 
00300 
00301 #endif /* _SUPERLUDIST2_OO_H_ */
00302 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines