|
Tpetra Matrix/Vector Services Version of the Day
|
Block-entry specialization of Tpetra::MultiVector. More...
#include <Tpetra_BlockMultiVector_decl.hpp>

Public Member Functions | |
Constructor/Destructor Methods | |
| BlockMultiVector (const Teuchos::RCP< const BlockMap< LocalOrdinal, GlobalOrdinal, Node > > &blockMap, size_t NumVectors, bool zeroOut=true) | |
| ~BlockMultiVector () | |
| Destructor. | |
Attribute Queries | |
|
const Teuchos::RCP< const BlockMap< LocalOrdinal, GlobalOrdinal, Node > > & | getBlockMap () const |
Post-construction modification routines | |
| void | replaceGlobalValue (GlobalOrdinal globalBlockRow, LocalOrdinal blockOffset, size_t vectorIndex, const Scalar &value) |
| Replace current value at the specified (globalBlockRow, blockOffset, vectorIndex) location with specified value. | |
| void | replaceLocalValue (LocalOrdinal localBlockRow, LocalOrdinal blockOffset, size_t vectorIndex, const Scalar &value) |
| Replace current value at the specified (localBlockRow, blockOffset, vectorIndex) location with specified value. | |
| void | sumIntoGlobalValue (GlobalOrdinal globalBlockRow, LocalOrdinal blockOffset, size_t vectorIndex, const Scalar &value) |
| Adds specified value to existing value at the specified (globalBlockRow, blockOffset, vectorIndex) location. | |
| void | sumIntoLocalValue (LocalOrdinal localBlockRow, LocalOrdinal blockOffset, size_t vectorIndex, const Scalar &value) |
| Adds specified value to existing value at the specified (localBlockRow, blockOffset, vectorIndex) location with specified value. | |
Post-construction modification routines | |
| void | replaceGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) |
| Replace current value at the specified (globalRow, vectorIndex) location with specified value. | |
| void | sumIntoGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) |
| Adds specified value to existing value at the specified (globalRow, vectorIndex) location. | |
| void | replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) |
| Replace current value at the specified (myRow, vectorIndex) location with specified value. | |
| void | sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) |
| Adds specified value to existing value at the specified (myRow, vectorIndex) location. | |
| void | putScalar (const Scalar &value) |
| Initialize all values in a multi-vector with specified value. | |
| void | randomize () |
| Set multi-vector values to random numbers. | |
| void | replaceMap (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map) |
| Replace the underlying Map with a compatible one. | |
| void | reduce () |
| Instruct a local (non-distributed) MultiVector to sum values across all nodes. | |
Data Copy and View get methods | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subCopy (const Teuchos::Range1D &colRng) const |
| Returns a MultiVector with copies of selected columns. | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subCopy (const Teuchos::ArrayView< const size_t > &cols) const |
| Returns a MultiVector with copies of selected columns. | |
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subView (const Teuchos::Range1D &colRng) const |
| Returns a const MultiVector with const views of selected columns. | |
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subView (const Teuchos::ArrayView< const size_t > &cols) const |
| Returns a const MultiVector with const views of selected columns. | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subViewNonConst (const Teuchos::Range1D &colRng) |
| Returns a MultiVector with views of selected columns. | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | subViewNonConst (const Teuchos::ArrayView< const size_t > &cols) |
| Returns a MultiVector with views of selected columns. | |
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | offsetView (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &subMap, size_t offset) const |
| Returns a const MultiVector view of a subset of rows. | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | offsetViewNonConst (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &subMap, size_t offset) |
| Returns a non-const MultiVector view of a subset of rows. | |
| Teuchos::RCP< const Vector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVector (size_t j) const |
| Const Vector access function. | |
| Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVectorNonConst (size_t j) |
| Vector access function. | |
| Teuchos::ArrayRCP< const Scalar > | getData (size_t j) const |
| Teuchos::ArrayRCP< Scalar > | getDataNonConst (size_t j) |
| void | get1dCopy (Teuchos::ArrayView< Scalar > A, size_t LDA) const |
| Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management classes). | |
| void | get2dCopy (Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > ArrayOfPtrs) const |
| Return multi-vector values in user-provided array of pointers (using Teuchos memory management classes). | |
| Teuchos::ArrayRCP< const Scalar > | get1dView () const |
| Return const persisting view of values in a one-dimensional array. Throws std::runtime_error if the underlying data is non-contiguous. | |
| Teuchos::ArrayRCP < Teuchos::ArrayRCP< const Scalar > > | get2dView () const |
| Return const persisting pointers to values. | |
| Teuchos::ArrayRCP< Scalar > | get1dViewNonConst () |
| Return non-const persisting view of values in a one-dimensional array. Throws std::runtime_error if the underlying data is non-contiguous. Teuchos::ArrayRCP<Scalar> get1dViewNonConst();. | |
| Teuchos::ArrayRCP < Teuchos::ArrayRCP< Scalar > > | get2dViewNonConst () |
| Return non-const persisting pointers to values. | |
| const Kokkos::MultiVector < Scalar, Node > & | getLocalMV () const |
| Return a const reference to the underlying Kokkos::MultiVector object (advanced use only) | |
| Kokkos::MultiVector< Scalar, Node > & | getLocalMVNonConst () |
| Return a non-const reference to the underlying Kokkos::MultiVector object (advanced use only) | |
Mathematical methods | |
| void | dot (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const |
| Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]) | |
| void | abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Puts element-wise absolute values of input Multi-vector in target: A = abs(this) | |
| void | reciprocal (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). | |
| void | scale (const Scalar &alpha) |
| Scale the current values of a multi-vector, this = alpha*this. | |
| void | scale (Teuchos::ArrayView< const Scalar > alpha) |
| Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. | |
| void | scale (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Replace multi-vector values with scaled values of A, this = alpha*A. | |
| void | update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta) |
| Update multi-vector values with scaled values of A, this = beta*this + alpha*A. | |
| void | update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &gamma) |
| Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. | |
| void | norm1 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute 1-norm of each vector in multi-vector. | |
| void | norm2 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute 2-norm of each vector in multi-vector. | |
| void | normInf (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute Inf-norm of each vector in multi-vector. | |
| void | normWeighted (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights, const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector. | |
| void | meanValue (const Teuchos::ArrayView< Scalar > &means) const |
| Compute mean (average) value of each vector in multi-vector. | |
| void | multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &beta) |
| Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B). | |
| void | elementWiseMultiply (Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis) |
| Element-wise multiply of a Vector A with a MultiVector B. | |
Attribute access functions | |
| size_t | getNumVectors () const |
| Returns the number of vectors in the multi-vector. | |
| size_t | getLocalLength () const |
| Returns the local vector length on the calling processor of vectors in the multi-vector. | |
| global_size_t | getGlobalLength () const |
| Returns the global vector length of vectors in the multi-vector. | |
| size_t | getStride () const |
| Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true). WARNING: this may vary from node to node. | |
| bool | isConstantStride () const |
| Returns true if this multi-vector has constant stride between vectors. WARNING: This may vary from node to node. | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| Return a simple one-line description of this object. | |
| 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. | |
Import/Export Methods | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Import. | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Import (using an Exporter) | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Export. | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Export (using an Importer) | |
Attribute Accessor Methods | |
| bool | isDistributed () const |
| Accessor for whether or not this is a global object. | |
| const Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getMap () const |
| Access function for the Tpetra::Map this DistObject was constructed with. | |
I/O methods | |
| void | print (std::ostream &os) const |
| Print method. | |
Protected Types | |
| enum | ReverseOption |
| Enum indicating whether the transer should be performed in forward or reverse mode. More... | |
Protected Member Functions | |
| template<class T > | |
| Teuchos::ArrayRCP< T > | getSubArrayRCP (Teuchos::ArrayRCP< T > arr, size_t j) const |
| Get persisting view of j-th column in given ArrayRCP, considering isConstantStride(). ArrayRCP may correspond to a compute buffer or host view. | |
| bool | checkSizes (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj) |
| Allows the source and target (this) objects to be compared for compatibility. | |
| void | copyAndPermute (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs) |
| Perform copies and permutations that are local to this image. | |
| void | packAndPrepare (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< Scalar > &exports, const Teuchos::ArrayView< size_t > &numExportPacketsPerLID, size_t &constantNumPackets, Distributor &distor) |
| Perform any packing or preparation required for communication. | |
| void | unpackAndCombine (const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const Scalar > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM) |
| Perform any unpacking and combining after communication. | |
| virtual void | doTransfer (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs, const Teuchos::ArrayView< const LocalOrdinal > &remoteLIDs, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Distributor &distor, ReverseOption revOp) |
| Perform transfer (redistribution) of data across memory images. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node > | |
| Teuchos::RCP< MultiVector < Scalar, LocalOrdinal, GlobalOrdinal, Node > > | createMultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t numVectors) |
| Non-member function to create a MultiVector from a specified Map. | |
Block-entry specialization of Tpetra::MultiVector.
This class inherits (is-a) Tpetra::MultiVector, adding block-entry functionality for referencing/accessing data.
Definition at line 47 of file Tpetra_BlockMultiVector_decl.hpp.
enum Tpetra::DistObject::ReverseOption [protected, inherited] |
Enum indicating whether the transer should be performed in forward or reverse mode.
Definition at line 127 of file Tpetra_DistObject.hpp.
| Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~BlockMultiVector | ( | ) | [inline] |
Destructor.
Definition at line 60 of file Tpetra_BlockMultiVector_decl.hpp.
| void Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue | ( | GlobalOrdinal | globalBlockRow, |
| LocalOrdinal | blockOffset, | ||
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
Replace current value at the specified (globalBlockRow, blockOffset, vectorIndex) location with specified value.
Definition at line 62 of file Tpetra_BlockMultiVector_def.hpp.
| void Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue | ( | LocalOrdinal | localBlockRow, |
| LocalOrdinal | blockOffset, | ||
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
Replace current value at the specified (localBlockRow, blockOffset, vectorIndex) location with specified value.
Definition at line 71 of file Tpetra_BlockMultiVector_def.hpp.
| void Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue | ( | GlobalOrdinal | globalBlockRow, |
| LocalOrdinal | blockOffset, | ||
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
Adds specified value to existing value at the specified (globalBlockRow, blockOffset, vectorIndex) location.
Definition at line 80 of file Tpetra_BlockMultiVector_def.hpp.
| void Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue | ( | LocalOrdinal | localBlockRow, |
| LocalOrdinal | blockOffset, | ||
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
Adds specified value to existing value at the specified (localBlockRow, blockOffset, vectorIndex) location with specified value.
Definition at line 89 of file Tpetra_BlockMultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inherited] |
Replace current value at the specified (globalRow, vectorIndex) location with specified value.
globalRow must be a valid global element on this node, according to the row map. Definition at line 1640 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inherited] |
Adds specified value to existing value at the specified (globalRow, vectorIndex) location.
globalRow must be a valid global element on this node, according to the row map. Definition at line 1654 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inherited] |
Replace current value at the specified (myRow, vectorIndex) location with specified value.
localRow must be a valid local element on this node, according to the row map. Definition at line 1614 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inherited] |
Adds specified value to existing value at the specified (myRow, vectorIndex) location.
localRow must be a valid local element on this node, according to the row map. Definition at line 1627 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::putScalar | ( | const Scalar & | value | ) | [inherited] |
Initialize all values in a multi-vector with specified value.
Definition at line 668 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::randomize | ( | ) | [inherited] |
Set multi-vector values to random numbers.
Definition at line 650 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceMap | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map | ) | [inherited] |
Replace the underlying Map with a compatible one.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reduce | ( | ) | [inherited] |
Instruct a local (non-distributed) MultiVector to sum values across all nodes.
Definition at line 1555 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subCopy | ( | const Teuchos::Range1D & | colRng | ) | const [inherited] |
Returns a MultiVector with copies of selected columns.
These methods are used to get the data underlying the MultiVector. They return data in one of three forms:
Definition at line 1008 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subCopy | ( | const Teuchos::ArrayView< const size_t > & | cols | ) | const [inherited] |
Returns a MultiVector with copies of selected columns.
Definition at line 987 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subView | ( | const Teuchos::Range1D & | colRng | ) | const [inherited] |
Returns a const MultiVector with const views of selected columns.
Definition at line 1142 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subView | ( | const Teuchos::ArrayView< const size_t > & | cols | ) | const [inherited] |
Returns a const MultiVector with const views of selected columns.
Definition at line 1094 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subViewNonConst | ( | const Teuchos::Range1D & | colRng | ) | [inherited] |
Returns a MultiVector with views of selected columns.
Definition at line 1191 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subViewNonConst | ( | const Teuchos::ArrayView< const size_t > & | cols | ) | [inherited] |
Returns a MultiVector with views of selected columns.
Definition at line 1170 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::offsetView | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | subMap, |
| size_t | offset | ||
| ) | const [inherited] |
Returns a const MultiVector view of a subset of rows.
Returns a const view of this MultiVector consisting of a subset of the rows, as specified by an offset and a sub-Map.
| In | subMap - The row map for the new MultiVector. |
| In | offset - The offset into the data of (*this). |
subMap->getNodeNumElements() + offset < this->getLocalLength() Definition at line 1029 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::offsetViewNonConst | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | subMap, |
| size_t | offset | ||
| ) | [inherited] |
Returns a non-const MultiVector view of a subset of rows.
Returns a non-const view of this MultiVector consisting of a subset of the rows, as specified by an offset and a sub-Map.
| In | subMap - The row map for the new MultiVector. |
| In | offset - The offset into the data of (*this). |
subMap->getNodeNumElements() + offset < this->getLocalLength() Definition at line 1062 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector | ( | size_t | j | ) | const [inherited] |
Const Vector access function.
Definition at line 1217 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVectorNonConst | ( | size_t | j | ) | [inherited] |
Vector access function.
Definition at line 1237 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getData | ( | size_t | j | ) | const [inherited] |
Const Local vector access function. View of the local values in a particular vector of this multi-vector.
Definition at line 934 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDataNonConst | ( | size_t | j | ) | [inherited] |
Local vector access function. View of the local values in a particular vector of this multi-vector.
Definition at line 943 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dCopy | ( | Teuchos::ArrayView< Scalar > | A, |
| size_t | LDA | ||
| ) | const [inherited] |
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management classes).
Definition at line 1251 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dCopy | ( | Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > | ArrayOfPtrs | ) | const [inherited] |
Return multi-vector values in user-provided array of pointers (using Teuchos memory management classes).
Definition at line 1279 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dView | ( | ) | const [inherited] |
Return const persisting view of values in a one-dimensional array. Throws std::runtime_error if the underlying data is non-contiguous.
Definition at line 1305 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dView | ( | ) | const [inherited] |
Return const persisting pointers to values.
Definition at line 1364 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dViewNonConst | ( | ) | [inherited] |
Return non-const persisting view of values in a one-dimensional array. Throws std::runtime_error if the underlying data is non-contiguous. Teuchos::ArrayRCP<Scalar> get1dViewNonConst();.
Definition at line 1316 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dViewNonConst | ( | ) | [inherited] |
Return non-const persisting pointers to values.
Definition at line 1328 of file Tpetra_MultiVector_def.hpp.
| const Kokkos::MultiVector< Scalar, Node > & Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalMV | ( | ) | const [inherited] |
Return a const reference to the underlying Kokkos::MultiVector object (advanced use only)
Definition at line 1684 of file Tpetra_MultiVector_def.hpp.
| Kokkos::MultiVector< Scalar, Node > & Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalMVNonConst | ( | ) | [inherited] |
Return a non-const reference to the underlying Kokkos::MultiVector object (advanced use only)
Definition at line 1690 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dot | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, |
| const Teuchos::ArrayView< Scalar > & | dots | ||
| ) | const [inherited] |
Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
Definition at line 425 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::abs | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ) | [inherited] |
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
Definition at line 812 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reciprocal | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ) | [inherited] |
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
Definition at line 770 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | const Scalar & | alpha | ) | [inherited] |
Scale the current values of a multi-vector, this = alpha*this.
Definition at line 686 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | Teuchos::ArrayView< const Scalar > | alpha | ) | [inherited] |
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
Definition at line 710 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ||
| ) | [inherited] |
Replace multi-vector values with scaled values of A, this = alpha*A.
Definition at line 734 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::update | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const Scalar & | beta | ||
| ) | [inherited] |
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
Definition at line 847 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::update | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const Scalar & | beta, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| const Scalar & | gamma | ||
| ) | [inherited] |
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
Definition at line 887 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm1 | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const [inherited] |
Compute 1-norm of each vector in multi-vector.
Definition at line 562 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm2 | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const [inherited] |
Compute 2-norm of each vector in multi-vector.
Definition at line 469 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::normInf | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const [inherited] |
Compute Inf-norm of each vector in multi-vector.
Definition at line 588 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::normWeighted | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | weights, |
| const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ||
| ) | const [inherited] |
Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.
Definition at line 500 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::meanValue | ( | const Teuchos::ArrayView< Scalar > & | means | ) | const [inherited] |
Compute mean (average) value of each vector in multi-vector.
Definition at line 614 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::multiply | ( | Teuchos::ETransp | transA, |
| Teuchos::ETransp | transB, | ||
| const Scalar & | alpha, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| const Scalar & | beta | ||
| ) | [inherited] |
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
Definition at line 1399 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::elementWiseMultiply | ( | Scalar | scalarAB, |
| const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| Scalar | scalarThis | ||
| ) | [inherited] |
Element-wise multiply of a Vector A with a MultiVector B.
Forms this = scalarThis * this + scalarAB * B @ A where @ denotes element-wise multiplication. B must be the same shape (size and num-vectors) as this, while A is the same size but a single vector (column).
Definition at line 1526 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumVectors | ( | ) | const [inline, inherited] |
Returns the number of vectors in the multi-vector.
Definition at line 412 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalLength | ( | ) | const [inherited] |
Returns the local vector length on the calling processor of vectors in the multi-vector.
Definition at line 221 of file Tpetra_MultiVector_def.hpp.
| global_size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalLength | ( | ) | const [inherited] |
Returns the global vector length of vectors in the multi-vector.
Definition at line 227 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getStride | ( | ) | const [inherited] |
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true). WARNING: this may vary from node to node.
Definition at line 233 of file Tpetra_MultiVector_def.hpp.
| bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isConstantStride | ( | ) | const [inherited] |
Returns true if this multi-vector has constant stride between vectors. WARNING: This may vary from node to node.
Definition at line 215 of file Tpetra_MultiVector_def.hpp.
| std::string Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description | ( | ) | const [inherited] |
Return a simple one-line description of this object.
Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 1695 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe | ( | Teuchos::FancyOStream & | out, |
| const Teuchos::EVerbosityLevel | verbLevel = Teuchos::Describable::verbLevel_default |
||
| ) | const [inherited] |
Print the object with some verbosity level to an FancyOStream object.
Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 1707 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< T > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getSubArrayRCP | ( | Teuchos::ArrayRCP< T > | arr, |
| size_t | j | ||
| ) | const [protected, inherited] |
Get persisting view of j-th column in given ArrayRCP, considering isConstantStride(). ArrayRCP may correspond to a compute buffer or host view.
Definition at line 1669 of file Tpetra_MultiVector_def.hpp.
| bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::checkSizes | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source | ) | [protected, virtual, inherited] |
Allows the source and target (this) objects to be compared for compatibility.
Return true if they are compatible, return false if they aren't.
Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 242 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::copyAndPermute | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| size_t | numSameIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | permuteToLIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | permuteFromLIDs | ||
| ) | [protected, virtual, inherited] |
Perform copies and permutations that are local to this image.
| source | In On entry, the DistObject that we are importing from. |
| numSameIDs | In On entry, the number of elements that are the same on the source and dest objects. (i.e. The element is owned by the same image in both source and dest, and no permutation occurs.) |
| numPermuteIDs | In On entry, the number of elements that are locally permuted between source and dest objects. |
| permuteToLIDs | In On entry, contains a list of the elements that are permuted. (Listed by their LID in the destination DistObject.) |
| permuteFromLIDs | In On entry, contains a list of the elements that are permuted. (Listed by their LID in the source DistObject.) |
Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 252 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::packAndPrepare | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Teuchos::ArrayView< const LocalOrdinal > & | exportLIDs, | ||
| Teuchos::Array< Scalar > & | exports, | ||
| const Teuchos::ArrayView< size_t > & | numPacketsPerLID, | ||
| size_t & | constantNumPackets, | ||
| Distributor & | distor | ||
| ) | [protected, virtual, inherited] |
Perform any packing or preparation required for communication.
| source | In On entry, the DistObject that we are importing from. |
| exportLIDs | In On entry, a list of the entries we will be sending to other images. (Listed by their LID in the source DistObject.) |
| exports | Out On exit, buffer for data we will be sending out. |
| numPacketsPerLID | Out On exit, numPacketsPerLID[i] contains the number of packets to be exported for exportLIDs[i]. |
| constantNumPackets | Out On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that num-packets-per-LID is constant, and constantNumPackets holds that value. |
| distor | In On entry, contains the Distributor object we are using. |
Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 284 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::unpackAndCombine | ( | const Teuchos::ArrayView< const LocalOrdinal > & | importLIDs, |
| const Teuchos::ArrayView< const Scalar > & | imports, | ||
| const Teuchos::ArrayView< size_t > & | numPacketsPerLID, | ||
| size_t | constantNumPackets, | ||
| Distributor & | distor, | ||
| CombineMode | CM | ||
| ) | [protected, virtual, inherited] |
Perform any unpacking and combining after communication.
| importLIDs | In On entry, a list of the entries we received from other images. (Listed by their LID in the target DistObject.) |
| imports | In Buffer containing data we received. |
| numPacketsPerLID | In numPacketsPerLID[i] contains the number of packets imported for importLIDs[i]. |
| constantNumPackets | In If nonzero, then numPacketsPerLID is constant (same value in all entries) and constantNumPackets is that value. |
| distor | In The Distributor object we are using. |
| CM | In The Tpetra::CombineMode to use when combining the imported entries with existing entries. |
Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 337 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::doImport | ( | const DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) | [inherited] |
Import.
| void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::doImport | ( | const DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) | [inherited] |
Import (using an Exporter)
| void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::doExport | ( | const DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) | [inherited] |
Export.
| void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::doExport | ( | const DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) | [inherited] |
Export (using an Importer)
| bool Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::isDistributed | ( | ) | const [inline, inherited] |
Accessor for whether or not this is a global object.
| const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::getMap | ( | ) | const [inline, inherited] |
Access function for the Tpetra::Map this DistObject was constructed with.
Definition at line 111 of file Tpetra_DistObject.hpp.
| void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::print | ( | std::ostream & | os | ) | const [inherited] |
Print method.
| virtual void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::doTransfer | ( | const DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node > & | source, |
| CombineMode | CM, | ||
| size_t | numSameIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | permuteToLIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | permuteFromLIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | remoteLIDs, | ||
| const Teuchos::ArrayView< const LocalOrdinal > & | exportLIDs, | ||
| Distributor & | distor, | ||
| ReverseOption | revOp | ||
| ) | [protected, virtual, inherited] |
Perform transfer (redistribution) of data across memory images.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createMultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| size_t | numVectors | ||
| ) | [related, inherited] |
Non-member function to create a MultiVector from a specified Map.
1.7.4