Xpetra
Version of the Day
|
#include <Xpetra_EpetraCrsMatrix.hpp>
Public Member Functions | |
EpetraCrsMatrixT (const EpetraCrsMatrixT &matrix) | |
Deep copy constructor. More... | |
Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getMap () const |
Implements DistObject interface. More... | |
void | doImport (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Import. More... | |
void | doExport (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Export. More... | |
void | doImport (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Import (using an Exporter). More... | |
void | doExport (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Export (using an Importer). More... | |
void | removeEmptyProcessesInPlace (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap) |
Public Member Functions inherited from Xpetra::CrsMatrix< double, int, int, EpetraNode > | |
virtual void | getLocalRowCopy (intLocalRow, const ArrayView< int > &Indices, const ArrayView< double > &Values, size_t &NumEntries) const =0 |
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. More... | |
virtual void | residual (const MultiVector< double, int, int, EpetraNode > &X, const MultiVector< double, int, int, EpetraNode > &B, MultiVector< double, int, int, EpetraNode > &R) const =0 |
Compute a residual R = B - (*this) * X. More... | |
virtual void | setAllValues (const typename local_matrix_type::row_map_type &ptr, const typename local_graph_type::entries_type::non_const_type &ind, const typename local_matrix_type::values_type &val)=0 |
virtual | ~CrsMatrix () |
Destructor. More... | |
virtual void | insertGlobalValues (intglobalRow, const ArrayView< const int > &cols, const ArrayView< const double > &vals)=0 |
Insert matrix entries, using global IDs. More... | |
virtual void | insertLocalValues (intlocalRow, const ArrayView< const int > &cols, const ArrayView< const double > &vals)=0 |
Insert matrix entries, using local IDs. More... | |
virtual void | replaceGlobalValues (intglobalRow, const ArrayView< const int > &cols, const ArrayView< const double > &vals)=0 |
Replace matrix entries, using global IDs. More... | |
virtual void | replaceLocalValues (intlocalRow, const ArrayView< const int > &cols, const ArrayView< const double > &vals)=0 |
Replace matrix entries, using local IDs. More... | |
virtual void | setAllToScalar (const double &alpha)=0 |
Set all matrix entries equal to scalarThis. More... | |
virtual void | scale (const double &alpha)=0 |
Scale the current values of a matrix, this = alpha*this. More... | |
virtual void | allocateAllValues (size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< int > &colind, ArrayRCP< double > &values)=0 |
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine. More... | |
virtual void | setAllValues (const ArrayRCP< size_t > &rowptr, const ArrayRCP< int > &colind, const ArrayRCP< double > &values)=0 |
Sets the 1D pointer arrays of the graph. More... | |
virtual void | getAllValues (ArrayRCP< const size_t > &rowptr, ArrayRCP< const int > &colind, ArrayRCP< const double > &values) const =0 |
Gets the 1D pointer arrays of the graph. More... | |
virtual void | getAllValues (ArrayRCP< double > &values)=0 |
Gets the 1D pointer arrays of the graph. More... | |
virtual void | fillComplete (const RCP< const Map< int, int, EpetraNode > > &domainMap, const RCP< const Map< int, int, EpetraNode > > &rangeMap, const RCP< ParameterList > ¶ms=null)=0 |
Signal that data entry is complete, specifying domain and range maps. More... | |
virtual void | replaceDomainMapAndImporter (const Teuchos::RCP< const Map< int, int, EpetraNode > > &newDomainMap, Teuchos::RCP< const Import< int, int, EpetraNode > > &newImporter)=0 |
Replaces the current domainMap and importer with the user-specified objects. More... | |
virtual void | expertStaticFillComplete (const RCP< const Map< int, int, EpetraNode > > &domainMap, const RCP< const Map< int, int, EpetraNode > > &rangeMap, const RCP< const Import< int, int, EpetraNode > > &importer=Teuchos::null, const RCP< const Export< int, int, EpetraNode > > &exporter=Teuchos::null, const RCP< ParameterList > ¶ms=Teuchos::null)=0 |
Expert static fill complete. More... | |
virtual size_t | getNumEntriesInLocalRow (intlocalRow) const =0 |
Returns the current number of entries on this node in the specified local row. More... | |
virtual void | getGlobalRowView (intGlobalRow, ArrayView< const int > &indices, ArrayView< const double > &values) const =0 |
Extract a const, non-persisting view of global indices in a specified row of the matrix. More... | |
virtual void | getGlobalRowCopy (intGlobalRow, const ArrayView< int > &indices, const ArrayView< double > &values, size_t &numEntries) const =0 |
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. More... | |
virtual void | getLocalRowView (intLocalRow, ArrayView< const int > &indices, ArrayView< const double > &values) const =0 |
Extract a const, non-persisting view of local indices in a specified row of the matrix. More... | |
virtual void | getLocalDiagCopy (Vector< double, int, int, EpetraNode > &diag) const =0 |
Get a copy of the diagonal entries owned by this node, with local row indices. More... | |
virtual void | getLocalDiagCopy (Vector< double, int, int, EpetraNode > &diag, const Teuchos::ArrayView< const size_t > &offsets) const =0 |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. More... | |
virtual void | getLocalDiagCopy (Vector< double, int, int, EpetraNode > &diag, const Kokkos::View< const size_t *, typename EpetraNode::device_type, Kokkos::MemoryUnmanaged > &offsets) const =0 |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. More... | |
virtual void | replaceDiag (const Vector< double, int, int, EpetraNode > &diag)=0 |
Replace the diagonal entries of the matrix. More... | |
virtual void | leftScale (const Vector< double, int, int, EpetraNode > &x)=0 |
Left scale matrix using the given vector entries. More... | |
virtual void | rightScale (const Vector< double, int, int, EpetraNode > &x)=0 |
Right scale matrix using the given vector entries. More... | |
virtual void | removeEmptyProcessesInPlace (const RCP< const Map< int, int, EpetraNode > > &newMap)=0 |
virtual void | apply (const MultiVector< double, int, int, EpetraNode > &X, MultiVector< double, int, int, EpetraNode > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, doublealpha=ScalarTraits< double >::one(), doublebeta=ScalarTraits< double >::zero()) const =0 |
Computes the sparse matrix-multivector multiplication. More... | |
virtual void | apply (const MultiVector< double, int, int, EpetraNode > &X, MultiVector< double, int, int, EpetraNode > &Y, Teuchos::ETransp mode, doublealpha, doublebeta, bool sumInterfaceValues, const RCP< Import< int, int, EpetraNode > > ®ionInterfaceImporter, const Teuchos::ArrayRCP< int > ®ionInterfaceLIDs) const =0 |
Computes the sparse matrix-multivector multiplication for region layout matrices. More... | |
Public Member Functions inherited from Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
virtual | ~RowMatrix () |
Destructor. More... | |
virtual size_t | getNumEntriesInLocalRow (LocalOrdinal localRow) const =0 |
Returns the current number of entries on this node in the specified local row. More... | |
virtual void | getLocalRowCopy (LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const =0 |
Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine. More... | |
virtual void | getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const =0 |
Extract a const, non-persisting view of global indices in a specified row of the matrix. More... | |
virtual void | getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const =0 |
Extract a const, non-persisting view of local indices in a specified row of the matrix. More... | |
virtual void | getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const =0 |
Get a copy of the diagonal entries owned by this node, with local row indices. More... | |
virtual void | apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const =0 |
Computes the operator-multivector application. More... | |
Public Member Functions inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
virtual | ~Operator () |
virtual void | removeEmptyProcessesInPlace (const RCP< const map_type > &) |
virtual void | residual (const mv_type &X, const mv_type &B, mv_type &R) const =0 |
Compute a residual R = B - (*this) * X. More... | |
virtual bool | hasTransposeApply () const |
Whether this operator supports applying the transpose or conjugate transpose. More... | |
Public Member Functions inherited from Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > | |
virtual | ~DistObject () |
Destructor. More... | |
virtual void | doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0 |
Import data into this object using an Import object ("forward mode"). More... | |
virtual void | beginImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Import data into this object using an Import object ("forward mode"). More... | |
virtual void | endImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Import data into this object using an Import object ("forward mode"). More... | |
virtual void | doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)=0 |
Export data into this object using an Export object ("forward mode"). More... | |
virtual void | beginExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Export data into this object using an Export object ("forward mode"). More... | |
virtual void | endExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Export data into this object using an Export object ("forward mode"). More... | |
virtual void | doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)=0 |
Import data into this object using an Export object ("reverse mode"). More... | |
virtual void | beginImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Import data into this object using an Export object ("reverse mode"). More... | |
virtual void | endImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Import data into this object using an Export object ("reverse mode"). More... | |
virtual void | doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0 |
Export data into this object using an Import object ("reverse mode"). More... | |
virtual void | beginExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Export data into this object using an Import object ("reverse mode"). More... | |
virtual void | endExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Export data into this object using an Import object ("reverse mode"). More... | |
Private Types | |
typedef int | GlobalOrdinal |
typedef EpetraNode | Node |
typedef CrsMatrix< double, int, GlobalOrdinal, Node > ::scalar_type | Scalar |
typedef CrsMatrix< double, int, GlobalOrdinal, Node > ::local_ordinal_type | LocalOrdinal |
typedef Xpetra::CrsMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > ::local_matrix_type | local_matrix_type |
typedef Xpetra::CrsMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > ::node_type | node_type |
Private Member Functions | |
void | residual (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &R) const |
Private Attributes | |
RCP< Epetra_CrsMatrix > | mtx_ |
The underlying actual matrix object. More... | |
bool | isFillResumed_ |
Flag to keep track of fill status. More... | |
Constructor/Destructor Methods | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap) | |
Constructor for empty DynamicProfile matrix (no space is preallocated). More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null) | |
Constructor specifying fixed number of entries for each row. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null) | |
Constructor specifying (possibly different) number of entries in each row. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null) | |
Constructor specifying column Map and fixed number of entries for each row. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null) | |
Constructor specifying row and column Maps and number of entries in each row. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > &=Teuchos::null) | |
Constructor specifying a previously constructed graph. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) | |
Constructor for a fused import. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) | |
Constructor for a fused export. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > DomainImporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) | |
EpetraCrsMatrixT (const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > DomainExporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) | |
EpetraCrsMatrixT (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const local_matrix_type &lclMatrix, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null) | |
Constructor specifying column Map and a local matrix, which the resulting CrsMatrix views. More... | |
EpetraCrsMatrixT (const local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null) | |
virtual | ~EpetraCrsMatrixT () |
Destructor. More... | |
Insertion/Removal Methods | |
void | insertGlobalValues (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
Insert matrix entries, using global IDs. More... | |
void | insertLocalValues (LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
Insert matrix entries, using local IDs. More... | |
void | replaceGlobalValues (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices, const ArrayView< const Scalar > &values) |
Replace matrix entries, using global IDs. More... | |
void | replaceLocalValues (LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices, const ArrayView< const Scalar > &values) |
Replace matrix entries, using local IDs. More... | |
void | setAllToScalar (const Scalar &alpha) |
Set all matrix entries equal to scalarThis. More... | |
void | scale (const Scalar &alpha) |
Scale the current values of a matrix, this = alpha*this. More... | |
void | allocateAllValues (size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< LocalOrdinal > &colind, ArrayRCP< Scalar > &values) |
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine. More... | |
void | setAllValues (const ArrayRCP< size_t > &rowptr, const ArrayRCP< LocalOrdinal > &colind, const ArrayRCP< Scalar > &values) |
Sets the 1D pointer arrays of the graph. More... | |
void | getAllValues (ArrayRCP< const size_t > &rowptr, ArrayRCP< const LocalOrdinal > &colind, ArrayRCP< const Scalar > &values) const |
Gets the 1D pointer arrays of the graph. More... | |
void | getAllValues (ArrayRCP< Scalar > &values) |
Gets the 1D pointer arrays of the graph. More... | |
bool | haveGlobalConstants () const |
Returns true if globalConstants have been computed; false otherwise. More... | |
void | expertStaticFillComplete (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > &=Teuchos::null) |
Expert static fill complete. More... | |
Transformational Methods | |
void | resumeFill (const RCP< ParameterList > &=Teuchos::null) |
void | fillComplete (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > ¶ms=Teuchos::null) |
Signal that data entry is complete, specifying domain and range maps. More... | |
void | fillComplete (const RCP< ParameterList > ¶ms=Teuchos::null) |
Signal that data entry is complete. More... | |
void | replaceDomainMapAndImporter (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newDomainMap, Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter) |
Replaces the current domainMap and importer with the user-specified objects. More... | |
Methods implementing RowMatrix | |
const RCP< const Comm< int > > | getComm () const |
Returns the communicator. More... | |
const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getRowMap () const |
Returns the Map that describes the row distribution in this matrix. More... | |
const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getColMap () const |
Returns the Map that describes the column distribution in this matrix. More... | |
RCP< const CrsGraph < LocalOrdinal, GlobalOrdinal, Node > > | getCrsGraph () const |
Returns the CrsGraph associated with this matrix. More... | |
global_size_t | getGlobalNumRows () const |
Number of global elements in the row map of this matrix. More... | |
global_size_t | getGlobalNumCols () const |
Number of global columns in the matrix. More... | |
size_t | getLocalNumRows () const |
Returns the number of matrix rows owned on the calling node. More... | |
size_t | getLocalNumCols () const |
Returns the number of columns connected to the locally owned rows of this matrix. More... | |
global_size_t | getGlobalNumEntries () const |
Returns the global number of entries in this matrix. More... | |
size_t | getLocalNumEntries () const |
Returns the local number of entries in this matrix. More... | |
size_t | getNumEntriesInLocalRow (LocalOrdinal localRow) const |
Returns the current number of entries on this node in the specified local row. More... | |
size_t | getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const |
Returns the current number of entries on this node in the specified (locally owned) global row. More... | |
size_t | getGlobalMaxNumRowEntries () const |
Returns the maximum number of entries across all rows/columns on all nodes. More... | |
size_t | getLocalMaxNumRowEntries () const |
Returns the maximum number of entries across all rows/columns on this node. More... | |
bool | isLocallyIndexed () const |
If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. More... | |
bool | isGloballyIndexed () const |
If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. More... | |
bool | isFillComplete () const |
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called. More... | |
bool | isFillActive () const |
Returns true if the matrix is in edit mode. More... | |
ScalarTraits< Scalar > ::magnitudeType | getFrobeniusNorm () const |
Returns the Frobenius norm of the matrix. More... | |
bool | supportsRowViews () const |
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. More... | |
void | getLocalRowCopy (LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const |
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. More... | |
void | getGlobalRowCopy (GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const |
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. More... | |
void | getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const |
Extract a const, non-persisting view of global indices in a specified row of the matrix. More... | |
void | getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const |
Extract a const, non-persisting view of local indices in a specified row of the matrix. More... | |
void | getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const |
Get a copy of the diagonal entries owned by this node, with local row indices. More... | |
void | getLocalDiagOffsets (Teuchos::ArrayRCP< size_t > &) const |
Get offsets of the diagonal entries in the matrix. More... | |
void | getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Teuchos::ArrayView< const size_t > &) const |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. More... | |
void | getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Kokkos::View< const size_t *, typename Node::device_type, Kokkos::MemoryUnmanaged > &) const |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets. More... | |
void | replaceDiag (const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) |
Replace the diagonal entries of the matrix. More... | |
void | leftScale (const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x) |
void | rightScale (const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x) |
Methods implementing Operator | |
void | apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const |
Computes the sparse matrix-multivector multiplication. More... | |
void | apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode, Scalar alpha, Scalar beta, bool sumInterfaceValues, const RCP< Import< LocalOrdinal, GlobalOrdinal, Node > > ®ionInterfaceImporter, const Teuchos::ArrayRCP< LocalOrdinal > ®ionInterfaceLIDs) const |
const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getDomainMap () const |
Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called. More... | |
const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getRangeMap () const |
Returns the Map associated with the range of this operator, which must be compatible with Y.getMap(). More... | |
Overridden from Teuchos::Describable | |
std::string | description () const |
A simple one-line description of this object. More... | |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Print the object with some verbosity level to an FancyOStream object. More... | |
void | setObjectLabel (const std::string &objectLabel) |
Xpetra specific | |
bool | hasMatrix () const |
Does this have an underlying matrix. More... | |
EpetraCrsMatrixT (const Teuchos::RCP< Epetra_CrsMatrix > &mtx) | |
EpetraCrsMatrixT constructor to wrap a Epetra_CrsMatrix object. More... | |
RCP< const Epetra_CrsMatrix > | getEpetra_CrsMatrix () const |
Get the underlying Epetra matrix. More... | |
RCP< Epetra_CrsMatrix > | getEpetra_CrsMatrixNonConst () const |
Get the underlying Epetra matrix. More... | |
local_matrix_type | getLocalMatrixDevice () const |
Compatibility layer for accessing the matrix data through a Kokkos interface. More... | |
local_matrix_type::HostMirror | getLocalMatrixHost () const |
void | setAllValues (const typename local_matrix_type::row_map_type &ptr, const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type &ind, const typename local_matrix_type::values_type &val) |
LocalOrdinal | GetStorageBlockSize () const |
Returns the block size of the storage mechanism, which is usually 1, except for Tpetra::BlockCrsMatrix. More... | |
Additional Inherited Members | |
Public Types inherited from Xpetra::CrsMatrix< double, int, int, EpetraNode > | |
typedef double | scalar_type |
typedef int | local_ordinal_type |
typedef int | global_ordinal_type |
typedef EpetraNode | node_type |
using | impl_scalar_type = typename Kokkos::ArithTraits< double >::val_type |
using | execution_space = typename node_type::device_type |
using | local_graph_type = Kokkos::StaticCrsGraph< int, Kokkos::LayoutLeft, execution_space, void, size_t > |
using | local_matrix_type = KokkosSparse::CrsMatrix< impl_scalar_type, int, execution_space, void, typename local_graph_type::size_type > |
The specialization of Kokkos::CrsMatrix that represents the part of the sparse matrix on each MPI process. The same as for Tpetra. More... | |
Public Types inherited from Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
typedef Scalar | scalar_type |
typedef LocalOrdinal | local_ordinal_type |
typedef GlobalOrdinal | global_ordinal_type |
typedef Node | node_type |
Public Types inherited from Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > | |
typedef Scalar | scalar_type |
The type of the entries of the input and output multivectors. More... | |
typedef LocalOrdinal | local_ordinal_type |
The local index type. More... | |
typedef GlobalOrdinal | global_ordinal_type |
The global index type. More... | |
typedef Node | node_type |
The Kokkos Node type. More... | |
Definition at line 280 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 282 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 283 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 284 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 285 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 289 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Definition at line 290 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor for empty DynamicProfile matrix (no space is preallocated).
Definition at line 298 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying fixed number of entries for each row.
Definition at line 303 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying (possibly different) number of entries in each row.
Definition at line 308 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying column Map and fixed number of entries for each row.
Definition at line 315 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying row and column Maps and number of entries in each row.
Definition at line 320 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying a previously constructed graph.
Definition at line 327 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor for a fused import.
Definition at line 332 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor for a fused export.
Definition at line 353 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 372 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 394 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Constructor specifying column Map and a local matrix, which the resulting CrsMatrix views.
Unlike most other CrsMatrix constructors, successful completion of this constructor will result in a fill-complete matrix.
rowMap | [in] Distribution of rows of the matrix. |
colMap | [in] Distribution of columns of the matrix. |
lclMatrix | [in] A local CrsMatrix containing all local matrix values as well as a local graph. The graph's local row indices must come from the specified row Map, and its local column indices must come from the specified column Map. |
params | [in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values. |
Definition at line 438 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 445 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Destructor.
Definition at line 510 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Deep copy constructor.
Definition at line 1197 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
EpetraCrsMatrixT constructor to wrap a Epetra_CrsMatrix object.
Definition at line 1278 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Insert matrix entries, using global IDs.
Definition at line 518 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Insert matrix entries, using local IDs.
Definition at line 524 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Replace matrix entries, using global IDs.
Definition at line 530 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Replace matrix entries, using local IDs.
Definition at line 548 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Set all matrix entries equal to scalarThis.
Definition at line 566 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Scale the current values of a matrix, this = alpha*this.
Definition at line 572 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine.
Definition at line 579 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Sets the 1D pointer arrays of the graph.
Definition at line 607 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Gets the 1D pointer arrays of the graph.
Definition at line 635 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Gets the 1D pointer arrays of the graph.
Definition at line 659 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns true if globalConstants have been computed; false otherwise.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 671 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Expert static fill complete.
Definition at line 674 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 707 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Signal that data entry is complete, specifying domain and range maps.
Definition at line 715 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Signal that data entry is complete.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 727 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Replaces the current domainMap and importer with the user-specified objects.
Definition at line 742 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Returns the communicator.
Definition at line 761 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the Map that describes the row distribution in this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 767 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the Map that describes the column distribution in this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 773 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the CrsGraph associated with this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 779 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Number of global elements in the row map of this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 785 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Number of global columns in the matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 791 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the number of matrix rows owned on the calling node.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 797 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the number of columns connected to the locally owned rows of this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 803 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the global number of entries in this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 809 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the local number of entries in this matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 815 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Returns the current number of entries on this node in the specified local row.
Definition at line 821 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the current number of entries on this node in the specified (locally owned) global row.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 827 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the maximum number of entries across all rows/columns on all nodes.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 833 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the maximum number of entries across all rows/columns on this node.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 839 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
If matrix indices are in the local range, this function returns true. Otherwise, this function returns false.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 845 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
If matrix indices are in the global range, this function returns true. Otherwise, this function returns false.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 851 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 857 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns true if the matrix is in edit mode.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 866 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the Frobenius norm of the matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 872 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 878 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine.
Definition at line 884 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
Definition at line 893 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Extract a const, non-persisting view of global indices in a specified row of the matrix.
Definition at line 902 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Extract a const, non-persisting view of local indices in a specified row of the matrix.
Definition at line 920 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Get a copy of the diagonal entries owned by this node, with local row indices.
Definition at line 938 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Get offsets of the diagonal entries in the matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 944 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets.
Definition at line 949 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Get a copy of the diagonal entries owned by this node, with local row indices, using row offsets.
Definition at line 954 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Replace the diagonal entries of the matrix.
Definition at line 959 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 963 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 966 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Computes the sparse matrix-multivector multiplication.
Definition at line 976 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 1002 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the Map associated with the domain of this operator. This will be null until fillComplete() is called.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1007 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the Map associated with the range of this operator, which must be compatible with Y.getMap().
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1013 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
A simple one-line description of this object.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1024 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Print the object with some verbosity level to an FancyOStream object.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1045 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1190 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Implements DistObject interface.
Access function for the Tpetra::Map this DistObject was constructed with.
Implements Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 1205 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 1211 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 1224 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Import (using an Exporter).
Definition at line 1237 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Export (using an Importer).
Definition at line 1250 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 1262 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Does this have an underlying matrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1275 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Get the underlying Epetra matrix.
Definition at line 1283 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Get the underlying Epetra matrix.
Definition at line 1286 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Compatibility layer for accessing the matrix data through a Kokkos interface.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1291 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1300 of file Xpetra_EpetraCrsMatrix.hpp.
|
inline |
Definition at line 1327 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlinevirtual |
Returns the block size of the storage mechanism, which is usually 1, except for Tpetra::BlockCrsMatrix.
Implements Xpetra::CrsMatrix< double, int, int, EpetraNode >.
Definition at line 1355 of file Xpetra_EpetraCrsMatrix.hpp.
|
inlineprivate |
Definition at line 1365 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
The underlying actual matrix object.
Definition at line 1376 of file Xpetra_EpetraCrsMatrix.hpp.
|
private |
Flag to keep track of fill status.
For Epetra, fillResume() is a fictitious operation but we need to keep track of it. This boolean is true only is resumeFill() have been called and fillComplete() have not been called afterward.
Definition at line 1384 of file Xpetra_EpetraCrsMatrix.hpp.