45 #include "Epetra_RowMatrix.h"
109 if ((row < 0) || (row >=
NumRows())) {
113 if ((col < 0) || (col >=
NumRows())) {
134 #ifdef IFPACK_FLOPCOUNTERS
151 for (
int j = 0 ; j <
NumRows_ ; ++j) {
162 std::vector<double> Values;
163 Values.resize(Length);
164 std::vector<int> Indices;
165 Indices.resize(Length);
167 for (
int j = 0 ; j <
NumRows_ ; ++j) {
175 &Values[0], &Indices[0]);
178 for (
int k = 0 ; k < NumEntries ; ++k) {
180 int LCID = Indices[k];
190 for (
int kk = 0 ; kk <
NumRows_ ; ++kk)
224 Label_ =
"Ifpack_DenseContainer";
227 #ifdef IFPACK_FLOPCOUNTERS
247 #ifdef IFPACK_FLOPCOUNTERS
258 os <<
"================================================================================" << endl;
259 os <<
"Ifpack_DenseContainer" << endl;
260 os <<
"Number of rows = " <<
NumRows() << endl;
261 os <<
"Number of vectors = " <<
NumVectors() << endl;
263 os <<
"IsComputed() = " <<
IsComputed() << endl;
264 #ifdef IFPACK_FLOPCOUNTERS
265 os <<
"Flops in Compute() = " <<
ComputeFlops() << endl;
268 os <<
"================================================================================" << endl;
virtual double ComputeFlops() const
Returns the flops in Compute().
Epetra_SerialDenseMatrix NonFactoredMatrix_
Dense matrix, that contains the non-factored matrix.
virtual const Epetra_IntSerialDenseVector & ID() const
Returns the integer dense vector of IDs.
virtual int Compute(const Epetra_RowMatrix &Matrix_in)
Finalizes the linear system matrix and prepares for the application of the inverse.
virtual std::ostream & Print(std::ostream &os) const
Prints basic information on iostream. This function is used by operator<<.
virtual int SetMatrixElement(const int row, const int col, const double value)
Set the matrix element (row,col) to value.
int SetVectors(Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &B)
virtual int NumVectors() const
Returns the number of vectors in LHS/RHS.
Epetra_SerialDenseMatrix RHS_
Dense vector representing the RHS.
virtual double ApplyInverseFlops() const
Returns the flops in ApplyInverse().
Epetra_SerialDenseSolver Solver_
Dense solver (solution will be get using LAPACK).
virtual bool IsInitialized() const
Returns true is the container has been successfully initialized.
virtual int MaxNumEntries() const =0
virtual int Extract(const Epetra_RowMatrix &Matrix_in)
Extract the submatrices identified by the ID set int ID().
bool IsInitialized_
If true, the container has been successfully initialized.
double ApplyFlops_
Flops in Apply().
virtual int Apply()
Apply the matrix to RHS, results are stored in LHS.
virtual bool IsComputed() const
Returns true is the container has been successfully computed.
int NumRows_
Number of rows in the container.
virtual const Epetra_SerialDenseMatrix & LHS() const
Returns the dense vector containing the LHS.
virtual int NumMyRows() const =0
std::string Label_
Label for this object.
Epetra_IntSerialDenseVector ID_
Sets of local rows.
virtual int Initialize()
Initialize the container.
int Reshape(int NumRows, int NumCols)
virtual int ApplyInverse()
Apply the inverse of the matrix to RHS, results are stored in LHS.
virtual int NumRows() const
Returns the number of rows of the matrix and LHS/RHS.
int SetMatrix(Epetra_SerialDenseMatrix &A)
Epetra_SerialDenseMatrix Matrix_
Dense matrix.
int Multiply(char TransA, char TransB, double ScalarAB, const Epetra_SerialDenseMatrix &A, const Epetra_SerialDenseMatrix &B, double ScalarThis)
int NumVectors_
Number of vectors in the container.
bool IsComputed_
If true, the container has been successfully computed.
int Reshape(int NumRows, int NumCols)
double ComputeFlops_
Flops in Compute().
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const =0
double ApplyInverseFlops_
Flops in ApplyInverse().
#define IFPACK_CHK_ERR(ifpack_err)
bool KeepNonFactoredMatrix_
If true, keeps a copy of the non-factored matrix.
Epetra_SerialDenseMatrix LHS_
Dense vector representing the LHS.
virtual const Epetra_SerialDenseMatrix & RHS() const
Returns the dense vector containing the RHS.