Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Amesos_BTF.h
Go to the documentation of this file.
1 This file is out of date. Is has not been refactored to use Amesos_Status.
2 
3 // @HEADER
4 // ***********************************************************************
5 //
6 // Amesos: Direct Sparse Solver Package
7 // Copyright (2004) Sandia Corporation
8 //
9 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
10 // license for use of this work by or on behalf of the U.S. Government.
11 //
12 // This library is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU Lesser General Public License as
14 // published by the Free Software Foundation; either version 2.1 of the
15 // License, or (at your option) any later version.
16 //
17 // This library is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public
23 // License along with this library; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
25 // USA
26 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
27 //
28 // ***********************************************************************
29 // @HEADER
30 
31 #ifndef _AMESOS_BTF_H_
32 #define _AMESOS_BTF_H_
33 
34 #if defined(Amesos_SHOW_DEPRECATED_WARNINGS)
35 #ifdef __GNUC__
36 #warning "The Amesos package is deprecated"
37 #endif
38 #endif
39 
40 #include "Amesos_ConfigDefs.h"
41 #include "Amesos_BaseSolver.h"
42 #include "Epetra_LinearProblem.h"
43 #include "Epetra_Time.h"
44 #ifdef EPETRA_MPI
45 #include "Epetra_MpiComm.h"
46 #else
47 #include "Epetra_Comm.h"
48 #endif
49 #include "Epetra_CrsGraph.h"
50 
51 
53 
68 class Amesos_Btf: public Amesos_BaseSolver {
69 
70 public:
71 
73 
81  Amesos_Btf(const Epetra_LinearProblem& LinearProblem );
82 
84 
86  ~Amesos_Btf(void);
88 
90 
92 
104  int SymbolicFactorization() ;
105 
107 
114  int NumericFactorization() ;
115 
117 
129  int Solve();
130 
132 
134 
136  const Epetra_LinearProblem *GetProblem() const { return(Problem_); };
137 
139 
142  bool MatrixShapeOK() const ;
143 
145 
158 
160  bool UseTranspose() const {return(UseTranspose_);};
161 
163  const Epetra_Comm & Comm() const {return(GetProblem()->GetOperator()->Comm());};
164 
166 
182  int SetParameters( Teuchos::ParameterList &ParameterList ) ;
183 
185  int NumSymbolicFact() const { return( NumSymbolicFact_ ); }
186 
188  int NumNumericFact() const { return( NumNumericFact_ ); }
189 
191  int NumSolve() const { return( NumSolve_ ); }
192 
194  void PrintTiming();
195 
197  void PrintStatus();
198 
200 
201 private:
204 
209 
210  int verbose_;
211  int debug_;
212 
213  // some timing internal, copied from MUMPS
214  double ConTime_; // time to convert to BTF format
215  double SymTime_; // time for symbolic factorization
216  double NumTime_; // time for numeric factorization
217  double SolTime_; // time for solution
218  double VecTime_; // time to redistribute vectors
219  double MatTime_; // time to redistribute matrix
220 
223  int NumSolve_;
224 
226 
227 }; // End of class Amesos_Btf
228 #endif /* _AMESOS_BTF_H_ */
bool MatrixShapeOK() const
Returns true if BTF can handle this matrix shape.
Amesos_Btf(const Epetra_LinearProblem &LinearProblem)
Amesos_Btf Constructor.
bool ComputeTrueResidual_
Definition: Amesos_BTF.h:208
bool ComputeVectorNorms_
Definition: Amesos_BTF.h:207
bool PrintTiming_
Definition: Amesos_BTF.h:205
int SetParameters(Teuchos::ParameterList &ParameterList)
Updates internal variables.
int Solve()
Solves A X = B (or AT X = B)
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
Definition: Amesos_BTF.h:163
double SymTime_
Definition: Amesos_BTF.h:215
double NumTime_
Definition: Amesos_BTF.h:216
int NumSolve_
Definition: Amesos_BTF.h:223
int NumNumericFact() const
Returns the number of numeric factorizations performed by this object.
Definition: Amesos_BTF.h:188
void PrintTiming()
Print timing information.
int NumSolve() const
Returns the number of solves performed by this object.
Definition: Amesos_BTF.h:191
~Amesos_Btf(void)
Amesos_Btf Destructor.
double MatTime_
Definition: Amesos_BTF.h:219
int NumSymbolicFact() const
Returns the number of symbolic factorizations performed by this object.
Definition: Amesos_BTF.h:185
Amesos_Status: Container for some status variables.
Definition: Amesos_Status.h:26
int NumericFactorization()
Performs NumericFactorization on the matrix A.
const Epetra_LinearProblem * Problem_
Definition: Amesos_BTF.h:203
int SymbolicFactorization()
Performs SymbolicFactorization on the matrix A.
int NumNumericFact_
Definition: Amesos_BTF.h:222
double SolTime_
Definition: Amesos_BTF.h:217
void PrintStatus()
Print information about the factorization and solution phases.
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: Amesos_BTF.h:160
bool PrintStatus_
Definition: Amesos_BTF.h:206
bool UseTranspose_
Definition: Amesos_BTF.h:202
Epetra_Time * Time_
Definition: Amesos_BTF.h:225
int SetUseTranspose(bool UseTranspose)
SetUseTranpose(true) causes Solve() To compute A^T X = B.
Definition: Amesos_BTF.h:157
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
const Epetra_LinearProblem * GetProblem() const
Get a pointer to the Problem.
Definition: Amesos_BTF.h:136
double ConTime_
Definition: Amesos_BTF.h:214
int NumSymbolicFact_
Definition: Amesos_BTF.h:221
double VecTime_
Definition: Amesos_BTF.h:218
int verbose_
Definition: Amesos_BTF.h:210
Amesos_Btf: Factors and solves a matrix after converting it to block triangular form.
Definition: Amesos_BTF.h:68