44 #ifndef EPETRA_BASICROWMATRIX_H
45 #define EPETRA_BASICROWMATRIX_H
176 virtual int ExtractMyRowCopy(
int MyRow,
int Length,
int & NumEntries,
double *Values,
int * Indices)
const = 0;
187 virtual int ExtractMyEntryView(
int CurEntry,
double * & Value,
int & RowIndex,
int & ColIndex) = 0;
198 virtual int ExtractMyEntryView(
int CurEntry,
double const * & Value,
int & RowIndex,
int & ColIndex)
const = 0;
234 virtual int Solve(
bool Upper,
bool Trans,
bool UnitDiagonal,
302 virtual bool Filled()
const {
return(
true);}
305 bool LowerTriangular()
const {
if (!HaveNumericConstants_) ComputeNumericConstants();
return(LowerTriangular_);}
308 virtual bool UpperTriangular()
const {
if (!HaveNumericConstants_) ComputeNumericConstants();
return(UpperTriangular_);}
323 virtual double NormInf()
const{
if (!HaveNumericConstants_) ComputeNumericConstants();
return(NormInf_);}
333 virtual double NormOne()
const{
if (!HaveNumericConstants_) ComputeNumericConstants();
return(NormOne_);}
341 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
344 if (!HaveStructureConstants_)
345 ComputeStructureConstants();
346 return (
int) NumGlobalNonzeros_;
349 throw "Epetra_BasicRowMatrix::NumGlobalNonzeros: GlobalIndices not int.";
352 virtual long long NumGlobalNonzeros64()
const{
if (!HaveStructureConstants_) ComputeStructureConstants();
return(NumGlobalNonzeros_);}
355 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
361 throw "Epetra_BasicRowMatrix::NumGlobalRows: GlobalIndices not int.";
367 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
373 throw "Epetra_BasicRowMatrix::NumGlobalCols: GlobalIndices not int.";
379 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
385 throw "Epetra_BasicRowMatrix::NumGlobalDiagonals: GlobalIndices not int.";
391 virtual int NumMyNonzeros()
const{
if (!HaveStructureConstants_) ComputeStructureConstants();
return(NumMyNonzeros_);}
403 virtual int MaxNumEntries()
const{
if (!HaveStructureConstants_) ComputeStructureConstants();
return(MaxNumEntries_);}
432 virtual void Print(std::ostream & os)
const;
447 virtual int SetUseTranspose(
bool use_transpose) {UseTranspose_ = use_transpose;
return(0);}
524 virtual void ComputeStructureConstants()
const;
529 virtual void ComputeNumericConstants()
const;
533 void UpdateImportVector(
int NumVectors)
const;
534 void UpdateExportVector(
int NumVectors)
const;
535 void SetImportExport();
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
virtual const Epetra_Map & RowMatrixRowMap() const
Returns the Row Map object needed for implementing Epetra_RowMatrix.
Epetra_Map: A class for partitioning vectors and matrices.
virtual const Epetra_BlockMap & Map() const
Implement the Epetra_SrcDistObjec::Map() function.
virtual long long NumGlobalDiagonals64() const =0
virtual int SetUseTranspose(bool use_transpose)
If set true, transpose of this operator will be applied.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
virtual int RightScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
virtual double NormOne() const
Returns the one norm of the global matrix.
virtual long long NumGlobalDiagonals64() const
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.
bool HaveNumericConstants_
virtual int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
virtual long long NumGlobalNonzeros64() const
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false, presently always returns true.
virtual int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_RowMatrix inverse applied to an Epetra_MultiVector X in Y...
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements...
virtual const Epetra_Map & OperatorDomainMap() const =0
Returns the Epetra_Map object associated with the domain of this operator.
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const =0
Returns a copy of the main diagonal in a user-provided vector.
virtual int LeftScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
virtual int InvRowSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x...
bool HaveStructureConstants_
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const =0
Returns the number of nonzero entries in MyRow.
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
virtual const Epetra_Map & OperatorRangeMap() const =0
Returns the Epetra_Map object associated with the range of this operator.
virtual const char * Label() const
Epetra_Object Label access funtion.
virtual int MaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
Epetra_Comm: The Epetra Communication Abstract Base Class.
virtual double NormInf() const
Returns the infinity norm of the global matrix.
Epetra_Map RowMatrixColMap_
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_RowMatrix applied to a Epetra_MultiVector X in Y.
Epetra_Object: The base Epetra class.
virtual int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
virtual bool UpperTriangular() const
If matrix is upper triangular, this query returns true, otherwise it returns false.
Epetra_MultiVector * ExportVector_
Epetra_CompObject: Functionality and data that is common to all computational classes.
virtual int NumGlobalRows() const
Returns the number of global matrix rows.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_Import * Importer_
bool LowerTriangular() const
If matrix is lower triangular, this query returns true, otherwise it returns false.
Epetra_BasicRowMatrix: A class for simplifying the development of Epetra_RowMatrix adapters...
virtual const Epetra_Map & RowMatrixColMap() const
Returns the Column Map object needed for implementing Epetra_RowMatrix.
virtual long long NumGlobalCols64() const =0
virtual int NumGlobalCols() const
Returns the number of global matrix columns.
virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_BasicRowMatrix solve with a Epetra_MultiVector X in Y (not implemented...
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
Epetra_Map RowMatrixRowMap_
virtual const Epetra_Import * Importer() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
virtual const char * Label() const
Returns a character string describing the operator.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator (same as domain)...
virtual int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
Epetra_Map OperatorDomainMap_
virtual int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
virtual const Epetra_Export * Exporter() const
Returns the Epetra_Export object that contains the export operations for distributed operations...
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const =0
Returns a copy of the specified local row in user-provided arrays.
virtual long long NumGlobalCols64() const
virtual long long NumGlobalRows64() const
virtual const Epetra_Map & RowMatrixColMap() const =0
Returns the Epetra_Map object associated with the columns of this matrix.
bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
Epetra_Map OperatorRangeMap_
virtual int InvColSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x...
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices...
Epetra_Export * Exporter_
virtual int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries.
virtual long long NumGlobalRows64() const =0
long long NumGlobalNonzeros_
Epetra_MultiVector * ImportVector_