Amesos Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
Amesos_BTF.h
Go to the documentation of this file.
1This 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
63
64public:
65
67
75 Amesos_Btf(const Epetra_LinearProblem& LinearProblem );
76
78
82
84
86
99
101
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
189
192
194
195private:
197 const Epetra_LinearProblem * Problem_;
198
203
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
218
219 Epetra_Time * Time_;
220
221}; // End of class Amesos_Btf
222#endif /* _AMESOS_BTF_H_ */
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
Amesos_Btf: Factors and solves a matrix after converting it to block triangular form.
Definition: Amesos_BTF.h:62
int NumSymbolicFact_
Definition: Amesos_BTF.h:215
int NumNumericFact_
Definition: Amesos_BTF.h:216
bool ComputeVectorNorms_
Definition: Amesos_BTF.h:201
Amesos_Btf(const Epetra_LinearProblem &LinearProblem)
Amesos_Btf Constructor.
void PrintTiming()
Print timing information.
int SymbolicFactorization()
Performs SymbolicFactorization on the matrix A.
bool PrintTiming_
Definition: Amesos_BTF.h:199
int NumSolve() const
Returns the number of solves performed by this object.
Definition: Amesos_BTF.h:185
double ConTime_
Definition: Amesos_BTF.h:208
int NumericFactorization()
Performs NumericFactorization on the matrix A.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
Definition: Amesos_BTF.h:157
int NumNumericFact() const
Returns the number of numeric factorizations performed by this object.
Definition: Amesos_BTF.h:182
const Epetra_LinearProblem * GetProblem() const
Get a pointer to the Problem.
Definition: Amesos_BTF.h:130
Epetra_Time * Time_
Definition: Amesos_BTF.h:219
double MatTime_
Definition: Amesos_BTF.h:213
~Amesos_Btf(void)
Amesos_Btf Destructor.
bool UseTranspose_
Definition: Amesos_BTF.h:196
int NumSolve_
Definition: Amesos_BTF.h:217
double SolTime_
Definition: Amesos_BTF.h:211
bool MatrixShapeOK() const
Returns true if BTF can handle this matrix shape.
const Epetra_LinearProblem * Problem_
Definition: Amesos_BTF.h:197
bool ComputeTrueResidual_
Definition: Amesos_BTF.h:202
bool PrintStatus_
Definition: Amesos_BTF.h:200
bool UseTranspose() const
Returns the current UseTranspose setting.
Definition: Amesos_BTF.h:154
int Solve()
Solves A X = B (or AT X = B)
int SetParameters(Teuchos::ParameterList &ParameterList)
Updates internal variables.
int NumSymbolicFact() const
Returns the number of symbolic factorizations performed by this object.
Definition: Amesos_BTF.h:179
double VecTime_
Definition: Amesos_BTF.h:212
double SymTime_
Definition: Amesos_BTF.h:209
double NumTime_
Definition: Amesos_BTF.h:210
void PrintStatus()
Print information about the factorization and solution phases.
int SetUseTranspose(bool UseTranspose)
SetUseTranpose(true) causes Solve() To compute A^T X = B.
Definition: Amesos_BTF.h:151
int verbose_
Definition: Amesos_BTF.h:204
Amesos_Status: Container for some status variables.
Definition: Amesos_Status.h:21