44 #ifndef _fei_MatrixTraits_Aztec_hpp_
45 #define _fei_MatrixTraits_Aztec_hpp_
47 #include <fei_trilinos_macros.hpp>
49 #ifdef HAVE_FEI_AZTECOO
55 #include <fei_MatrixTraits.hpp>
56 #include <snl_fei_BlockMatrixTraits.hpp>
57 #include <fei_VectorTraits_Aztec.hpp>
58 #include <fei_Include_Trilinos.hpp>
59 #include <fei_Vector_Impl.hpp>
69 struct MatrixTraits<AztecDMSR_Matrix> {
71 {
return(
"fei::AztecDMSR_Matrix"); }
73 static int setValues(AztecDMSR_Matrix* mat,
double scalar)
75 return( mat->put(scalar) );
80 numRows = mat->getAztec_Map().localSize();
84 static int getRowLength(AztecDMSR_Matrix* mat,
int row,
int& length)
86 length = mat->rowLength(row);
87 if (length < 0)
return(-1);
92 int row,
int len,
double* coefs,
int* indices)
95 mat->getRow(row, dummy, coefs, indices);
100 int numRows,
const int* rows,
101 int numCols,
const int* cols,
102 const double*
const* values,
107 err = mat->sumIntoRow(numRows, rows, numCols, cols, coefs);
110 for(
int i=0; i<numRows; ++i) {
111 err = mat->putRow(rows[i], numCols, values[i], cols);
122 if (!mat->isFilled()) {
123 int err = mat->fillComplete();
126 <<
" ERROR in mat->fillComplete" << FEI_ENDL;
134 static int matvec(AztecDMSR_Matrix* mat,
143 if (avx == NULL || avy == NULL) {
150 return( mat->matvec(*ax, *ay) );
164 struct BlockMatrixTraits<AztecDVBR_Matrix> {
166 {
return(
"fei::AztecDVBR_Matrix"); }
168 static int putScalar(AztecDVBR_Matrix* mat,
double scalar)
170 return( mat->put(scalar) );
173 static int getRowLength(AztecDVBR_Matrix* mat,
int row,
int& length)
184 int row,
int numBlkCols,
196 int firstLocalOffset,
206 static int sumIn(AztecDVBR_Matrix* mat,
210 const int* blockCols,
213 const double* values)
218 static int copyIn(AztecDVBR_Matrix* mat,
222 const int* blockCols,
225 const double* values)
230 static int sumIn(AztecDVBR_Matrix* mat,
237 const double*
const* values)
242 static int copyIn(AztecDVBR_Matrix* mat,
249 const double*
const* values)
256 return( mat->loadComplete() );
260 #endif //HAVE_FEI_AZTECOO
261 #endif // _fei_MatrixTraits_Aztec_hpp_
static int getPointRowLength(T *, int, int &)
static int copyIn(T *, int, int, int, const int *, const int *, int, const double *)
static const char * typeName()
static int matvec(T *A, fei::Vector *x, fei::Vector *y)
static int getRowLength(T *mat, int row, int &length)
static int copyOutPointRow(T *, int, int, int, double *, int *, int &)
static int getNumLocalRows(T *mat, int &numRows)
static const char * typeName()
static int getRowLength(T *, int, int &)
static int putScalar(T *, double)
std::ostream & console_out()
static int copyOutRow(T *, int, int, int, int *, int *, double *, int, int &)
T * getUnderlyingVector()
static int setValues(T *mat, double scalar)
static int sumIn(T *, int, int, int, const int *, const int *, int, const double *)
static int copyOutRow(T *mat, int row, int len, double *coefs, int *indices)
static int putValuesIn(T *mat, int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sum_into)
static int globalAssemble(T *A)
static int globalAssemble(T *)