41 #ifndef EPETRAEXT_MATRIXMATRIX_H 42 #define EPETRAEXT_MATRIXMATRIX_H 46 class Epetra_CrsMatrix;
55 class CrsMatrixStruct;
101 static int Multiply(
const Epetra_CrsMatrix& A,
103 const Epetra_CrsMatrix& B,
106 bool call_FillComplete_on_result=
true,
107 bool keep_all_hard_zeros=
false);
124 static int Add(
const Epetra_CrsMatrix& A,
151 static int Add(
const Epetra_CrsMatrix& A,
154 const Epetra_CrsMatrix & B,
157 Epetra_CrsMatrix * & C);
185 static int Jacobi(
double omega,
186 const Epetra_Vector & Dinv,
187 const Epetra_CrsMatrix& A,
188 const Epetra_CrsMatrix& B,
190 bool call_FillComplete_on_result=
true);
193 template<
typename int_type>
194 static int Tmult_A_B(
const Epetra_CrsMatrix & A,
196 const Epetra_CrsMatrix & B,
199 bool call_FillComplete_on_result,
200 bool keep_all_hard_zeros);
202 static int mult_A_B(
const Epetra_CrsMatrix & A,
204 const Epetra_CrsMatrix & B,
207 bool call_FillComplete_on_result,
208 bool keep_all_hard_zeros);
210 template<
typename int_type>
213 Epetra_CrsMatrix & C,
214 bool keep_all_hard_zeros);
218 Epetra_CrsMatrix & C,
219 bool keep_all_hard_zeros);
221 template<
typename int_type>
222 static int TMultiply(
const Epetra_CrsMatrix& A,
224 const Epetra_CrsMatrix& B,
227 bool call_FillComplete_on_result,
228 bool keep_all_hard_zeros);
230 template<
typename int_type>
231 static int TAdd(
const Epetra_CrsMatrix& A,
237 template<
typename int_type>
238 static int TAdd(
const Epetra_CrsMatrix& A,
241 const Epetra_CrsMatrix & B,
244 Epetra_CrsMatrix * & C);
246 template<
typename int_type>
247 static int Tjacobi_A_B(
double omega,
248 const Epetra_Vector & Dinv,
249 const Epetra_CrsMatrix & A,
251 const Epetra_CrsMatrix & B,
254 bool call_FillComplete_on_result);
256 static int jacobi_A_B(
double omega,
257 const Epetra_Vector & Dinv,
258 const Epetra_CrsMatrix & A,
260 const Epetra_CrsMatrix & B,
263 bool call_FillComplete_on_result);
265 template<
typename int_type>
266 static int TJacobi(
double omega,
267 const Epetra_Vector & Dinv,
268 const Epetra_CrsMatrix& A,
269 const Epetra_CrsMatrix& B,
271 bool call_FillComplete_on_result);
282 template<
typename int_type>
283 double sparsedot(
double* u, int_type* u_ind,
int u_len,
284 double* v, int_type* v_ind,
int v_len);
static int Multiply(const Epetra_CrsMatrix &A, bool transposeA, const Epetra_CrsMatrix &B, bool transposeB, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true, bool keep_all_hard_zeros=false)
Given Epetra_CrsMatrix objects A, B and C, form the product C = A*B.
virtual ~MatrixMatrix()
destructor
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.
Collection of matrix-matrix operations.
static int Add(const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB)
Given Epetra_CrsMatrix objects A and B, form the sum B = a*A + b*B.
double sparsedot(double *u, int_type *u_ind, int u_len, double *v, int_type *v_ind, int v_len)
Method for internal use...
static int Jacobi(double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true)
Given Epetra_CrsMatrix objects A, B and C, and Epetra_Vector Dinv, form the product C = (I-omega * Di...