Tpetra Matrix/Vector Services Version of the Day
Protected Member Functions | Protected Attributes | Related Functions
Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Block-entry specialization of Tpetra::MultiVector. More...

#include <Tpetra_BlockMultiVector_decl.hpp>

Inheritance diagram for Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

List of all members.

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 value, using global (row) index.
void sumIntoGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using global (row) index.
void replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Replace value, using local (row) index.
void sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using local (row) index.
void putScalar (const Scalar &value)
 Set all values in the multivector with the given value.
void randomize ()
 Set all values in the multivector to pseudorandom numbers.
void replaceMap (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
 Replace the underlying Map with a compatible one.
void reduce ()
 For a locally replicated multivector: sum values across all processes.
Data Copy and View get methods
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
subCopy (const Teuchos::Range1D &colRng) const
 Return a MultiVector with copies of selected columns.
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
subCopy (const Teuchos::ArrayView< const size_t > &cols) const
 Return a MultiVector with copies of selected columns.
Teuchos::RCP< const
MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
subView (const Teuchos::Range1D &colRng) const
 Return 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
 Return a const MultiVector with const views of selected columns.
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
subViewNonConst (const Teuchos::Range1D &colRng)
 Return a MultiVector with views of selected columns.
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
subViewNonConst (const Teuchos::ArrayView< const size_t > &cols)
 Return 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
 Return 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)
 Return a non-const MultiVector view of a subset of rows.
Teuchos::RCP< const Vector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
getVector (size_t j) const
 Return a Vector which is a const view of column j.
Teuchos::RCP< Vector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getVectorNonConst (size_t j)
 Return a Vector which is a nonconst view of column j.
Teuchos::ArrayRCP< const Scalar > getData (size_t j) const
 Const view of the local values in a particular vector of this multivector.
Teuchos::ArrayRCP< Scalar > getDataNonConst (size_t j)
 View of the local values in a particular vector of this multivector.
void get1dCopy (Teuchos::ArrayView< Scalar > A, size_t LDA) const
 Fill the given array with a copy of this multivector's local values.
void get2dCopy (Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > ArrayOfPtrs) const
 Fill the given array with a copy of this multivector's local values.
Teuchos::ArrayRCP< const Scalar > get1dView () const
 Const persisting (1-D) view of this multivector's local values.
Teuchos::ArrayRCP
< Teuchos::ArrayRCP< const
Scalar > > 
get2dView () const
 Return const persisting pointers to values.
Teuchos::ArrayRCP< Scalar > get1dViewNonConst ()
 Nonconst persisting (1-D) view of this multivector's local values.
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
 Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
void abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
 Put element-wise absolute values of input Multi-vector in target: A = abs(this)
void reciprocal (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
 Put 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
 Number of columns in the multivector.
size_t getLocalLength () const
 Local number of rows on the calling process.
global_size_t getGlobalLength () const
 Global number of rows in the multivector.
size_t getStride () const
 Stride between columns in the multivector.
bool isConstantStride () const
 Whether this multivector has constant stride between columns.
Overridden from Teuchos::Describable
std::string description () const
 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 the given verbosity level to a FancyOStream.
Public methods for redistributing data
void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Import using an Import object ("forward mode").
void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Import using an Export object ("reverse mode").
void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Export using an Export object ("forward mode").
void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Export using an Import object ("reverse mode").
Attribute accessor methods
bool isDistributed () const
 Whether this is a globally distributed object.
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 this object to the given output stream.

Protected Member Functions

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)
 Redistribute data across memory images.

Protected Attributes

KMV lclMV_
 The Kokkos::MultiVector containing the compute buffer of data.
Array< size_t > whichVectors_
 Indices of columns this multivector is viewing.
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 >
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
createMultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t numVectors)
 Nonmember MultiVector constructor: make a MultiVector from a given Map.

View constructors, used only by nonmember constructors.

template<class S , class LO , class GO , class N >
RCP< MultiVector< S, LO, GO, N > > createMultiVectorFromView (const Teuchos::RCP< const Map< LO, GO, N > > &, const Teuchos::ArrayRCP< S > &, size_t, size_t)
bool vectorIndexOutOfRange (size_t VectorIndex) const
template<class T >
ArrayRCP< T > getSubArrayRCP (ArrayRCP< T > arr, size_t j) const
 Persisting view of j-th column in the given ArrayRCP.

Implementation of Tpetra::DistObject

ArrayRCP< Scalar > ncview_
 Nonconst host view created in createViewsNonConst().
ArrayRCP< const Scalar > cview_
 Const host view created in createViews().
bool checkSizes (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj)
 Whether data redistribution between sourceObj and this object is legal.
void copyAndPermute (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj, size_t numSameIDs, const ArrayView< const LocalOrdinal > &permuteToLIDs, const ArrayView< const LocalOrdinal > &permuteFromLIDs)
 Perform copies and permutations that are local to this process.
void packAndPrepare (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceObj, const ArrayView< const LocalOrdinal > &exportLIDs, Array< Scalar > &exports, const ArrayView< size_t > &numExportPacketsPerLID, size_t &constantNumPackets, Distributor &distor)
 Perform any packing or preparation required for communication.
void unpackAndCombine (const ArrayView< const LocalOrdinal > &importLIDs, const ArrayView< const Scalar > &imports, const ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)
 Perform any unpacking and combining after communication.
void createViews () const
 Hook for creating a const view.
void createViewsNonConst (Kokkos::ReadWriteOption rwo)
 Hook for creating a nonconst view.
void releaseViews () const
 Hook for releasing views.

Detailed Description

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Block-entry specialization of Tpetra::MultiVector.

This class inherits (is-a) Tpetra::MultiVector, adding block-entry functionality for referencing/accessing data.

Definition at line 60 of file Tpetra_BlockMultiVector_decl.hpp.


Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Tpetra::BlockMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~BlockMultiVector ( ) [inline]

Destructor.

Definition at line 73 of file Tpetra_BlockMultiVector_decl.hpp.


Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 75 of file Tpetra_BlockMultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 84 of file Tpetra_BlockMultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 93 of file Tpetra_BlockMultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 102 of file Tpetra_BlockMultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar &  value 
) [inherited]

Replace value, using global (row) index.

Replace the current value at row globalRow (a global index) and column vectorIndex with the given value. The column index is zero based.

Precondition:
globalRow must be a valid global element on this process, according to the row Map.

Definition at line 2056 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar &  value 
) [inherited]

Add value to existing value, using global (row) index.

Add the given value to the existing value at row globalRow (a global index) and column vectorIndex. The column index is zero based.

Precondition:
globalRow must be a valid global element on this process, according to the row Map.

Definition at line 2070 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar &  value 
) [inherited]

Replace value, using local (row) index.

Replace the current value at row myRow (a local index) and column vectorIndex with the given value. The column index is zero based.

Precondition:
myRow must be a valid local element on this process, according to the row Map.

Definition at line 2020 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar &  value 
) [inherited]

Add value to existing value, using local (row) index.

Add the given value to the existing value at row myRow (a local index) and column vectorIndex. The column index is zero based.

Precondition:
myRow must be a valid local element on this process, according to the row Map.

Definition at line 2038 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::putScalar ( const Scalar &  value) [inherited]

Set all values in the multivector with the given value.

Definition at line 905 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::randomize ( ) [inherited]

Set all values in the multivector to pseudorandom numbers.

Note:
The implementation of this method may depend on the Kokkos Node type and on what third-party libraries you have available. Do not expect repeatable results.
Behavior of this method may or may not depend on external use of the C library routines srand() and rand().
Warning:
This method does not promise to use a distributed-memory parallel pseudorandom number generator. Corresponding values on different processes might be correlated. It also does not promise to use a high-quality pseudorandom number generator within each process.

Definition at line 884 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceMap ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map) [inherited]

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.

We only check for compatibility in debug mode (when Trilinos was built with the Trilinos_ENABLE_DEBUG option set). In that case, if the input Map is not compatible, then this method throws std::invalid_argument. We only check in debug mode because the check requires communication ( $O(1)$ all-reduces).

Note:
This method is not for arbitrary data redistribution. If you need to move data around, use Import or Export.
This method must always be called as a collective operation on all processes over which the multivector is distributed. This is because the method reserves the right to check for compatibility of the two Maps, at least in debug mode.

Definition at line 926 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reduce ( ) [inherited]

For a locally replicated multivector: sum values across all processes.

Definition at line 1951 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subCopy ( const Teuchos::Range1D colRng) const [inherited]

Return 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:

  • a MultiVector with a subset of the columns of the target MultiVector
  • a raw C pointer or array of raw C pointers
  • one of the Teuchos memory management classes Not all of these methods are valid for a particular MultiVector. For instance, calling a method that accesses a view of the data in a 1-D format (i.e., get1dView) requires that the target MultiVector has constant stride.

Definition at line 1312 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subCopy ( const Teuchos::ArrayView< const size_t > &  cols) const [inherited]

Return a MultiVector with copies of selected columns.

Definition at line 1285 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subView ( const Teuchos::Range1D colRng) const [inherited]

Return a const MultiVector with const views of selected columns.

Definition at line 1471 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subView ( const Teuchos::ArrayView< const size_t > &  cols) const [inherited]

Return a const MultiVector with const views of selected columns.

Definition at line 1418 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subViewNonConst ( const Teuchos::Range1D colRng) [inherited]

Return a MultiVector with views of selected columns.

Definition at line 1532 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::subViewNonConst ( const Teuchos::ArrayView< const size_t > &  cols) [inherited]

Return a MultiVector with views of selected columns.

Definition at line 1505 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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]

Return a const MultiVector view of a subset of rows.

Return a const view of this MultiVector consisting of a subset of the rows, as specified by an offset and a subset Map of this MultiVector's current row Map.

Parameters:
InsubMap - The row Map for the new MultiVector.
Inoffset - The offset into the data of (*this).
Precondition:
subMap->getNodeNumElements() + offset < this->getLocalLength()
The given Map must be a subset Map of this MultiVector's row Map.

Definition at line 1339 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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]

Return 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 subset Map of this MultiVector's current row Map.

Parameters:
InsubMap - The row Map for the new MultiVector.
Inoffset - The offset into the data of (*this).
Precondition:
subMap->getNodeNumElements() + offset < this->getLocalLength()
The given Map must be a subset Map of this MultiVector's row Map.

Definition at line 1378 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector ( size_t  j) const [inherited]

Return a Vector which is a const view of column j.

Definition at line 1565 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVectorNonConst ( size_t  j) [inherited]

Return a Vector which is a nonconst view of column j.

Definition at line 1590 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getData ( size_t  j) const [inherited]

Const view of the local values in a particular vector of this multivector.

Definition at line 1223 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDataNonConst ( size_t  j) [inherited]

View of the local values in a particular vector of this multivector.

Definition at line 1234 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dCopy ( Teuchos::ArrayView< Scalar >  A,
size_t  LDA 
) const [inherited]

Fill the given array with a copy of this multivector's local values.

Parameters:
A[out] View of the array to fill. We consider A as a matrix with column-major storage.
LDA[in] Leading dimension of the matrix A.

Definition at line 1611 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dCopy ( Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > >  ArrayOfPtrs) const [inherited]

Fill the given array with a copy of this multivector's local values.

Parameters:
ArrayOfPtrs[out] Array of arrays, one for each column of the multivector. On output, we fill ArrayOfPtrs[j] with the data for column j of this multivector.

Definition at line 1646 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dView ( ) const [inherited]

Const persisting (1-D) view of this multivector's local values.

This method assumes that the columns of the multivector are stored contiguously. If not, this method throws std::runtime_error.

Definition at line 1680 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dView ( ) const [inherited]

Return const persisting pointers to values.

Definition at line 1744 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Scalar > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get1dViewNonConst ( ) [inherited]

Nonconst persisting (1-D) view of this multivector's local values.

This method assumes that the columns of the multivector are stored contiguously. If not, this method throws std::runtime_error.

Definition at line 1692 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::get2dViewNonConst ( ) [inherited]

Return non-const persisting pointers to values.

Definition at line 1704 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 2104 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 2110 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dot ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Teuchos::ArrayView< Scalar > &  dots 
) const [inherited]

Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])

Definition at line 596 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::abs ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A) [inherited]

Put element-wise absolute values of input Multi-vector in target: A = abs(this)

Definition at line 1089 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reciprocal ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A) [inherited]

Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).

Definition at line 1042 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 940 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 970 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 999 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 1127 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 1171 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 763 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 645 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 798 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 691 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 833 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 1785 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
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 1916 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumVectors ( ) const [inline, inherited]

Number of columns in the multivector.

Definition at line 583 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalLength ( ) const [inherited]

Local number of rows on the calling process.

Definition at line 319 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalLength ( ) const [inherited]

Global number of rows in the multivector.

Definition at line 325 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getStride ( ) const [inherited]

Stride between columns in the multivector.

This is only meaningful if isConstantStride() returns true.

Warning:
This may be different on different processes.

Definition at line 331 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isConstantStride ( ) const [inherited]

Whether this multivector has constant stride between columns.

Warning:
This may be different on different processes.

Definition at line 313 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
std::string Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description ( ) const [virtual, inherited]

A simple one-line description of this object.

Reimplemented from Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2116 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual, inherited]

Print the object with the given verbosity level to a FancyOStream.

Parameters:
out[out] Output stream to which to print. For verbosity levels VERB_LOW and lower, only the process with rank 0 ("Proc 0") in the MultiVector's communicator prints. For verbosity levels strictly higher than VERB_LOW, all processes in the communicator need to be able to print to the output stream.
verbLevel[in] Verbosity level. The default verbosity (verbLevel=VERB_DEFAULT) is VERB_LOW.

The amount and content of what this method prints depends on the verbosity level. In the list below, each higher level includes all the content of the previous levels, as well as its own content.

  • VERB_LOW: Only Proc 0 prints; it prints the same thing as description().
  • VERB_MEDIUM: Each process prints its local length (the number of rows that it owns).
  • VERB_HIGH: Each process prints whether the multivector has constant stride (see isConstantStride()), and if so, what that stride is. (Stride may differ on different processes.)
  • VERB_EXTREME: Each process prints the values in its local part of the multivector. This will print out as many rows of data as the global number of rows in the multivector, so beware.

Reimplemented from Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Reimplemented in Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2130 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
template<class T >
Teuchos::ArrayRCP< T > Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getSubArrayRCP ( Teuchos::ArrayRCP< T >  arr,
size_t  j 
) const [protected, inherited]

Persisting view of j-th column in the given ArrayRCP.

This method considers isConstantStride(). The ArrayRCP may correspond either to a compute buffer or a host view.

Definition at line 2087 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::checkSizes ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  sourceObj) [protected, virtual, inherited]

Whether data redistribution between sourceObj and this object is legal.

This method is called in DistObject::doTransfer() to check whether data redistribution between the two objects is legal.

Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 342 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::copyAndPermute ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  source,
size_t  numSameIDs,
const ArrayView< const LocalOrdinal > &  permuteToLIDs,
const ArrayView< const LocalOrdinal > &  permuteFromLIDs 
) [protected, virtual, inherited]

Perform copies and permutations that are local to this process.

Parameters:
source[in] On entry, the source object, from which we are distributing. We distribute to the destination object, which is *this object.
numSameIDs[in] The umber of elements that are the same on the source and destination (this) objects. These elements are owned by the same process in both the source and destination objects. No permutation occurs.
numPermuteIDs[in] The number of elements that are locally permuted between the source and destination objects.
permuteToLIDs[in] List of the elements that are permuted. They are listed by their LID in the destination object.
permuteFromLIDs[in] List of the elements that are permuted. They are listed by their LID in the source object.

Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 362 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::packAndPrepare ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  source,
const ArrayView< const LocalOrdinal > &  exportLIDs,
Array< Scalar > &  exports,
const ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) [protected, virtual, inherited]

Perform any packing or preparation required for communication.

Parameters:
source[in] Source object for the redistribution.
exportLIDs[in] List of the entries (as local IDs in the source object) we will be sending to other images.
exports[out] On exit, the buffer for data to send.
numPacketsPerLID[out] On exit, numPacketsPerLID[i] contains the number of packets to be exported for exportLIDs[i]. If constantNumPackets is nonzero, you should use that instead, and not rely on numPacketsPerLID[i] being filled.
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] The Distributor object we are using.

Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 416 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::unpackAndCombine ( const ArrayView< const LocalOrdinal > &  importLIDs,
const ArrayView< const Scalar > &  imports,
const ArrayView< size_t > &  numPacketsPerLID,
size_t  constantNumPackets,
Distributor distor,
CombineMode  CM 
) [protected, virtual, inherited]

Perform any unpacking and combining after communication.

Parameters:
importLIDs[in] List of the entries (as LIDs in the destination object) we received from other images.
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. If zero, use numPacketsPerLID[i] instead.
distor[in] The Distributor object we are using.
CM[in] The combine mode to use when combining the imported entries with existing entries.

Implements Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 479 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createViews ( ) const [protected, virtual, inherited]

Hook for creating a const view.

doTransfer() calls this on the source object. By default, it does nothing, but the source object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.

Reimplemented from Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2203 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createViewsNonConst ( Kokkos::ReadWriteOption  rwo) [protected, virtual, inherited]

Hook for creating a nonconst view.

doTransfer() calls this on the destination (*this) object. By default, it does nothing, but the destination object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.

Parameters:
rwo[in] Whether to create a write-only or a read-and-write view. For Kokkos Node types where compute buffers live in a separate memory space (e.g., in the device memory of a discrete accelerator like a GPU), a write-only view only requires copying from host memory to the compute buffer, whereas a read-and-write view requires copying both ways (once to read, from the compute buffer to host memory, and once to write, back to the compute buffer).

Reimplemented from Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2226 of file Tpetra_MultiVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::releaseViews ( ) const [protected, virtual, inherited]

Hook for releasing views.

doTransfer() calls this on both the source and destination objects, once it no longer needs to access that object's data. By default, this method does nothing. Implementations may use this as a hint to free host memory which is a view of a compute buffer, once the host memory view is no longer needed. Some implementations may prefer to mirror compute buffers in host memory; for these implementations, releaseViews() may do nothing.

Reimplemented from Tpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2249 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 using an Import object ("forward mode").

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 Export object ("reverse mode").

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 using an Export object ("forward mode").

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 Import object ("reverse mode").

bool Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::isDistributed ( ) const [inline, inherited]

Whether this is a globally distributed object.

For a definition of "globally distributed" (and its opposite, "locally replicated"), see the documentation of Map's isDistributed() method.

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 172 of file Tpetra_DistObject.hpp.

void Tpetra::DistObject< Scalar , LocalOrdinal, GlobalOrdinal, Node >::print ( std::ostream &  os) const [inherited]

Print this object to the given output stream.

We generally assume that all MPI processes can print to the given stream.

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]

Redistribute data across memory images.

Parameters:
source[in] The source object, to redistribute into the destination object, which is *this object.
CM[in] The combine mode that describes how to combine values that map to the same global ID on the same process.
permuteToLIDs[in] See copyAndPermute().
permuteFromLIDs[in] See copyAndPermute().
remoteLIDs[in] List of entries (as local IDs) in the destination object to receive from other processes.
exportLIDs[in] See packAndPrepare().
distor[in/out] The Distributor object that knows how to redistribute data.
revOp[in] Whether to do a forward or reverse mode redistribution.

Friends And Related Function Documentation

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 
) [related, inherited]

Nonmember MultiVector constructor: make a MultiVector from a given Map.

Parameters:
map[in] Map describing the distribution of rows of the resulting MultiVector.
numVectors[in] Number of columns of the resulting MultiVector.

Definition at line 623 of file Tpetra_MultiVector_decl.hpp.


Member Data Documentation

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
KMV Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::lclMV_ [protected, inherited]

The Kokkos::MultiVector containing the compute buffer of data.

Definition at line 512 of file Tpetra_MultiVector_decl.hpp.

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Array<size_t> Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::whichVectors_ [protected, inherited]

Indices of columns this multivector is viewing.

If this array has nonzero size, it contains the indices of columns of another multivector, of which this multivector is a view.

Definition at line 519 of file Tpetra_MultiVector_decl.hpp.

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
ArrayRCP<Scalar> Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ncview_ [mutable, protected, inherited]

Nonconst host view created in createViewsNonConst().

Definition at line 607 of file Tpetra_MultiVector_decl.hpp.

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
ArrayRCP<const Scalar> Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::cview_ [mutable, protected, inherited]

Const host view created in createViews().

Definition at line 610 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 390 of file Tpetra_DistObject.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines