|
Ifpack Package Browser (Single Doxygen Collection)
Development
|
Go to the documentation of this file.
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 int Extract(const Epetra_RowMatrix &Matrix_in)
Extract the submatrices identified by the ID set int ID().
int NumRows_
Number of rows in the container.
std::string Label_
Label for this object.
int Reshape(int NumRows, int NumCols)
double ComputeFlops_
Flops in Compute().
virtual int Apply()
Apply the matrix to RHS, results are stored in LHS.
virtual int NumVectors() const
Returns the number of vectors in LHS/RHS.
bool IsComputed_
If true, the container has been successfully computed.
virtual std::ostream & Print(std::ostream &os) const
Prints basic information on iostream. This function is used by operator<<.
Epetra_SerialDenseMatrix Matrix_
Dense matrix.
virtual int NumRows() const
Returns the number of rows of the matrix and LHS/RHS.
bool KeepNonFactoredMatrix_
If true, keeps a copy of the non-factored matrix.
virtual int ApplyInverse()
Apply the inverse of the matrix to RHS, results are stored in LHS.
int NumVectors_
Number of vectors in the container.
#define IFPACK_CHK_ERR(ifpack_err)
int SetMatrix(Epetra_SerialDenseMatrix &A)
double ApplyInverseFlops_
Flops in ApplyInverse().
virtual int NumMyRows() const=0
Epetra_SerialDenseMatrix NonFactoredMatrix_
Dense matrix, that contains the non-factored matrix.
Epetra_SerialDenseMatrix LHS_
Dense vector representing the LHS.
virtual const Epetra_IntSerialDenseVector & ID() const
Returns the integer dense vector of IDs.
virtual const Epetra_SerialDenseMatrix & RHS() const
Returns the dense vector containing the RHS.
virtual int Compute(const Epetra_RowMatrix &Matrix_in)
Finalizes the linear system matrix and prepares for the application of the inverse.
virtual bool IsInitialized() const
Returns true is the container has been successfully initialized.
virtual const Epetra_SerialDenseMatrix & LHS() const
Returns the dense vector containing the LHS.
int Reshape(int NumRows, int NumCols)
Epetra_SerialDenseMatrix RHS_
Dense vector representing the RHS.
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const=0
virtual int MaxNumEntries() const=0
Epetra_SerialDenseSolver Solver_
Dense solver (solution will be get using LAPACK).
bool IsInitialized_
If true, the container has been successfully initialized.
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)
double ApplyFlops_
Flops in Apply().
int Multiply(char TransA, char TransB, double ScalarAB, const Epetra_SerialDenseMatrix &A, const Epetra_SerialDenseMatrix &B, double ScalarThis)
virtual double ApplyInverseFlops() const
Returns the flops in ApplyInverse().
Epetra_IntSerialDenseVector ID_
Sets of local rows.
virtual int Initialize()
Initialize the container.
virtual double ComputeFlops() const
Returns the flops in Compute().
virtual bool IsComputed() const
Returns true is the container has been successfully computed.