|
Tpetra Matrix/Vector Services Version of the Day
|
A class for constructing and using dense, distributors multivectors. More...
#include <Tpetra_MultiVector_decl.hpp>

Public Member Functions | |
Constructor/Destructor Methods | |
| MultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true) | |
| Basic MultiVector constuctor. | |
| MultiVector (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source) | |
| MultiVector copy constructor. | |
| MultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Scalar > &A, size_t LDA, size_t NumVectors) | |
| Set multi-vector values from two-dimensional array using Teuchos memory management classes. (copy) | |
| MultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > &ArrayOfPtrs, size_t NumVectors) | |
| Set multi-vector values from array of pointers using Teuchos memory management classes. (copy) | |
| virtual | ~MultiVector () |
| MultiVector destructor. | |
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. | |
| MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | operator= (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source) |
| = Operator. | |
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 |
| True if this is a globally distributed object, else false. | |
| const Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getMap () const |
| The Map with which this DistObject was constructed. | |
I/O methods | |
| void | print (std::ostream &os) const |
| Print method. | |
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. | |
| MultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, Teuchos::ArrayRCP< Scalar > data, size_t LDA, Teuchos::ArrayView< const size_t > whichVectors) | |
| Advanced constructor for non-contiguous views. | |
| MultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, Teuchos::ArrayRCP< Scalar > data, size_t LDA, size_t NumVectors) | |
| Advanced constructor for contiguous views. | |
| bool | checkSizes (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj) |
| Compare the source and target (this) objects 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. | |
Protected Attributes | |
| Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | map_ |
| The Map over which this object is distributed. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node > | |
| RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | createMultiVector (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t numVectors) |
| Non-member function to create a MultiVector from a specified Map. | |
A class for constructing and using dense, distributors multivectors.
This class is templated on Scalar, LocalOrdinal and GlobalOrdinal. The LocalOrdinal type, if omitted, defaults to int. The GlobalOrdinal type, if omitted, defaults to the LocalOrdinal type.
Definition at line 74 of file Tpetra_MultiVector_decl.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| size_t | NumVectors, | ||
| bool | zeroOut = true |
||
| ) |
Basic MultiVector constuctor.
Definition at line 59 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source | ) |
MultiVector copy constructor.
Definition at line 83 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| const Teuchos::ArrayView< const Scalar > & | A, | ||
| size_t | LDA, | ||
| size_t | NumVectors | ||
| ) |
Set multi-vector values from two-dimensional array using Teuchos memory management classes. (copy)
Post-condition: constantStride() == true
Definition at line 111 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > & | ArrayOfPtrs, | ||
| size_t | NumVectors | ||
| ) |
Set multi-vector values from array of pointers using Teuchos memory management classes. (copy)
Post-condition: constantStride() == true
Definition at line 148 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~MultiVector | ( | ) | [virtual] |
MultiVector destructor.
Definition at line 227 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| Teuchos::ArrayRCP< Scalar > | data, | ||
| size_t | LDA, | ||
| Teuchos::ArrayView< const size_t > | whichVectors | ||
| ) | [protected] |
Advanced constructor for non-contiguous views.
Definition at line 182 of file Tpetra_MultiVector_def.hpp.
| Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| Teuchos::ArrayRCP< Scalar > | data, | ||
| size_t | LDA, | ||
| size_t | NumVectors | ||
| ) | [protected] |
Advanced constructor for contiguous views.
Definition at line 211 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
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 1705 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
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 1720 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
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 1677 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) |
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 1691 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::putScalar | ( | const Scalar & | value | ) |
Initialize all values in a multi-vector with specified value.
Definition at line 709 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::randomize | ( | ) |
Set multi-vector values to random numbers.
Definition at line 691 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceMap | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map | ) |
Replace the underlying Map with a compatible one.
This method relabels the rows of the multivector using the global IDs in the input Map. Thus, it implicitly applies a permutation, without actually moving data. This only works if the input Map is compatible (in the sense of Map::isCompatible()) with the multivector's current Map, so that the number of rows per process does not change. If the input Map is not compatible, then this method throws std::invalid_argument.
Import or Export.Replace the underlying Map with a compatible one. This method does not perform a redistribution of data, just an implicit permutation. The new map must have the same number of GIDs on each process as the old map, although this method does not explicitly check this property.
Definition at line 731 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reduce | ( | ) |
Instruct a local (non-distributed) MultiVector to sum values across all nodes.
Definition at line 1618 of file Tpetra_MultiVector_def.hpp.
| MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::operator= | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source | ) |
= Operator.
| In | A - Multivector to copy |
Definition at line 1011 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 |
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 1068 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 |
Returns a MultiVector with copies of selected columns.
Definition at line 1047 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 |
Returns a const MultiVector with const views of selected columns.
Definition at line 1202 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 |
Returns a const MultiVector with const views of selected columns.
Definition at line 1154 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subViewNonConst | ( | const Teuchos::Range1D & | colRng | ) |
Returns a MultiVector with views of selected columns.
Definition at line 1251 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 | ) |
Returns a MultiVector with views of selected columns.
Definition at line 1230 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 |
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 1089 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 | ||
| ) |
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 1122 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 |
Const Vector access function.
Definition at line 1277 of file Tpetra_MultiVector_def.hpp.
| Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVectorNonConst | ( | size_t | j | ) |
Vector access function.
Definition at line 1297 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getData | ( | size_t | j | ) | const |
Const Local vector access function. View of the local values in a particular vector of this multi-vector.
Definition at line 993 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDataNonConst | ( | size_t | j | ) |
Local vector access function. View of the local values in a particular vector of this multi-vector.
Definition at line 1002 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dCopy | ( | Teuchos::ArrayView< Scalar > | A, |
| size_t | LDA | ||
| ) | const |
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management classes).
Definition at line 1311 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dCopy | ( | Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > | ArrayOfPtrs | ) | const |
Return multi-vector values in user-provided array of pointers (using Teuchos memory management classes).
Definition at line 1340 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dView | ( | ) | const |
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 1367 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dView | ( | ) | const |
Return const persisting pointers to values.
Definition at line 1426 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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();.
Definition at line 1378 of file Tpetra_MultiVector_def.hpp.
| Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dViewNonConst | ( | ) |
Return non-const persisting pointers to values.
Definition at line 1390 of file Tpetra_MultiVector_def.hpp.
| const Kokkos::MultiVector< Scalar, Node > & Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalMV | ( | ) | const |
Return a const reference to the underlying Kokkos::MultiVector object (advanced use only)
Definition at line 1751 of file Tpetra_MultiVector_def.hpp.
| Kokkos::MultiVector< Scalar, Node > & Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalMVNonConst | ( | ) |
Return a non-const reference to the underlying Kokkos::MultiVector object (advanced use only)
Definition at line 1757 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 |
Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
Definition at line 464 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::abs | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ) |
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
Definition at line 868 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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).
Definition at line 825 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | const Scalar & | alpha | ) |
Scale the current values of a multi-vector, this = alpha*this.
Definition at line 740 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | Teuchos::ArrayView< const Scalar > | alpha | ) |
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
Definition at line 764 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ||
| ) |
Replace multi-vector values with scaled values of A, this = alpha*A.
Definition at line 788 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 | ||
| ) |
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
Definition at line 904 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 | ||
| ) |
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
Definition at line 945 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm1 | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute 1-norm of each vector in multi-vector.
Definition at line 603 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm2 | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute 2-norm of each vector in multi-vector.
Definition at line 509 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::normInf | ( | const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute Inf-norm of each vector in multi-vector.
Definition at line 629 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 |
Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.
Definition at line 540 of file Tpetra_MultiVector_def.hpp.
| void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::meanValue | ( | const Teuchos::ArrayView< Scalar > & | means | ) | const |
Compute mean (average) value of each vector in multi-vector.
Definition at line 655 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 | ||
| ) |
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
Definition at line 1461 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 | ||
| ) |
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 1588 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumVectors | ( | ) | const [inline] |
Returns the number of vectors in the multi-vector.
Definition at line 451 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalLength | ( | ) | const |
Returns the local vector length on the calling processor of vectors in the multi-vector.
Definition at line 238 of file Tpetra_MultiVector_def.hpp.
| global_size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalLength | ( | ) | const |
Returns the global vector length of vectors in the multi-vector.
Definition at line 244 of file Tpetra_MultiVector_def.hpp.
| size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::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.
Definition at line 250 of file Tpetra_MultiVector_def.hpp.
| bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isConstantStride | ( | ) | const |
Returns true if this multi-vector has constant stride between vectors. WARNING: This may vary from node to node.
Definition at line 232 of file Tpetra_MultiVector_def.hpp.
| std::string Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description | ( | ) | const [virtual] |
Return a simple one-line description of this object.
Reimplemented from Teuchos::Describable.
Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 1762 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 [virtual] |
Print the object with some verbosity level to an FancyOStream object.
Reimplemented from Teuchos::Describable.
Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 1774 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] |
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 1736 of file Tpetra_MultiVector_def.hpp.
| bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::checkSizes | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source | ) | [protected, virtual] |
Compare the source and target (this) objects for compatibility.
Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 259 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] |
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 269 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] |
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 301 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] |
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 354 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] |
True if this is a globally distributed object, else false.
For a definition of "globally distributed" (and its opposite, "locally replicated"), see the documentation of Map.
| const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::getMap | ( | ) | const [inline, inherited] |
The Map with which this DistObject was constructed.
Definition at line 134 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.
| RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createMultiVector | ( | const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| size_t | numVectors | ||
| ) | [related] |
Non-member function to create a MultiVector from a specified Map.
Definition at line 403 of file Tpetra_MultiVector_decl.hpp.
Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::map_ [protected, inherited] |
The Map over which this object is distributed.
Definition at line 254 of file Tpetra_DistObject.hpp.
1.7.4