Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Superludist2_OO.h
Go to the documentation of this file.
1 
2 // @HEADER
3 // ***********************************************************************
4 //
5 // Amesos: Direct Sparse Solver Package
6 // Copyright (2004) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // This library is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Lesser General Public License as
13 // published by the Free Software Foundation; either version 2.1 of the
14 // License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful, but
17 // WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
24 // USA
25 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
26 //
27 // ***********************************************************************
28 // @HEADER
29 
30 #include "Amesos_ConfigDefs.h"
31 
32 #include "superlu_ddefs.h"
33 #include "supermatrix.h"
34 // SuperLU defines Reduce to be a macro in util.h, this conflicts with Reduce() in Epetra_MultiVector.h
35 #undef Reduce
36 
37 #ifndef _SUPERLUDIST2_OO_H_
38 #define _SUPERLUDIST2_OO_H_
39 
40 #if defined(Amesos_SHOW_DEPRECATED_WARNINGS)
41 #ifdef __GNUC__
42 #warning "The Amesos package is deprecated"
43 #endif
44 #endif
45 
46 class Epetra_Comm;
47 class Epetra_BlockMap;
48 class Epetra_MultiVector;
49 class Epetra_RowMatrix;
50 #include "Epetra_LinearProblem.h"
52 #include "Epetra_Object.h"
54 
162 
163  public:
165 
177  Superludist2_OO(const Epetra_LinearProblem& LinearProblem);
178 
180 
182  virtual ~Superludist2_OO(void);
184 
186 
188 
191  void SetTrans( bool trans ) {
192  assert( trans == false) ;
193  Transpose_ = trans ;} ;
194 
195 
197 
198 
200  bool GetTrans( ) const { return Transpose_ ;} ;
201 
203 
206  int CheckInput() const ;
207 
209 
211 
243 
245 
247 
249  double Condest() const;
250 
252 
253 
255 
259  int Solve(bool Factor) ;
260 
262  protected:
263 
264  //
265  // These are not used in release 0.1
266  //
270  //
271  // Here are the values returned by ExtractHbData
272  //
273  int M,N,nz;
274  int *ptr, *ind;
275  double *val, *rhs, *lhs;
276  int Nrhs, ldrhs, ldlhs;
277 
278 
279  bool Transpose_ ;
280  bool Factored_;
282  //
283  // Here are the SuperLU data structures for A, L and U:
284  //
285  SOLVEstruct_t SOLVEstruct;
286  int numprocs;
287  int nprow;
288  int npcol;
289  gridinfo_t grid; // SuperLU's grid information
290  superlu_options_t options;
291  SuperMatrix A;
292  ScalePermstruct_t ScalePermstruct;
293  SuperLUStat_t stat;
294  LUstruct_t LUstruct;
295  vector <int> Ap;
296  vector <int> Ai;
297  vector <double> Aval;
298  bool A_and_LU_built ; // Tells us whether to free them
299 
300 
301  // This is needed by the old Superludist2_OO.cpp
302  int numrows ;
303 
304 };
305 
306 
307 #endif /* _SUPERLUDIST2_OO_H_ */
SOLVEstruct_t SOLVEstruct
Epetra_LinearProblem * redistProblem
vector< double > Aval
bool GetTrans() const
Return the transpose flag.
virtual ~Superludist2_OO(void)
Superludist2_OO Destructor.
void SetTrans(bool trans)
Setting the transpose flag to true causes Solve() to compute A^t x = b.
double Condest() const
Returns the condition number estimate for the current problem, if one exists, returns -1...
vector< int > Ai
superlu_options_t options
ScalePermstruct_t ScalePermstruct
vector< int > Ap
Superludist2_OO(const Epetra_LinearProblem &LinearProblem)
Superludist2_OO Constructor.
const Epetra_LinearProblem * Problem_
LUstruct_t LUstruct
int Solve(bool Factor)
All computation is performed during the call to Solve()
Superludist2_OO: An object-oriented wrapper for Superludist.
SuperLUStat_t stat
int CheckInput() const
Prints a summary of solver parameters, performs simple sanity checks.
Epetra_LinearProblemRedistor * redistor