Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Amesos_Lapack.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Amesos: Direct Sparse Solver Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
29 #include "Amesos_Lapack.h"
30 #include "Epetra_Map.h"
31 #include "Epetra_Import.h"
32 #include "Epetra_RowMatrix.h"
33 #include "Epetra_Vector.h"
34 #include "Epetra_Util.h"
35 #include "Epetra_LAPACK.h"
36 using namespace Teuchos;
37 
38 //=============================================================================
40  UseTranspose_(false),
41  Problem_(&Problem),
42  MtxRedistTime_(-1),
43  MtxConvTime_(-1),
44  VecRedistTime_(-1),
45  SymFactTime_(-1),
46  NumFactTime_(-1),
47  SolveTime_(-1)
48 
49 {
51 }
52 
55  setParameterList(PL);
56  return PL ;
57 }
58 
59 
61 
62  pl_ = pl;
63  Teuchos::ParameterList& LAPACKParams = pl_->sublist("Lapack") ;
64  AddZeroToDiag_ = LAPACKParams.get( "AddZeroToDiag", false );
65  AddToDiag_ = LAPACKParams.get( "AddToDiag", 0.0 );
66 
67  bool Equilibrate = LAPACKParams.get("Equilibrate",true);
69 }
70 
71 
72 
73 //=============================================================================
75 {
76  // print out some information if required by the user
77  if ((verbose_ && PrintTiming_) || (verbose_ == 2))
78  PrintTiming();
79  if ((verbose_ && PrintStatus_) || (verbose_ == 2))
80  PrintStatus();
81 }
82 
83 //=============================================================================
84 // Default values are defined in the constructor.
86 {
87  // retrive general parameters
88  SetStatusParameters( ParameterList );
89 
90  SetControlParameters( ParameterList );
91 
92  bool Equilibrate = true;
93  if (ParameterList.isSublist("Lapack") ) {
94  const Teuchos::ParameterList& LAPACKParams = ParameterList.sublist("Lapack") ;
95  if ( LAPACKParams.isParameter("Equilibrate") )
96  Equilibrate = LAPACKParams.get<bool>("Equilibrate");
97  }
99 
100  return(0);
101 }
102 
103 //=============================================================================
105 {
106  if (GetProblem()->GetOperator()->OperatorRangeMap().NumGlobalPoints64() !=
107  GetProblem()->GetOperator()->OperatorDomainMap().NumGlobalPoints64()) {
108  return(false);
109  }
110  else
111  return(true);
112 }
113 
114 //=============================================================================
115 // Build SerialMap_ and Importer_. SerialMap_ is equal to RowMatrixRowMap()
116 // for the serial case, otherwise we actually need to build a new map.
117 // Importer_ is constructed only for the parallel case. All these objects are
118 // destroyed and rebuilt every time SymbolicFactorization() is called, to
119 // allow the possibility of completely different matrices given in input.
120 //
121 // NOTE: A possible bug is nasted here. If the user destroys the
122 // RowMatrixRowMap(), Importer() may not work properly any more. Anyway,
123 // this bug is due to misuse of the class, since it is supposed that the
124 // structure of A (and therefore all its components) remain untouched after a
125 // call to SymbolicFactorization().
126 // ============================================================================
128 {
131 
132  if (GetProblem()->GetMatrix() == 0)
133  AMESOS_CHK_ERR(-1); // problem still not properly set
134 
135  CreateTimer(Comm()); // Create timer
136  ResetTimer();
137 
138  MyPID_ = Comm().MyPID();
139  NumProcs_ = Comm().NumProc();
142 
143 
144  if (NumProcs_ == 1)
145  SerialMap_ = rcp(const_cast<Epetra_Map*>(&(Matrix()->RowMatrixRowMap())),
146  false);
147  else
148  {
149  int NumElements = 0;
150  if (MyPID_ == 0)
151  NumElements = static_cast<int>(NumGlobalRows64());
152 #if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
153  SerialMap_ = rcp(new Epetra_Map(-1, NumElements, 0, Comm()));
154 #endif
155  if (SerialMap_.get() == 0)
156  AMESOS_CHK_ERR(-1);
157 
158  MatrixImporter_ = rcp(new Epetra_Import(SerialMap(), Matrix()->RowMatrixRowMap()));
159  if (MatrixImporter_.get() == 0)
160  AMESOS_CHK_ERR(-1);
161 
162  const bool switchDomainRangeMaps = (UseTranspose_ != Matrix()->UseTranspose());
163 
164  const Epetra_Map &rhsMap = switchDomainRangeMaps ? Matrix()->OperatorDomainMap() : Matrix()->OperatorRangeMap();
165  RhsExporter_ = rcp(new Epetra_Export(rhsMap, SerialMap()));
166  if (RhsExporter_.get() == 0)
167  AMESOS_CHK_ERR(-1);
168 
169  const Epetra_Map &solutionMap = switchDomainRangeMaps ? Matrix()->OperatorRangeMap() : Matrix()->OperatorDomainMap();
170  SolutionImporter_ = rcp(new Epetra_Import(solutionMap, SerialMap()));
171  if (SolutionImporter_.get() == 0)
172  AMESOS_CHK_ERR(-1);
173  }
174 
175  SymFactTime_ = AddTime("Total symbolic factorization time", SymFactTime_);
178 
179  return(0);
180 }
181 
182 //=============================================================================
184 {
186 
187  // perform the symbolic (that is, build map and importer) if not done yet.
188  if (IsSymbolicFactorizationOK_ == false)
190 
191  // Only on processor 0 define the dense matrix.
192  if (MyPID_ == 0)
193  AMESOS_CHK_ERR(DenseMatrix_.Shape(static_cast<int>(NumGlobalRows64()),static_cast<int>(NumGlobalRows64())));
194 
198 
200  ++NumNumericFact_;
201 
202  return(0);
203 }
204 
205 //=============================================================================
207 {
208  if (IsNumericFactorizationOK_ == false)
210 
212  const Epetra_MultiVector* B = Problem_->GetRHS();
213 
214  if (X == 0) AMESOS_CHK_ERR(-1); // something wrong with user's input
215  if (B == 0) AMESOS_CHK_ERR(-1); // something wrong with user's input
216  if (X->NumVectors() != B->NumVectors())
217  AMESOS_CHK_ERR(-1); // something wrong with user's input
218 
219  // Timing are set inside each Solve().
220  int ierr;
221  if (NumProcs_ == 1)
222  ierr = SolveSerial(*X,*B);
223  else
224  ierr = SolveDistributed(*X,*B);
225 
226  AMESOS_RETURN(ierr);
227 }
228 
229 //=============================================================================
231  const Epetra_MultiVector& B)
232 {
233  ResetTimer();
234 
235  int NumVectors = X.NumVectors();
236 
237  Epetra_SerialDenseMatrix DenseX(static_cast<int>(NumGlobalRows64()),NumVectors);
238  Epetra_SerialDenseMatrix DenseB(static_cast<int>(NumGlobalRows64()),NumVectors);
239 
240  for (int i = 0 ; i < NumGlobalRows64() ; ++i)
241  for (int j = 0 ; j < NumVectors ; ++j)
242  DenseB(i,j) = B[j][i];
243 
244  DenseSolver_.SetVectors(DenseX,DenseB);
247 
248  for (int i = 0 ; i < NumGlobalRows64() ; ++i)
249  for (int j = 0 ; j < NumVectors ; ++j)
250  X[j][i] = DenseX(i,j);
251 
252  SolveTime_ = AddTime("Total solve time", SolveTime_);
253  ++NumSolve_;
254 
255  return(0) ;
256 }
257 
258 //=============================================================================
260  const Epetra_MultiVector& B)
261 {
262  ResetTimer();
263 
264  int NumVectors = X.NumVectors();
265 
266  // vector that contains RHS, overwritten by solution,
267  // with all elements on on process 0.
268  Epetra_MultiVector SerialVector(SerialMap(),NumVectors);
269  // import off-process data
270  AMESOS_CHK_ERR(SerialVector.Export(B,RhsExporter(),Insert));
271 
272  VecRedistTime_ = AddTime("Total vector redistribution time", VecRedistTime_);
273  ResetTimer();
274 
275  if (MyPID_ == 0) {
276  Epetra_SerialDenseMatrix DenseX(static_cast<int>(NumGlobalRows64()),NumVectors);
277  Epetra_SerialDenseMatrix DenseB(static_cast<int>(NumGlobalRows64()),NumVectors);
278 
279  for (int i = 0 ; i < NumGlobalRows64() ; ++i)
280  for (int j = 0 ; j < NumVectors ; ++j)
281  DenseB(i,j) = SerialVector[j][i];
282 
283  DenseSolver_.SetVectors(DenseX,DenseB);
286 
287  for (int i = 0 ; i < NumGlobalRows64() ; ++i)
288  for (int j = 0 ; j < NumVectors ; ++j)
289  SerialVector[j][i] = DenseX(i,j);
290  }
291 
292  SolveTime_ = AddTime("Total solve time", SolveTime_);
293  ResetTimer();
294 
295  AMESOS_CHK_ERR(X.Import(SerialVector,SolutionImporter(),Insert));
296 
297  VecRedistTime_ = AddTime("Total vector redistribution time", VecRedistTime_);
298  ++NumSolve_;
299 
300  return(0) ;
301 }
302 
303 //=============================================================================
305 {
306  if (MyPID_)
307  return(0);
308 
309  ResetTimer();
310 
311  for (int i = 0 ; i < NumGlobalRows64() ; ++i)
312  for (int j = 0 ; j < NumGlobalRows64() ; ++j)
313  DenseMatrix_(i,j) = 0.0;
314 
315  // allocate storage to extract matrix rows.
316  int Length = SerialMatrix().MaxNumEntries();
317  std::vector<double> Values(Length);
318  std::vector<int> Indices(Length);
319 
320  for (int j = 0 ; j < SerialMatrix().NumMyRows() ; ++j)
321  {
322  int NumEntries;
323  int ierr = SerialMatrix().ExtractMyRowCopy(j, Length, NumEntries,
324  &Values[0], &Indices[0]);
325  AMESOS_CHK_ERR(ierr);
326 
327  if ( AddZeroToDiag_ ) {
328  for (int k = 0 ; k < NumEntries ; ++k) {
329  DenseMatrix_(j,Indices[k]) = Values[k];
330  }
331  DenseMatrix_(j,j) += AddToDiag_;
332  } else {
333  for (int k = 0 ; k < NumEntries ; ++k) {
334  // if (fabs(Values[k]) >= Threshold_) Threshold not used yet - no consistent definition
335  // Lapack would not be the first routine to use a threshold, as it confers no performance
336  // advantage
337  DenseMatrix_(j,Indices[k]) = Values[k];
338 
339  // std::cout << __FILE__ << "::"<<__LINE__ << " j = " << j << " k = " << k << " Values[k = " << Values[k] << " AddToDiag_ = " << AddToDiag_ << std::endl ;
340  if (Indices[k] == j) {
341  DenseMatrix_(j,j) = Values[k] + AddToDiag_;
342  }
343  }
344  }
345  }
346 
347  MtxConvTime_ = AddTime("Total matrix conversion time", MtxConvTime_);
348  return(0);
349 }
350 
351 //=============================================================================
353 {
354  ResetTimer();
355 
356  if (NumProcs_ == 1)
357  SerialMatrix_ = rcp(const_cast<Epetra_RowMatrix*>(Matrix()), false);
358  else
359  {
361  SerialMatrix_ = rcp(&SerialCrsMatrix(), false);
363  AMESOS_CHK_ERR(SerialCrsMatrix().FillComplete());
364  }
365 
366  MtxRedistTime_ = AddTime("Total matrix redistribution time", MtxRedistTime_);
367 
368  return(0);
369 }
370 
371 // ======================================================================
373 {
374  if (IsSymbolicFactorizationOK_ == false)
376 
377  if (MyPID_ == 0)
378  AMESOS_CHK_ERR(DenseMatrix_.Shape(static_cast<int>(NumGlobalRows64()),static_cast<int>(NumGlobalRows64())));
379 
382 
385 
386  if (NumProcs_ == 1)
387  {
388  LocalEr = Teuchos::rcp(&Er, false);
389  LocalEi = Teuchos::rcp(&Ei, false);
390  }
391  else
392  {
393  LocalEr = Teuchos::rcp(new Epetra_Vector(*SerialMap_));
394  LocalEi = Teuchos::rcp(new Epetra_Vector(*SerialMap_));
395  }
396 
397  if (MyPID_ == 0)
398  {
399  int n = static_cast<int>(NumGlobalRows64());
400  char jobvl = 'N'; /* V/N to calculate/not calculate left eigenvectors
401  of matrix H.*/
402  char jobvr = 'N'; /* As above, but for right eigenvectors. */
403  int info = 0;
404  int ldvl = n;
405  int ldvr = n;
406 
407  Er.PutScalar(0.0);
408  Ei.PutScalar(0.0);
409 
411 
412  std::vector<double> work(1);
413  int lwork = -1;
414 
415  LAPACK.GEEV(jobvl, jobvr, n, DenseMatrix_.A(), n,
416  LocalEr->Values(), LocalEi->Values(), NULL,
417  ldvl, NULL,
418  ldvr, &work[0],
419  lwork, &info);
420 
421  lwork = (int)work[0];
422  work.resize(lwork);
423  LAPACK.GEEV(jobvl, jobvr, n, DenseMatrix_.A(), n,
424  LocalEr->Values(), LocalEi->Values(), NULL,
425  ldvl, NULL,
426  ldvr, &work[0],
427  lwork, &info);
428 
429  if (info)
430  AMESOS_CHK_ERR(info);
431  }
432 
433  if (NumProcs_ != 1)
434  {
435  // I am not really sure that exporting the results make sense...
436  // It is just to be coherent with the other parts of the code.
437  Er.Import(*LocalEr, Epetra_Import(Er.Map(), SerialMap()), Insert);
438  Ei.Import(*LocalEi, Epetra_Import(Ei.Map(), SerialMap()), Insert);
439  }
440 
441  return(0);
442 }
443 
444 //=============================================================================
446 {
447  ResetTimer();
448 
449  if (MyPID_ == 0) {
451  int DenseSolverReturn = DenseSolver_.Factor();
452  if (DenseSolverReturn == 2 ) return NumericallySingularMatrixError ;
453  }
454 
455  NumFactTime_ = AddTime("Total numeric factorization time", NumFactTime_);
456  return(0);
457 }
458 
459 // ================================================ ====== ==== ==== == =
461 {
462  if (MyPID_) return;
463 
464  PrintLine();
465  std::string p = "Amesos_Lapack : ";
466 
467  int percentage = 0;
468  if (NumGlobalRows_ != 0)
469  percentage = static_cast<int>(NumGlobalNonzeros_ / (NumGlobalRows_ * NumGlobalRows_));
470 
471  std::cout << p << "Matrix has " << NumGlobalRows_ << " rows"
472  << " and " << NumGlobalNonzeros_ << " nonzeros" << std::endl;
473  if (NumGlobalRows_ != 0)
474  {
475  std::cout << p << "Nonzero elements per row = "
476  << 1.0 * NumGlobalNonzeros_ / NumGlobalRows_ << std::endl;
477  std::cout << p << "Percentage of nonzero elements = "
478  << 100.0 * percentage << std::endl;
479  }
480  std::cout << p << "Use transpose = " << UseTranspose_ << std::endl;
481 
482  PrintLine();
483 
484  return;
485 }
486 
487 // ================================================ ====== ==== ==== == =
489 {
490  if (MyPID_ != 0) return;
491 
492  double ConTime = GetTime(MtxConvTime_);
493  double MatTime = GetTime(MtxRedistTime_);
494  double VecTime = GetTime(VecRedistTime_);
495  double SymTime = GetTime(SymFactTime_);
496  double NumTime = GetTime(NumFactTime_);
497  double SolTime = GetTime(SolveTime_);
498 
499  if (NumSymbolicFact_)
500  SymTime /= NumSymbolicFact_;
501 
502  if (NumNumericFact_)
503  NumTime /= NumNumericFact_;
504 
505  if (NumSolve_)
506  SolTime /= NumSolve_;
507 
508  std::string p = "Amesos_Lapack : ";
509  PrintLine();
510 
511  std::cout << p << "Time to convert matrix to Klu format = "
512  << ConTime << " (s)" << std::endl;
513  std::cout << p << "Time to redistribute matrix = "
514  << MatTime << " (s)" << std::endl;
515  std::cout << p << "Time to redistribute vectors = "
516  << VecTime << " (s)" << std::endl;
517  std::cout << p << "Number of symbolic factorizations = "
518  << NumSymbolicFact_ << std::endl;
519  std::cout << p << "Time for sym fact = "
520  << SymTime << " (s), avg = " << SymTime << " (s)" << std::endl;
521  std::cout << p << "Number of numeric factorizations = "
522  << NumNumericFact_ << std::endl;
523  std::cout << p << "Time for num fact = "
524  << NumTime << " (s), avg = " << NumTime << " (s)" << std::endl;
525  std::cout << p << "Number of solve phases = "
526  << NumSolve_ << std::endl;
527  std::cout << p << "Time for solve = "
528  << SolTime << " (s), avg = " << SolTime << " (s)" << std::endl;
529 
530  PrintLine();
531 
532  return;
533 }
int NumSymbolicFact_
Number of symbolic factorization phases.
Definition: Amesos_Status.h:73
Amesos_Lapack(const Epetra_LinearProblem &LinearProblem)
Amesos_Lapack Constructor.
int SerialToDense()
Converts a serial matrix to dense format.
Teuchos::RCP< Epetra_CrsMatrix > SerialCrsMatrix_
void PrintLine() const
Prints line on std::cout.
Definition: Amesos_Utils.h:77
Epetra_SerialDenseMatrix DenseMatrix_
Dense matrix.
Epetra_MultiVector * GetLHS() const
Epetra_SerialDenseSolver DenseSolver_
Linear problem for dense matrix and vectors.
Epetra_MultiVector * GetRHS() const
void PrintStatus() const
Print information about the factorization and solution phases.
bool IsSymbolicFactorizationOK_
If true, SymbolicFactorization() has been successfully called.
Definition: Amesos_Status.h:54
T & get(ParameterList &l, const std::string &name)
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
Use this parameter list to read values from.
long long NumGlobalNonzeros_
int SolveDistributed(Epetra_MultiVector &X, const Epetra_MultiVector &B)
Solves the linear system, when more than one process is used.
const Epetra_Import & SolutionImporter()
Returns a reference to the solution importer (to domain map from serial map).
long long NumGlobalRows_
bool AddZeroToDiag_
Adds zero to diagonal of redistributed matrix (some solvers choke on a matrix with a partly empty dia...
Teuchos::RCP< Teuchos::ParameterList > pl_
RCP< ParameterList > sublist(const RCP< ParameterList > &paramList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
T * get() const
virtual const Epetra_Map & OperatorDomainMap() const =0
void CreateTimer(const Epetra_Comm &Comm, int size=1)
Initializes the Time object.
Definition: Amesos_Time.h:70
int DenseToFactored()
Factors the matrix using LAPACK.
int SetVectors(Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &B)
void SolveWithTranspose(bool Flag)
int NumNumericFact_
Number of numeric factorization phases.
Definition: Amesos_Status.h:75
virtual int MyPID() const =0
const Epetra_LinearProblem * GetProblem() const
Returns the Epetra_LinearProblem.
Teuchos::RCP< Teuchos::ParameterList > ParameterList_
double * A() const
int NumSolve_
Number of solves.
Definition: Amesos_Status.h:77
int SymbolicFactorization()
Performs SymbolicFactorization on the matrix A.
bool isParameter(const std::string &name) const
int GEEV(Epetra_Vector &Er, Epetra_Vector &Ei)
Computes the eigenvalues of the linear system matrix using DGEEV.
virtual int MaxNumEntries() const =0
virtual const Epetra_Map & OperatorRangeMap() const =0
Teuchos::RCP< Epetra_Export > RhsExporter_
void SetStatusParameters(const Teuchos::ParameterList &ParameterList)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual bool UseTranspose() const =0
void SetControlParameters(const Teuchos::ParameterList &ParameterList)
#define AMESOS_CHK_ERR(a)
bool isSublist(const std::string &name) const
virtual const Epetra_BlockMap & Map() const =0
bool UseTranspose_
If true, the linear system with the transpose will be solved.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
bool PrintTiming_
If true, prints timing information in the destructor.
Definition: Amesos_Status.h:58
virtual int NumMyRows() const =0
Teuchos::RCP< Epetra_RowMatrix > SerialMatrix_
bool PrintStatus_
If true, print additional information in the destructor.
Definition: Amesos_Status.h:60
~Amesos_Lapack(void)
Amesos_Lapack Destructor.
#define AMESOS_RETURN(amesos_err)
int AddTime(const std::string what, int dataID, const int timerID=0)
Adds to field what the time elapsed since last call to ResetTimer().
Definition: Amesos_Time.h:86
const Epetra_Export & RhsExporter()
Returns a reference to the rhs exporter (from range map to serial map).
virtual int Solve(void)
virtual long long NumGlobalNonzeros64() const =0
const Epetra_Map & SerialMap()
Returns a reference to serial map (that with all elements on process 0).
int MtxRedistTime_
Quick access ids for the individual timings.
int SetMatrix(Epetra_SerialDenseMatrix &A)
int SetParameters(Teuchos::ParameterList &ParameterList)
Deprecated - Sets parameters.
Teuchos::RCP< Epetra_Map > SerialMap_
virtual int NumProc() const =0
bool MatrixShapeOK() const
Returns true if the solver can handle this matrix shape.
Epetra_RowMatrix & SerialMatrix()
Returns a reference to serial matrix (that with all rows on process 0).
Teuchos::RCP< Epetra_Import > MatrixImporter_
const Epetra_LinearProblem * Problem_
Pointer to the linear problem.
void FactorWithEquilibration(bool Flag)
const int NumericallySingularMatrixError
void ResetTimer(const int timerID=0)
Resets the internally stored time object.
Definition: Amesos_Time.h:80
void GEEV(const char JOBVL, const char JOBVR, const int N, double *A, const int LDA, double *WR, double *WI, double *VL, const int LDVL, double *VR, const int LDVR, double *WORK, const int LWORK, int *INFO) const
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const =0
int DistributedToSerial()
Converts a distributed matrix to serial matrix.
Epetra_CrsMatrix & SerialCrsMatrix()
int NumericFactorization()
Performs NumericFactorization on the matrix A.
int verbose_
Toggles the output level.
Definition: Amesos_Status.h:67
double GetTime(const std::string what) const
Gets the cumulative time using the string.
Definition: Amesos_Time.h:108
long long NumGlobalRows64() const
int Shape(int NumRows, int NumCols)
Teuchos::RCP< Epetra_Import > SolutionImporter_
const Epetra_RowMatrix * Matrix() const
Returns a pointer to the linear system matrix.
bool IsNumericFactorizationOK_
If true, NumericFactorization() has been successfully called.
Definition: Amesos_Status.h:56
int Solve()
Solves A X = B (or AT x = B)
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
This is an empty stub.
int n
virtual int Factor(void)
int SolveSerial(Epetra_MultiVector &X, const Epetra_MultiVector &B)
Solves the linear system, when only one process is used.
void PrintTiming() const
Print timing information.
virtual long long NumGlobalRows64() const =0
bool UseTranspose() const
Returns the current UseTranspose setting.
const Epetra_Import & MatrixImporter()
Returns a reference to the matrix importer (from row map to serial map).
double AddToDiag_
Add this value to the diagonal.