Tpetra parallel linear algebra
Version of the Day
|
Implementation of fill and local assembly for MultiVectorFiller. More...
#include <Tpetra_MultiVectorFiller.hpp>
Public Member Functions | |
MultiVectorFillerData (const Teuchos::RCP< const map_type > &map) | |
Default constructor (sets number of columns to zero). More... | |
MultiVectorFillerData (const Teuchos::RCP< const map_type > &map, const size_t numColumns) | |
Constructor. More... | |
void | setNumColumns (const size_t newNumColumns) |
Set the number of columns in the output multivector. More... | |
void | sumIntoGlobalValues (const Teuchos::ArrayView< const global_ordinal_type > &rows, const Teuchos::ArrayView< const scalar_type > &values) |
template<class BinaryFunction > | |
void | locallyAssemble (MV &X, BinaryFunction &f) |
Locally assemble into X. More... | |
void | locallyAssemble (MV &X) |
Overload of locallyAssemble() for the usual ADD combine mode. More... | |
void | clear () |
Clear the contents of the vector, making it implicitly a vector of zeros. More... | |
Teuchos::Array< global_ordinal_type > | getSourceIndices () const |
All source indices (local and nonlocal) of the source Map, sorted and unique. More... | |
Implementation of fill and local assembly for MultiVectorFiller.
MV | Specialization of Tpetra::MultiVector. |
Definition at line 110 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Default constructor (sets number of columns to zero).
map | [in] Map, which this object may or may not use as a hint to separate local from nonlocal data. This need not be the same Map as that of the multivector output of globalAssemble(). |
Before using this object, you should call setNumColumns() to set the number of columns in the output multivector. Otherwise, the two-argument version of sumIntoGlobalValues() won't actually do anything.
Definition at line 130 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Constructor.
map | [in] Map, which this object may or may not use as a hint to separate local from nonlocal data. This need not be the same Map as that of the multivector output of globalAssemble(). |
numColumns | [in] The (expected) number of columns in the output multivector. You can always change this later by calling setNumColumns(). |
Definition at line 151 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Set the number of columns in the output multivector.
Definition at line 161 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Data for each column are stored contiguously in rows and in values. Thus, rows and values are in rowwise order, even though they may be stored in columnwise order in the multivector.
Be sure that the number of columns is set correctly before calling this.
Definition at line 201 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Locally assemble into X.
X | [in/out] Multivector (overlapping source distribution). |
f | [in/out] Binary function that defines the combine mode. It must define scalar_type operator (const scalar_type&, const scalar_type&). It need not necessarily be commutative or even associative, but it should be thread-safe in case we decide to parallelize local assembly. We call it via X(i,j) = f(X(i,j), Y(i,j)), so write your possibly nonassociative or noncommutative operation accordingly. |
X is distributed by the source Map (with possible overlap) of the Export operation. The source Map of the Export includes both the elements owned by this object's constructor's input Map, and the indices inserted by sumIntoGlobalValues().
Precondition: The set of global indices in X's Map equals the the union of the entries of nonlocalIndices_[j] for all valid columns j.
Definition at line 248 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Overload of locallyAssemble() for the usual ADD combine mode.
Definition at line 288 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
Clear the contents of the vector, making it implicitly a vector of zeros.
Definition at line 295 of file Tpetra_MultiVectorFiller.hpp.
|
inline |
All source indices (local and nonlocal) of the source Map, sorted and unique.
Definition at line 305 of file Tpetra_MultiVectorFiller.hpp.