Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Belos::GmresPolyMv< ScalarType, MV > Class Template Reference

#include <BelosGmresPolyOp.hpp>

Inheritance diagram for Belos::GmresPolyMv< ScalarType, MV >:
Inheritance graph
[legend]

Public Member Functions

 GmresPolyMv (const Teuchos::RCP< MV > &mv_in)
 
 GmresPolyMv (const Teuchos::RCP< const MV > &mv_in)
 
Teuchos::RCP< MV > getMV ()
 
Teuchos::RCP< const MV > getConstMV () const
 
GmresPolyMvClone (const int numvecs) const
 Create a new MultiVec with numvecs columns. More...
 
GmresPolyMvCloneCopy () const
 Create a new MultiVec and copy contents of *this into it (deep copy). More...
 
GmresPolyMvCloneCopy (const std::vector< int > &index) const
 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. More...
 
GmresPolyMvCloneViewNonConst (const std::vector< int > &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. More...
 
const GmresPolyMvCloneView (const std::vector< int > &index) const
 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. More...
 
ptrdiff_t GetGlobalLength () const
 The number of rows in the multivector. More...
 
int GetNumberVecs () const
 The number of vectors (i.e., columns) in the multivector. More...
 
void MvTimesMatAddMv (const ScalarType alpha, const MultiVec< ScalarType > &A, const Teuchos::SerialDenseMatrix< int, ScalarType > &B, const ScalarType beta)
 Update *this with alpha * A * B + beta * (*this). More...
 
void MvAddMv (const ScalarType alpha, const MultiVec< ScalarType > &A, const ScalarType beta, const MultiVec< ScalarType > &B)
 Replace *this with alpha * A + beta * B. More...
 
void MvScale (const ScalarType alpha)
 Scale each element of the vectors in *this with alpha. More...
 
void MvScale (const std::vector< ScalarType > &alpha)
 Scale each element of the i-th vector in *this with alpha[i]. More...
 
void MvTransMv (const ScalarType alpha, const MultiVec< ScalarType > &A, Teuchos::SerialDenseMatrix< int, ScalarType > &B) const
 Compute a dense matrix B through the matrix-matrix multiply alpha * A^T * (*this). More...
 
void MvDot (const MultiVec< ScalarType > &A, std::vector< ScalarType > &b) const
 Compute the dot product of each column of *this with the corresponding column of A. More...
 
void MvNorm (std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec, NormType type=TwoNorm) const
 Compute the norm of each vector in *this. More...
 
void SetBlock (const MultiVec< ScalarType > &A, const std::vector< int > &index)
 Copy the vectors in A to a set of vectors in *this. More...
 
void MvRandom ()
 Fill all the vectors in *this with random numbers. More...
 
void MvInit (const ScalarType alpha)
 Replace each element of the vectors in *this with alpha. More...
 
void MvPrint (std::ostream &os) const
 Print *this multivector to the os output stream. More...
 
- Public Member Functions inherited from Belos::MultiVec< ScalarType >
 MultiVec ()
 Default constructor. More...
 
virtual ~MultiVec ()
 Destructor (virtual for memory safety of derived classes). More...
 

Detailed Description

template<class ScalarType, class MV>
class Belos::GmresPolyMv< ScalarType, MV >

Definition at line 100 of file BelosGmresPolyOp.hpp.

Constructor & Destructor Documentation

template<class ScalarType, class MV>
Belos::GmresPolyMv< ScalarType, MV >::GmresPolyMv ( const Teuchos::RCP< MV > &  mv_in)
inline

Definition at line 104 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
Belos::GmresPolyMv< ScalarType, MV >::GmresPolyMv ( const Teuchos::RCP< const MV > &  mv_in)
inline

Definition at line 107 of file BelosGmresPolyOp.hpp.

Member Function Documentation

template<class ScalarType, class MV>
Teuchos::RCP<MV> Belos::GmresPolyMv< ScalarType, MV >::getMV ( )
inline

Definition at line 111 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
Teuchos::RCP<const MV> Belos::GmresPolyMv< ScalarType, MV >::getConstMV ( ) const
inline

Definition at line 112 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
GmresPolyMv* Belos::GmresPolyMv< ScalarType, MV >::Clone ( const int  numvecs) const
inlinevirtual

Create a new MultiVec with numvecs columns.

Returns
Pointer to the new multivector with uninitialized values.

Implements Belos::MultiVec< ScalarType >.

Definition at line 114 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
GmresPolyMv* Belos::GmresPolyMv< ScalarType, MV >::CloneCopy ( ) const
inlinevirtual

Create a new MultiVec and copy contents of *this into it (deep copy).

Returns
Pointer to the new multivector

Implements Belos::MultiVec< ScalarType >.

Definition at line 119 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
GmresPolyMv* Belos::GmresPolyMv< ScalarType, MV >::CloneCopy ( const std::vector< int > &  index) const
inlinevirtual

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.

Returns
Pointer to the new multivector

Implements Belos::MultiVec< ScalarType >.

Definition at line 124 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
GmresPolyMv* Belos::GmresPolyMv< ScalarType, MV >::CloneViewNonConst ( const std::vector< int > &  index)
inlinevirtual

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.

Returns
Pointer to the new multivector

Implements Belos::MultiVec< ScalarType >.

Definition at line 129 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
const GmresPolyMv* Belos::GmresPolyMv< ScalarType, MV >::CloneView ( const std::vector< int > &  index) const
inlinevirtual

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.

Returns
Pointer to the new multivector

Implements Belos::MultiVec< ScalarType >.

Definition at line 134 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
ptrdiff_t Belos::GmresPolyMv< ScalarType, MV >::GetGlobalLength ( ) const
inlinevirtual

The number of rows in the multivector.

Implements Belos::MultiVec< ScalarType >.

Definition at line 139 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
int Belos::GmresPolyMv< ScalarType, MV >::GetNumberVecs ( ) const
inlinevirtual

The number of vectors (i.e., columns) in the multivector.

Implements Belos::MultiVec< ScalarType >.

Definition at line 140 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvTimesMatAddMv ( const ScalarType  alpha,
const MultiVec< ScalarType > &  A,
const Teuchos::SerialDenseMatrix< int, ScalarType > &  B,
const ScalarType  beta 
)
inlinevirtual

Update *this with alpha * A * B + beta * (*this).

Implements Belos::MultiVec< ScalarType >.

Definition at line 141 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvAddMv ( const ScalarType  alpha,
const MultiVec< ScalarType > &  A,
const ScalarType  beta,
const MultiVec< ScalarType > &  B 
)
inlinevirtual

Replace *this with alpha * A + beta * B.

Implements Belos::MultiVec< ScalarType >.

Definition at line 148 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvScale ( const ScalarType  alpha)
inlinevirtual

Scale each element of the vectors in *this with alpha.

Implements Belos::MultiVec< ScalarType >.

Definition at line 154 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvScale ( const std::vector< ScalarType > &  alpha)
inlinevirtual

Scale each element of the i-th vector in *this with alpha[i].

Implements Belos::MultiVec< ScalarType >.

Definition at line 155 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvTransMv ( const ScalarType  alpha,
const MultiVec< ScalarType > &  A,
Teuchos::SerialDenseMatrix< int, ScalarType > &  B 
) const
inlinevirtual

Compute a dense matrix B through the matrix-matrix multiply alpha * A^T * (*this).

Implements Belos::MultiVec< ScalarType >.

Definition at line 156 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvDot ( const MultiVec< ScalarType > &  A,
std::vector< ScalarType > &  b 
) const
inlinevirtual

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.

Implements Belos::MultiVec< ScalarType >.

Definition at line 161 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvNorm ( std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  normvec,
NormType  type = TwoNorm 
) const
inlinevirtual

Compute the norm of each vector in *this.

Parameters
normvec[out] On output, normvec[i] holds the norm of the i-th vector of *this.
type[in] The type of norm to compute. The 2-norm is the default.

Implements Belos::MultiVec< ScalarType >.

Definition at line 166 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::SetBlock ( const MultiVec< ScalarType > &  A,
const std::vector< int > &  index 
)
inlinevirtual

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.

Implements Belos::MultiVec< ScalarType >.

Definition at line 170 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvRandom ( )
inlinevirtual

Fill all the vectors in *this with random numbers.

Implements Belos::MultiVec< ScalarType >.

Definition at line 175 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvInit ( const ScalarType  alpha)
inlinevirtual

Replace each element of the vectors in *this with alpha.

Implements Belos::MultiVec< ScalarType >.

Definition at line 176 of file BelosGmresPolyOp.hpp.

template<class ScalarType, class MV>
void Belos::GmresPolyMv< ScalarType, MV >::MvPrint ( std::ostream &  os) const
inlinevirtual

Print *this multivector to the os output stream.

Implements Belos::MultiVec< ScalarType >.

Definition at line 177 of file BelosGmresPolyOp.hpp.


The documentation for this class was generated from the following file:

Generated on Fri Aug 14 2020 10:48:34 for Belos by doxygen 1.8.5