45 #include "Epetra_RowMatrix.h"
71 memset(
Matrix_.
A(),0,
sizeof(
double)*size);
113 if ((row < 0) || (row >=
NumRows())) {
117 if ((col < 0) || (col >=
NumRows())) {
138 #ifdef IFPACK_FLOPCOUNTERS
155 for (
int j = 0 ; j <
NumRows_ ; ++j) {
166 std::vector<double> Values;
167 Values.resize(Length);
168 std::vector<int> Indices;
169 Indices.resize(Length);
171 for (
int j = 0 ; j <
NumRows_ ; ++j) {
179 &Values[0], &Indices[0]);
182 for (
int k = 0 ; k < NumEntries ; ++k) {
184 int LCID = Indices[k];
194 for (
int kk = 0 ; kk <
NumRows_ ; ++kk)
228 Label_ =
"Ifpack_TriDiContainer";
231 #ifdef IFPACK_FLOPCOUNTERS
263 os <<
"================================================================================" << endl;
264 os <<
"Ifpack_TriDiContainer" << endl;
265 os <<
"Number of rows = " <<
NumRows() << endl;
266 os <<
"Number of vectors = " <<
NumVectors() << endl;
268 os <<
"IsComputed() = " <<
IsComputed() << endl;
269 #ifdef IFPACK_FLOPCOUNTERS
270 os <<
"Flops in Compute() = " <<
ComputeFlops() << endl;
273 os <<
"================================================================================" << endl;
#define IFPACK_CHK_ERR(ifpack_err)
int Reshape(int NumRows, int NumCols)
virtual int NumMyRows() const=0
virtual int MaxNumEntries() const=0
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const=0
int Reshape(int NumRows, int NumCols)
int Shape(int NumRowCol)
Set dimensions of a Ifpack_SerialTriDiMatrix object; init values to zero.
double * A() const
Returns pointer to the this matrix.
int SetMatrix(Ifpack_SerialTriDiMatrix &A)
Sets the pointers for coefficient matrix.
virtual int Solve(void)
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors()....
virtual int Factor(void)
Computes the in-place LU factorization of the matrix using the LAPACK routine DGETRF.
int SetVectors(Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &B)
Sets the pointers for left and right hand side vector(s).
virtual double ComputeFlops() const
Returns the flops in Compute().
virtual bool IsInitialized() const
Returns true is the container has been successfully initialized.
virtual int Compute(const Epetra_RowMatrix &Matrix_in)
Finalizes the linear system matrix and prepares for the application of the inverse.
virtual const Epetra_IntSerialDenseVector & ID() const
Returns the integer dense vector of IDs.
virtual int ApplyInverse()
Apply the inverse of the matrix to RHS, results are stored in LHS.
virtual int Initialize()
Initialize the container.
int NumRows_
Number of rows in the container.
virtual int Apply()
Apply the matrix to RHS, results are stored in LHS.
Epetra_SerialDenseMatrix LHS_
SerialDense vector representing the LHS.
Epetra_SerialDenseMatrix RHS_
SerialDense vector representing the RHS.
virtual double ApplyInverseFlops() const
Returns the flops in ApplyInverse().
Ifpack_SerialTriDiMatrix NonFactoredMatrix_
TriDi matrix, that contains the non-factored matrix.
double ApplyInverseFlops_
Flops in ApplyInverse().
virtual const Epetra_SerialDenseMatrix & LHS() const
Returns the dense vector containing the LHS.
virtual int SetMatrixElement(const int row, const int col, const double value)
Set the matrix element (row,col) to value.
Epetra_IntSerialDenseVector ID_
Sets of local rows.
Ifpack_SerialTriDiMatrix Matrix_
TriDi matrix.
bool IsComputed_
If true, the container has been successfully computed.
Ifpack_SerialTriDiSolver Solver_
TriDi solver (solution will be get using LAPACK).
bool IsInitialized_
If true, the container has been successfully initialized.
virtual int Extract(const Epetra_RowMatrix &Matrix_in)
Extract the submatrices identified by the ID set int ID().
virtual const Epetra_SerialDenseMatrix & RHS() const
Returns the dense vector containing the RHS.
virtual int NumRows() const
Returns the number of rows of the matrix and LHS/RHS.
std::string Label_
Label for this object.
virtual bool IsComputed() const
Returns true is the container has been successfully computed.
double ComputeFlops_
Flops in Compute().
bool KeepNonFactoredMatrix_
If true, keeps a copy of the non-factored matrix.
int NumVectors_
Number of vectors in the container.
virtual std::ostream & Print(std::ostream &os) const
Prints basic information on iostream. This function is used by operator<<.
virtual int NumVectors() const
Returns the number of vectors in LHS/RHS.