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