Amesos Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
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
40class Epetra_Comm;
41class Epetra_BlockMap;
42class Epetra_MultiVector;
43class Epetra_RowMatrix;
44#include "Epetra_LinearProblem.h"
45#include "Epetra_LinearProblemRedistor.h"
46#include "Epetra_Object.h"
48
156
157 public:
159
171 Superludist2_OO(const Epetra_LinearProblem& LinearProblem);
172
174
176 virtual ~Superludist2_OO(void);
178
180
182
185 void SetTrans( bool trans ) {
186 assert( trans == false) ;
187 Transpose_ = trans ;} ;
188
189
191
192
194 bool GetTrans( ) const { return Transpose_ ;} ;
195
197
200 int CheckInput() const ;
201
203
205
237
239
241
243 double Condest() const;
244
246
247
249
253 int Solve(bool Factor) ;
254
256 protected:
257
258 //
259 // These are not used in release 0.1
260 //
261 const Epetra_LinearProblem * Problem_;
262 Epetra_LinearProblemRedistor *redistor;
263 Epetra_LinearProblem *redistProblem;
264 //
265 // Here are the values returned by ExtractHbData
266 //
267 int M,N,nz;
268 int *ptr, *ind;
269 double *val, *rhs, *lhs;
271
272
276 //
277 // Here are the SuperLU data structures for A, L and U:
278 //
279 SOLVEstruct_t SOLVEstruct;
281 int nprow;
282 int npcol;
283 gridinfo_t grid; // SuperLU's grid information
284 superlu_options_t options;
285 SuperMatrix A;
286 ScalePermstruct_t ScalePermstruct;
287 SuperLUStat_t stat;
288 LUstruct_t LUstruct;
289 vector <int> Ap;
290 vector <int> Ai;
291 vector <double> Aval;
292 bool A_and_LU_built ; // Tells us whether to free them
293
294
295 // This is needed by the old Superludist2_OO.cpp
296 int numrows ;
297
298};
299
300
301#endif /* _SUPERLUDIST2_OO_H_ */
302
Superludist2_OO: An object-oriented wrapper for Superludist.
vector< int > Ai
SuperLUStat_t stat
vector< double > Aval
const Epetra_LinearProblem * Problem_
bool GetTrans() const
Return the transpose flag.
Epetra_LinearProblemRedistor * redistor
Epetra_LinearProblem * redistProblem
double Condest() const
Returns the condition number estimate for the current problem, if one exists, returns -1....
Superludist2_OO(const Epetra_LinearProblem &LinearProblem)
Superludist2_OO Constructor.
int Solve(bool Factor)
All computation is performed during the call to Solve()
SOLVEstruct_t SOLVEstruct
int CheckInput() const
Prints a summary of solver parameters, performs simple sanity checks.
vector< int > Ap
virtual ~Superludist2_OO(void)
Superludist2_OO Destructor.
superlu_options_t options
ScalePermstruct_t ScalePermstruct
void SetTrans(bool trans)
Setting the transpose flag to true causes Solve() to compute A^t x = b.