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 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_Map: A class for partitioning vectors and matrices.
virtual long long NumGlobalDiagonals64() const =0
virtual int SetUseTranspose(bool use_transpose)
If set true, transpose of this operator will be applied.
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 long long NumGlobalNonzeros64() const
virtual int NumGlobalCols() const
Returns the number of global matrix columns.
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.
bool HaveNumericConstants_
virtual int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries.
virtual const Epetra_Import * Importer() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
virtual long long NumGlobalCols64() const
virtual int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
virtual long long NumGlobalDiagonals64() const
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 const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator (same as domain)...
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...
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 const Epetra_BlockMap & Map() const
Implement the Epetra_SrcDistObjec::Map() function.
bool LowerTriangular() const
If matrix is lower triangular, this query returns true, otherwise it returns false.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
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.
virtual long long NumGlobalRows64() const
bool HaveStructureConstants_
virtual int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
virtual const Epetra_Map & RowMatrixRowMap() const
Returns the Row Map object needed for implementing Epetra_RowMatrix.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const =0
Returns the number of nonzero entries in MyRow.
virtual const Epetra_Map & OperatorRangeMap() const =0
Returns the Epetra_Map object associated with the range of this operator.
virtual bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false, presently always returns true.
virtual bool UpperTriangular() const
If matrix is upper triangular, this query returns true, otherwise it returns false.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Map RowMatrixColMap_
Epetra_Object: The base Epetra class.
Epetra_MultiVector * ExportVector_
virtual int MaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
Epetra_CompObject: Functionality and data that is common to all computational classes.
virtual const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_Import * Importer_
Epetra_BasicRowMatrix: A class for simplifying the development of Epetra_RowMatrix adapters...
virtual long long NumGlobalCols64() const =0
virtual double NormInf() const
Returns the infinity norm of the global matrix.
virtual double NormOne() const
Returns the one norm of the global matrix.
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 char * Label() const
Epetra_Object Label access funtion.
Epetra_Map OperatorDomainMap_
virtual int NumMyCols() const
Returns the number of matrix columns owned by the calling processor.
virtual int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries.
virtual const Epetra_Map & RowMatrixColMap() const
Returns the Column Map object needed for implementing Epetra_RowMatrix.
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 const Epetra_Map & RowMatrixColMap() const =0
Returns the Epetra_Map object associated with the columns of this matrix.
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...
virtual int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
virtual const Epetra_Export * Exporter() const
Returns the Epetra_Export object that contains the export operations for distributed operations...
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices...
Epetra_Export * Exporter_
virtual int NumGlobalRows() const
Returns the number of global matrix rows.
virtual const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
virtual long long NumGlobalRows64() const =0
long long NumGlobalNonzeros_
Epetra_MultiVector * ImportVector_
virtual const char * Label() const
Returns a character string describing the operator.