Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Amesos_Component.h
Go to the documentation of this file.
1 /*
2  I think that Amesos_Component should be an additional interface and
3  hence functions which do not differ from the Amesos_BaseSolver class
4  are not included here.
5  */
6 /*
7 // @HEADER
8 // ***********************************************************************
9 //
10 // Amesos: Direct Sparse Solver Package
11 // Copyright (2004) Sandia Corporation
12 //
13 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
14 // license for use of this work by or on behalf of the U.S. Government.
15 //
16 // This library is free software; you can redistribute it and/or modify
17 // it under the terms of the GNU Lesser General Public License as
18 // published by the Free Software Foundation; either version 2.1 of the
19 // License, or (at your option) any later version.
20 //
21 // This library is distributed in the hope that it will be useful, but
22 // WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 // Lesser General Public License for more details.
25 //
26 // You should have received a copy of the GNU Lesser General Public
27 // License along with this library; if not, write to the Free Software
28 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
29 // USA
30 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
31 //
32 // ***********************************************************************
33 // @HEADER
34 */
35 
36 #ifndef _AMESOS_COMPONENTBASESOLVER_H_
37 #define _AMESOS_COMPONENTBASESOLVER_H_
38 
39 #if defined(Amesos_SHOW_DEPRECATED_WARNINGS)
40 #ifdef __GNUC__
41 #warning "The Amesos package is deprecated"
42 #endif
43 #endif
44 
46 #include "Epetra_LinearProblem.h"
48 class Epetra_MultiVector;
49 class Epetra_Map;
50 class Epetra_Comm;
51 
53 
119 
120  public:
121 
123  virtual ~Amesos_Component() {};
126 
128 
129 
131 
136  virtual int PartialFactorization() = 0;
137 
139 
144  virtual int Lsolve() = 0;
145 
147 
152  virtual int Usolve() = 0;
153 
155 
157 
159  virtual int SetRowPermutation( int* RowPermutation ) = 0;
160 
162  virtual int SetColumnPermutation( int* ColumnPermutation ) = 0;
163 
165  virtual int SetSubMatrixSize( int SubMatrixSize ) = 0;
166 
168 
179  virtual int GetRowPermutation( int** RowPermutation ) = 0;
180 
182 
193  virtual int GetColumnPermutation( int** ColumnPermutation ) = 0;
194 
196  /*
197  SubMatrixSize is the number of rows and columns in the matrix
198  that was factored. (i.e. the number of columns of L and the
199  number of rows of U)
200  */
201  virtual int GetSubMatrixSize( int* SubMatrixSize ) = 0;
202 
204  /*
205  SchurComplement is a square matrix with each side having size
206  MatrixSize-SubMatrixSize which contains the Schur
207  complement based on the matrices L and U, i.e.
208  L(SubMatrixSize+1:MatrixSize,1:SubMatrixSize) *
209  U(1:SubMatrixSize,SubMatrixSize+1:MatrixSize)
210  */
211  virtual int GetSchurComplement( Epetra_CrsMatrix* SchurComplement ) = 0;
212 
214 
215 };
216 
217 #endif /* _AMESOS_COMPONENTBASESOLVER_H_ */
virtual int Lsolve()=0
Solves L X = B (or LT x = B)
virtual int SetSubMatrixSize(int SubMatrixSize)=0
SetSubMatrixSize.
Amesos_Component: A pure virtual class for direct solvers to be used within Amesos_Merikos to form a ...
virtual ~Amesos_Component()
Destructor.
virtual int SetColumnPermutation(int *ColumnPermutation)=0
SetColumnPermutation.
virtual int PartialFactorization()=0
Performs partial factorization on the matrix A.
virtual int GetColumnPermutation(int **ColumnPermutation)=0
GetColumnPermutation.
virtual int GetSchurComplement(Epetra_CrsMatrix *SchurComplement)=0
GetSchurComplement.
virtual int GetRowPermutation(int **RowPermutation)=0
GetRowPermutation.
virtual int GetSubMatrixSize(int *SubMatrixSize)=0
GetSubMatrixSize.
virtual int Usolve()=0
Solves L X = B (or LT x = B)
virtual int SetRowPermutation(int *RowPermutation)=0
SetRowPermutation.