ForTrilinos
Data Types
FEpetra_CrsMatrix Module Reference

Data Types

type  Epetra_CrsMatrix
 
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed row matrices. More...

Functions/Subroutines

Constructor Functions
type(Epetra_CrsMatrixEpetra_CrsMatrix (CV, Row_Map, NumEntriesPerRow, StaticProfile)
 Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
type(Epetra_CrsMatrixEpetra_CrsMatrix (CV, Row_Map, NumEntriesPerRow, StaticProfile)
 Epetra_CrsMatrix constructor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
type(Epetra_CrsMatrixEpetra_CrsMatrix (CV, Row_Map, Col_Map, NumEntriesPerRow, StaticProfile)
 Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
type(Epetra_CrsMatrixEpetra_CrsMatrix (CV, Row_Map, Col_Map, NumEntriesPerRow, StaticProfile)
 Epetra_CrsMatrix constructor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
type(Epetra_CrsMatrixEpetra_CrsMatrix (this)
 Epetra_CrsMatrix copy constructor. Creates a copy of a Epetra_CrsMatrix object.
Insertion/Replace/SumInto methods
subroutine PutScalar (this, scalar, err)
 Initialize all values in the matrix with constant value.
subroutine InsertGlobalValues (this, GlobalRow, NumEntries, values, indices, err)
 Insert a list of elements in a given global row of the matrix. This method is used to construct a matrix for the first time. It cannot be used if the matrix structure has already been fixed (via a call to FillComplete()).
subroutine ReplaceGlobalValues (this, GlobalRow, NumEntries, values, indices, err)
 Replace specified existing values with this list of entries for a given global row of the matrix.
Transformation methods
subroutine FillComplete (this, OptimizeDataStorage, err)
 Signal that data entry is complete. Perform transformations to local index space. This version of FillComplete assumes that the domain and range distributions are identical to the matrix row distributions.
subroutine FillComplete (this, DomainMap, RangeMap, OptimizeDataStorage, err)
 Signal that data entry is complete. Perform transformations to local index space. This version of FillComplete requires the explicit specification of the domain and range distribution maps. These maps are used for importing and exporting vector and multi-vector elements that are needed for distributed matrix computations.
Extraction Methods
subroutine ExtractGlobalRowCopy (this, GlobalRow, values, indices, err)
 Returns a copy of the specified global row in user-provided arrays.
integer(c_int) NumMyEntries (this, MyRow)
 Returns the current number of nonzero entries in specified local row on this processor.
integer(c_int) MaxNumEntries (this)
 Returns the maximum number of nonzero entries across all rows on this processor.
Additional methods required to implement Epetra_RowMatrix interface
integer(c_int) NumMyRowEntries (this, MyRow)
 Return the current number of values stored for the specified local row.
Computational Methods
subroutine Multiply_Vector (this, TransA, x, y, err)
 Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_Vector x in y.
subroutine Multiply_MultiVector (this, TransA, x, y, err)
 Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_MultiVector X in Y.
Local/Global ID method
logical MyGlobalRow (this, GID)
 Returns true of GID is owned by the calling processor, otherwise it returns false.
Attribute Accessor Methods
type(Epetra_MapRowMatrixRowMap (this)
 Returns the Epetra_Map object associated with the rows of this matrix.
type(Epetra_MapRowMap (this)
 Returns the Epetra_Map object associated with the rows of this matrix.
integer(c_int) NumGlobalEntries (this, GlobalRow)
 Returns the current number of nonzero entries in specified global row on this processor.

Function/Subroutine Documentation

type(Epetra_CrsMatrix) FEpetra_CrsMatrix::Epetra_CrsMatrix ( integer(FT_Epetra_DataAccess_E_t),intent(in)  CV,
class(Epetra_Map),intent(in)  Row_Map,
integer(c_int),dimension(:),intent(in)  NumEntriesPerRow,
logical,optional  StaticProfile 
)

Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.

Parameters:
CV(In) An FT_Epetra_DataAccess_E_t enumerated type set to Copy or View.
Row_Map(In) An Epetra_Map defining the numbering and distribution of matrix rows.
NumEntriesPerRow(In) An integer array of length NumRows such that NumEntriesPerRow(i) indicates the (approximate if StaticProfile=false) number of entries in the ith row.
StaticProfile(In) Optional argument that indicates whether or not NumIndicesPerRow should be interpreted as an exact count of nonzeros, or should be used as an approximation. By default this value is false, allowing the profile to be determined dynamically. If the user sets it to true, then the memory allocation for the Epetra_CrsGraph object will be done in one large block, saving on memory fragmentation and generally improving the performance of matrix multiplication and solve kernels.
type(Epetra_CrsMatrix) FEpetra_CrsMatrix::Epetra_CrsMatrix ( integer(FT_Epetra_DataAccess_E_t),intent(in)  CV,
class(Epetra_Map),intent(in)  Row_Map,
integer(c_int),intent(in)  NumEntriesPerRow,
logical,optional  StaticProfile 
)

Epetra_CrsMatrix constructor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.

Parameters:
CV(In) An FT_Epetra_DataAccess_E_t enumerated type set to Copy or View.
Row_Map(In) An Epetra_Map defining the numbering and distribution of matrix rows.
NumEntriesPerRow(In) An integer that indicates the (approximate) number of entries in the each row. Note that it is possible to use 0 for this value and let fill occur during the insertion phase.
StaticProfile(In) Optional argument that indicates whether or not NumIndicesPerRow should be interpreted as an exact count of nonzeros, or should be used as an approximation. By default this value is false, allowing the profile to be determined dynamically. If the user sets it to true, then the memory allocation for the Epetra_CrsGraph object will be done in one large block, saving on memory fragmentation and generally improving the performance of matrix multiplication and solve kernels.
type(Epetra_CrsMatrix) FEpetra_CrsMatrix::Epetra_CrsMatrix ( integer(FT_Epetra_DataAccess_E_t),intent(in)  CV,
class(Epetra_Map),intent(in)  Row_Map,
class(Epetra_Map),intent(in)  Col_Map,
integer(c_int),intent(in)  NumEntriesPerRow,
logical,optional  StaticProfile 
)

Epetra_CrsMatrix constructor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.

Parameters:
CV(In) An FT_Epetra_DataAccess_E_t enumerated type set to Copy or View.
Row_Map(In) An Epetra_Map defining the numbering and distribution of matrix rows.
Col_Map(In) An Epetra_Map defining the set of column-indices that appear in each processor's locally owned matrix rows.
NumEntriesPerRow(In) An integer that indicates the (approximate if StaticProfile=false) number of entries in the each row. Note that it is possible to use 0 for this value and let fill occur during the insertion phase.
StaticProfile(In) Optional argument that indicates whether or not NumIndicesPerRow should be interpreted as an exact count of nonzeros, or should be used as an approximation. By default this value is false, allowing the profile to be determined dynamically. If the user sets it to true, then the memory allocation for the Epetra_CrsGraph object will be done in one large block, saving on memory fragmentation and generally improving the performance of matrix multiplication and solve kernels.
type(Epetra_CrsMatrix) FEpetra_CrsMatrix::Epetra_CrsMatrix ( type(Epetra_CrsMatrix),intent(in)  this)

Epetra_CrsMatrix copy constructor. Creates a copy of a Epetra_CrsMatrix object.

type(Epetra_CrsMatrix) FEpetra_CrsMatrix::Epetra_CrsMatrix ( integer(FT_Epetra_DataAccess_E_t),intent(in)  CV,
class(Epetra_Map),intent(in)  Row_Map,
class(Epetra_Map),intent(in)  Col_Map,
integer(c_int),dimension(:),intent(in)  NumEntriesPerRow,
logical,optional  StaticProfile 
)

Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.

Parameters:
CV(In) An FT_Epetra_DataAccess_E_t enumerated type set to Copy or View.
Row_Map(In) An Epetra_Map defining the numbering and distribution of matrix rows.
Col_Map(In) An Epetra_Map defining the set of column-indices that appear in each processor's locally owned matrix rows.
NumEntriesPerRow(In) An integer array of length NumRows such that NumEntriesPerRow(i) indicates the (approximate if StaticProfile=false) number of entries in the ith row.
StaticProfile(In) Optional argument that indicates whether or not NumIndicesPerRow should be interpreted as an exact count of nonzeros, or should be used as an approximation. By default this value is false, allowing the profile to be determined dynamically. If the user sets it to true, then the memory allocation for the Epetra_CrsGraph object will be done in one large block, saving on memory fragmentation and generally improving the performance of matrix multiplication and solve kernels.
subroutine FEpetra_CrsMatrix::ExtractGlobalRowCopy ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  GlobalRow,
real(c_double),dimension(:),intent(out),allocatable  values,
integer(c_int),dimension(:),intent(out),allocatable  indices,
type(error),intent(out),optional  err 
)

Returns a copy of the specified global row in user-provided arrays.

Parameters:
GlobalRow(In) Global row to extract.
values(Out) Extracted values for this row.
indices(Out) Extracted global column indices for the corresponding values.
errInteger error code, set to 0 if successful, non-zero if global row is not owned by calling process or if the number of entries in this row exceed the Length parameter.
subroutine FEpetra_CrsMatrix::FillComplete ( class(Epetra_CrsMatrix),intent(in)  this,
logical,intent(in),optional  OptimizeDataStorage,
type(error),intent(out),optional  err 
)

Signal that data entry is complete. Perform transformations to local index space. This version of FillComplete assumes that the domain and range distributions are identical to the matrix row distributions.

Parameters:
OptimizeDataStorage(In) If true, storage will be packed for optimal performance.
errerror code, 0 if successful. Returns a positive warning code of 3 if the matrix is rectangular (meaning that the other overloading of FillComplete should have been called, with differen domain-map and range-map specified).
subroutine FEpetra_CrsMatrix::FillComplete ( class(Epetra_CrsMatrix),intent(in)  this,
class(Epetra_Map),intent(in)  DomainMap,
class(Epetra_Map),intent(in)  RangeMap,
logical,intent(in),optional  OptimizeDataStorage,
type(error),intent(out),optional  err 
)

Signal that data entry is complete. Perform transformations to local index space. This version of FillComplete requires the explicit specification of the domain and range distribution maps. These maps are used for importing and exporting vector and multi-vector elements that are needed for distributed matrix computations.

Parameters:
DomainMap(In) Map that describes the distribution of vector and multi-vectors in the matrix domain.
RangeMap(In) Map that describes the distribution of vector and multi-vectors in the matrix range.
OptimizeDataStorage(In) If true, storage will be packed for optimal performance.By default storage will be optimized. If you cannot tolerate the increased temporary memory use, should set this value to false.
err(Out) error code, 0 if successful. positive warning code of 2 if it is detected that the matrix-graph got out of sync since this matrix was constructed (for instance if graph. FillComplete() was called by another matrix that shares the graph)
subroutine FEpetra_CrsMatrix::InsertGlobalValues ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  GlobalRow,
integer(c_int),intent(in)  NumEntries,
real(c_double),dimension(:),intent(in)  values,
integer(c_int),dimension(:),intent(in)  indices,
type(error),intent(out),optional  err 
)

Insert a list of elements in a given global row of the matrix. This method is used to construct a matrix for the first time. It cannot be used if the matrix structure has already been fixed (via a call to FillComplete()).

Parameters:
GlobalRow(In) Row number (in global coordinates) to put elements.
NumEntries(In) Number of entries.
valuesValues to enter.
indices(In) Global column indices corresponding to values.
err(Out) Integer error code, set to 0 if successful.
integer(c_int) FEpetra_CrsMatrix::MaxNumEntries ( class(Epetra_CrsMatrix),intent(in)  this)

Returns the maximum number of nonzero entries across all rows on this processor.

subroutine FEpetra_CrsMatrix::Multiply_MultiVector ( class(Epetra_CrsMatrix),intent(in)  this,
logical,intent(in)  TransA,
class(Epetra_MultiVector),intent(in)  x,
class(Epetra_MultiVector),intent(inout)  y,
type(error),intent(inout),optional  err 
)

Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_MultiVector X in Y.

Parameters:
TransA(In) If true, multiply by the transpose of matrix, otherwise just use matrix.
x(In) An Epetra_MultiVector of dimension NumVectors to multiply with matrix.
y(Out) An Epetra_MultiVector of dimension NumVectorscontaining result.
err(Out) Integer error code, set to 0 if successful.
subroutine FEpetra_CrsMatrix::Multiply_Vector ( class(Epetra_CrsMatrix),intent(in)  this,
logical,intent(in)  TransA,
class(Epetra_Vector),intent(in)  x,
class(Epetra_Vector),intent(inout)  y,
type(error),intent(inout),optional  err 
)

Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_Vector x in y.

Parameters:
TransA(In) If true, multiply by the transpose of matrix, otherwise just use matrix.
x(In) An Epetra_Vector to multiply by.
y(Out) An Epetra_Vector containing result.
err(Out) Integer error code, set to 0 if successful.
logical FEpetra_CrsMatrix::MyGlobalRow ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  GID 
)

Returns true of GID is owned by the calling processor, otherwise it returns false.

integer(c_int) FEpetra_CrsMatrix::NumGlobalEntries ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  GlobalRow 
)

Returns the current number of nonzero entries in specified global row on this processor.

integer(c_int) FEpetra_CrsMatrix::NumMyEntries ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  MyRow 
)

Returns the current number of nonzero entries in specified local row on this processor.

integer(c_int) FEpetra_CrsMatrix::NumMyRowEntries ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  MyRow 
)

Return the current number of values stored for the specified local row.

Parameters:
MyRow(In) Local row.
subroutine FEpetra_CrsMatrix::PutScalar ( class(Epetra_CrsMatrix),intent(in)  this,
real(c_double),intent(in)  scalar,
type(error),intent(out),optional  err 
)

Initialize all values in the matrix with constant value.

Parameters:
scalar(In) Value to use.
err(Out) Integer error code, set to 0 if successful.
subroutine FEpetra_CrsMatrix::ReplaceGlobalValues ( class(Epetra_CrsMatrix),intent(in)  this,
integer(c_int),intent(in)  GlobalRow,
integer(c_int),intent(in)  NumEntries,
real(c_double),dimension(:)  values,
integer(c_int),dimension(:)  indices,
type(error),intent(out),optional  err 
)

Replace specified existing values with this list of entries for a given global row of the matrix.

Parameters:
GlobalRow(In) Row number (in global coordinates) to put elements.
NumEntries(In) Number of entries.
values(In) Values to enter.
indices(In) Global column indices corresponding to values.
errInteger error code, set to 0 if successful.
type(Epetra_Map) FEpetra_CrsMatrix::RowMap ( class(Epetra_CrsMatrix),intent(in)  this)

Returns the Epetra_Map object associated with the rows of this matrix.

type(Epetra_Map) FEpetra_CrsMatrix::RowMatrixRowMap ( class(Epetra_CrsMatrix),intent(in)  this)

Returns the Epetra_Map object associated with the rows of this matrix.

 All Classes Namespaces Files Functions