|
Tpetra Matrix/Vector Services
Version of the Day
|
Nonowning view of a set of degrees of freedom corresponding to a mesh point in a block vector or multivector. More...
#include <Tpetra_Experimental_BlockView.hpp>
Public Member Functions | |
| LittleVector (Scalar *const A, const LO blockSize, const LO stride) | |
| Constructor. | |
| Scalar * | getRawPtr () const |
| Pointer to the block's entries. | |
| LO | getBlockSize () const |
| The block size (number of degrees of freedom per mesh point). | |
| LO | getStride () const |
| Stride between consecutive entries. | |
| Scalar & | operator() (const LO i) const |
| Reference to entry (i) of the vector. | |
| template<class LittleVectorType > | |
| void | update (const Scalar &alpha, const LittleVectorType &X) const |
*this := *this + alpha * X. | |
| template<class LittleVectorType > | |
| void | assign (const LittleVectorType &X) const |
*this := X. | |
| void | scale (const Scalar &alpha) const |
(*this)(i,j) := alpha * (*this)(i,j) for all (i,j). | |
| void | fill (const Scalar &alpha) const |
(*this)(i,j) := alpha for all (i,j). | |
| template<class LittleVectorType > | |
| void | absmax (const LittleVectorType &X) const |
(*this)(i,j) := max(abs((*this)(i,j)), abs(X(i,j))) for all (i,j). | |
| template<class LittleVectorType > | |
| bool | equal (const LittleVectorType &X) const |
| true if and only if all entries of this equal all entries of X. | |
| template<class LittleBlockType , class LittleVectorType > | |
| void | matvecUpdate (const Scalar &alpha, const LittleBlockType &A, const LittleVectorType &X) const |
(*this) := (*this) + alpha * A * X (matrix-vector multiply). | |
Nonowning view of a set of degrees of freedom corresponding to a mesh point in a block vector or multivector.
| Scalar | The type of entries. |
| LO | The type of local indices. See the documentation of the first template parameter of Map for requirements. |
"Little" means local (not distributed over multiple MPI processes; stored to maximize locality) and small (think length 3, not length 1000).
The Scalar template parameter may be const or nonconst. This is one reason why instance methods below that take a LittleVector accept it as a template parameter: that lets you add a const LittleVector (e.g., LittleVector<const double, int>) to a nonconst LittleVector (e.g., LittleVector<double, int>).
Definition at line 214 of file Tpetra_Experimental_BlockView.hpp.
| Tpetra::Experimental::LittleVector< Scalar, LO >::LittleVector | ( | Scalar *const | A, |
| const LO | blockSize, | ||
| const LO | stride | ||
| ) | [inline] |
Constructor.
| A | [in] Pointer to the vector's entries |
| blockSize | [in] Dimension of the vector |
| stride | [in] Stride between consecutive entries |
Definition at line 223 of file Tpetra_Experimental_BlockView.hpp.
| Scalar* Tpetra::Experimental::LittleVector< Scalar, LO >::getRawPtr | ( | ) | const [inline] |
Pointer to the block's entries.
Definition at line 228 of file Tpetra_Experimental_BlockView.hpp.
| LO Tpetra::Experimental::LittleVector< Scalar, LO >::getBlockSize | ( | ) | const [inline] |
The block size (number of degrees of freedom per mesh point).
Definition at line 233 of file Tpetra_Experimental_BlockView.hpp.
| LO Tpetra::Experimental::LittleVector< Scalar, LO >::getStride | ( | ) | const [inline] |
Stride between consecutive entries.
Definition at line 238 of file Tpetra_Experimental_BlockView.hpp.
| Scalar& Tpetra::Experimental::LittleVector< Scalar, LO >::operator() | ( | const LO | i | ) | const [inline] |
Reference to entry (i) of the vector.
Definition at line 243 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::update | ( | const Scalar & | alpha, |
| const LittleVectorType & | X | ||
| ) | const [inline] |
*this := *this + alpha * X.
Definition at line 249 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::assign | ( | const LittleVectorType & | X | ) | const [inline] |
*this := X.
Definition at line 257 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::scale | ( | const Scalar & | alpha | ) | const [inline] |
(*this)(i,j) := alpha * (*this)(i,j) for all (i,j).
Definition at line 264 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::fill | ( | const Scalar & | alpha | ) | const [inline] |
(*this)(i,j) := alpha for all (i,j).
Definition at line 271 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::absmax | ( | const LittleVectorType & | X | ) | const [inline] |
(*this)(i,j) := max(abs((*this)(i,j)), abs(X(i,j))) for all (i,j).
Tpetra uses this operation to implement the ABSMAX CombineMode.
Definition at line 282 of file Tpetra_Experimental_BlockView.hpp.
| bool Tpetra::Experimental::LittleVector< Scalar, LO >::equal | ( | const LittleVectorType & | X | ) | const [inline] |
true if and only if all entries of this equal all entries of X.
Definition at line 291 of file Tpetra_Experimental_BlockView.hpp.
| void Tpetra::Experimental::LittleVector< Scalar, LO >::matvecUpdate | ( | const Scalar & | alpha, |
| const LittleBlockType & | A, | ||
| const LittleVectorType & | X | ||
| ) | const [inline] |
(*this) := (*this) + alpha * A * X (matrix-vector multiply).
Definition at line 306 of file Tpetra_Experimental_BlockView.hpp.
1.7.6.1