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 #include "Amesos_ConfigDefs.h"
35 #include "Amesos_BaseSolver.h"
36 #include "Epetra_LinearProblem.h"
37 #include "Epetra_Time.h"
38 #ifdef EPETRA_MPI
39 #include "Epetra_MpiComm.h"
40 #else
41 #include "Epetra_Comm.h"
42 #endif
43 #include "Epetra_CrsGraph.h"
44 
45 
47 
62 class Amesos_Btf: public Amesos_BaseSolver {
63 
64 public:
65 
67 
75  Amesos_Btf(const Epetra_LinearProblem& LinearProblem );
76 
78 
80  ~Amesos_Btf(void);
82 
84 
86 
98  int SymbolicFactorization() ;
99 
101 
108  int NumericFactorization() ;
109 
111 
123  int Solve();
124 
126 
128 
130  const Epetra_LinearProblem *GetProblem() const { return(Problem_); };
131 
133 
136  bool MatrixShapeOK() const ;
137 
139 
152 
154  bool UseTranspose() const {return(UseTranspose_);};
155 
157  const Epetra_Comm & Comm() const {return(GetProblem()->GetOperator()->Comm());};
158 
160 
176  int SetParameters( Teuchos::ParameterList &ParameterList ) ;
177 
179  int NumSymbolicFact() const { return( NumSymbolicFact_ ); }
180 
182  int NumNumericFact() const { return( NumNumericFact_ ); }
183 
185  int NumSolve() const { return( NumSolve_ ); }
186 
188  void PrintTiming();
189 
191  void PrintStatus();
192 
194 
195 private:
198 
203 
204  int verbose_;
205  int debug_;
206 
207  // some timing internal, copied from MUMPS
208  double ConTime_; // time to convert to BTF format
209  double SymTime_; // time for symbolic factorization
210  double NumTime_; // time for numeric factorization
211  double SolTime_; // time for solution
212  double VecTime_; // time to redistribute vectors
213  double MatTime_; // time to redistribute matrix
214 
217  int NumSolve_;
218 
220 
221 }; // End of class Amesos_Btf
222 #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:202
bool ComputeVectorNorms_
Definition: Amesos_BTF.h:201
bool PrintTiming_
Definition: Amesos_BTF.h:199
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:157
double SymTime_
Definition: Amesos_BTF.h:209
double NumTime_
Definition: Amesos_BTF.h:210
int NumSolve_
Definition: Amesos_BTF.h:217
int NumNumericFact() const
Returns the number of numeric factorizations performed by this object.
Definition: Amesos_BTF.h:182
void PrintTiming()
Print timing information.
int NumSolve() const
Returns the number of solves performed by this object.
Definition: Amesos_BTF.h:185
~Amesos_Btf(void)
Amesos_Btf Destructor.
double MatTime_
Definition: Amesos_BTF.h:213
int NumSymbolicFact() const
Returns the number of symbolic factorizations performed by this object.
Definition: Amesos_BTF.h:179
Amesos_Status: Container for some status variables.
Definition: Amesos_Status.h:20
int NumericFactorization()
Performs NumericFactorization on the matrix A.
const Epetra_LinearProblem * Problem_
Definition: Amesos_BTF.h:197
int SymbolicFactorization()
Performs SymbolicFactorization on the matrix A.
int NumNumericFact_
Definition: Amesos_BTF.h:216
double SolTime_
Definition: Amesos_BTF.h:211
void PrintStatus()
Print information about the factorization and solution phases.
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: Amesos_BTF.h:154
bool PrintStatus_
Definition: Amesos_BTF.h:200
bool UseTranspose_
Definition: Amesos_BTF.h:196
Epetra_Time * Time_
Definition: Amesos_BTF.h:219
int SetUseTranspose(bool UseTranspose)
SetUseTranpose(true) causes Solve() To compute A^T X = B.
Definition: Amesos_BTF.h:151
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:130
double ConTime_
Definition: Amesos_BTF.h:208
int NumSymbolicFact_
Definition: Amesos_BTF.h:215
double VecTime_
Definition: Amesos_BTF.h:212
int verbose_
Definition: Amesos_BTF.h:204
Amesos_Btf: Factors and solves a matrix after converting it to block triangular form.
Definition: Amesos_BTF.h:62