Interface for multivectors used by Belos' linear solvers. More...
#include <BelosMultiVec.hpp>
Interface for multivectors used by Belos' linear solvers.
Belos accesses multivectors through a traits interface called MultiVecTraits. If you want to use Belos with your own multivector class MV, you may either specialize MultiVecTraits for MV, or you may wrap MV in your own class that implements MultiVec. Specializing MultiVecTraits works via compile-time polymorphism, whereas implementing the MultiVec interface works via run-time polymorphism. You may pick whichever option you like. However, specializing MultiVecTraits is the preferred method. This is because Belos' linear solvers always use a specialization of MultiVecTraits to access multivector operations. They only use MultiVec through a specialization of the MultiVecTraits traits class, which is implemented below in this header file.
If you want your multivector class (or a wrapper thereof) to implement the MultiVec interface, you should inherit from MultiVec<ScalarType>, where ScalarType is the type of entries in the multivector. For example, a multivector with entries of type double would inherit from MultiVec<double>.
Definition at line 91 of file BelosMultiVec.hpp.
Default constructor.
Definition at line 96 of file BelosMultiVec.hpp.
Destructor (virtual for memory safety of derived classes).
Definition at line 99 of file BelosMultiVec.hpp.
Creates a new Belos::MultiVec and copies the selected contents of
*this into the new multivector (deep copy). The copied vectors from
*this are indicated by the
index.size() indices in
index.
Creates a new Belos::MultiVec that shares the selected contents of
*this. The index of the
numvecs vectors copied from
*this are indicated by the indices given in
index.
Creates a new Belos::MultiVec that shares the selected contents of
*this. The index of the
numvecs vectors copied from
*this are indicated by the indices given in
index.
The number of rows in the multivector.
The number of vectors (i.e., columns) in the multivector.
Update
*this with
alpha *
A *
B +
beta * (
*this).
Replace
*this with
alpha *
A +
beta *
B.
Scale each element of the vectors in
*this with
alpha.
Scale each element of the
i-th vector in
*this with
alpha[i].
Compute a dense matrix
B through the matrix-matrix multiply
alpha *
A^T * (
*this).
Compute the dot product of each column of *this with the corresponding column of A.
Compute a vector
b whose entries are the individual dot-products. That is,
b[i] = A[i]^H * (*this)[i] where
A[i] is the i-th column of A.
Compute the norm of each vector in
*this.
Copy the vectors in
A to a set of vectors in
*this.
The
numvecs vectors in
A are copied to a subset of vectors in
*this indicated by the indices given in
index.
Fill all the vectors in
*this with random numbers.
Replace each element of the vectors in
*this with
alpha.
Print
*this multivector to the
os output stream.