Static Public Member Functions | List of all members
Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector > Class Reference

Specialize the Anasazi traits class for the oomph-lib DoubleMultiVector. This provides the interfaces required by the Anasazi eigensolvers. More...

#include <trilinos_eigen_solver.h>

Static Public Member Functions

static Teuchos::RCP< oomph::DoubleMultiVectorClone (const oomph::DoubleMultiVector &mv, const int numvecs)
 Creates a new empty DoubleMultiVector containing numvecs columns. Return a reference-counted pointer to the new multivector. More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneCopy (const oomph::DoubleMultiVector &mv)
 Creates a deep copy of the DoubleMultiVector mv return Reference-counted pointer to the new DoubleMultiVector. More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneCopy (const oomph::DoubleMultiVector &mv, const std::vector< int > &index)
 Creates a new oomph::DoubleMultiVector and (deep) copies the contents of the vectors in index into the new vector return Reference-counted pointer to the new oomph::DoubleMultiVector. More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneCopy (const oomph::DoubleMultiVector &mv, const Teuchos::Range1D &index)
 Deep copy of specified columns of oomph::DoubleMultiVector return Reference-counted pointer to the new oomph::DoubleMultiVector. More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneViewNonConst (oomph::DoubleMultiVector &mv, const std::vector< int > &index)
 Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector. More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneViewNonConst (oomph::DoubleMultiVector &mv, const Teuchos::Range1D &index)
 Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector. More...
 
static Teuchos::RCP< const oomph::DoubleMultiVectorCloneView (const oomph::DoubleMultiVector &mv, const std::vector< int > &index)
 Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (const version) More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneView (oomph::DoubleMultiVector &mv, const std::vector< int > &index)
 Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (Non-const version for Trilinos 9 interface) More...
 
static Teuchos::RCP< oomph::DoubleMultiVectorCloneView (oomph::DoubleMultiVector &mv, const Teuchos::Range1D &index)
 Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (const version) More...
 
static int GetVecLength (const oomph::DoubleMultiVector &mv)
 Obtain the global length of the vector. More...
 
static int GetNumberVecs (const oomph::DoubleMultiVector &mv)
 Obtain the number of vectors in the multivector. More...
 
static void MvTimesMatAddMv (const double alpha, const oomph::DoubleMultiVector &A, const Teuchos::SerialDenseMatrix< int, double > &B, const double beta, oomph::DoubleMultiVector &mv)
 Update mv with $ \alpha AB + \beta mv $. More...
 
static void MvAddMv (const double alpha, const oomph::DoubleMultiVector &A, const double beta, const oomph::DoubleMultiVector &B, oomph::DoubleMultiVector &mv)
 Replace mv with $\alpha A + \beta B$. More...
 
static void MvScale (oomph::DoubleMultiVector &mv, const double alpha)
 Scale each element of the vectors in mv with alpha. More...
 
static void MvScale (oomph::DoubleMultiVector &mv, const std::vector< double > &alpha)
 Scale each element of the i-th vector in mv with alpha[i]. More...
 
static void MvTransMv (const double alpha, const oomph::DoubleMultiVector &A, const oomph::DoubleMultiVector &mv, Teuchos::SerialDenseMatrix< int, double > &B)
 Compute a dense matrix B through the matrix-matrix multiply $ \alpha A^Hmv $. More...
 
static void MvDot (const oomph::DoubleMultiVector &mv, const oomph::DoubleMultiVector &A, std::vector< double > &b)
 Compute a vector b where the components are the individual dot-products of the i-th columns of A and mv, i.e. $ b[i] = * A[i]^Hmv[i] $. More...
 
static void MvNorm (const oomph::DoubleMultiVector &mv, std::vector< double > &normvec)
 Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of $||mv_i||_2$, the i-th column of mv. More...
 
Initialization methods
static void SetBlock (const oomph::DoubleMultiVector &A, const std::vector< int > &index, oomph::DoubleMultiVector &mv)
 Copy the vectors in A to a set of vectors in mv indicated by the indices given in index. More...
 
static void SetBlock (const oomph::DoubleMultiVector &A, const Teuchos::Range1D &index, oomph::DoubleMultiVector &mv)
 Deep copy of A into specified columns of mv. More...
 
static void Assign (const oomph::DoubleMultiVector &A, oomph::DoubleMultiVector &mv)
 mv := A More...
 
static void MvRandom (oomph::DoubleMultiVector &mv)
 Replace the vectors in mv with random vectors. More...
 
static void MvInit (oomph::DoubleMultiVector &mv, const double alpha=Teuchos::ScalarTraits< double >::zero())
 Replace each element of the vectors in mv with alpha. More...
 
Print method
static void MvPrint (const oomph::DoubleMultiVector &mv, std::ostream &os)
 Print the mv multi-vector to the os output stream. More...
 

Detailed Description

Specialize the Anasazi traits class for the oomph-lib DoubleMultiVector. This provides the interfaces required by the Anasazi eigensolvers.

Definition at line 54 of file trilinos_eigen_solver.h.

Member Function Documentation

◆ Assign()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::Assign ( const oomph::DoubleMultiVector A,
oomph::DoubleMultiVector mv 
)
inlinestatic

mv := A

Assign (deep copy) A into mv.

Definition at line 391 of file trilinos_eigen_solver.h.

◆ Clone()

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::Clone ( const oomph::DoubleMultiVector mv,
const int  numvecs 
)
inlinestatic

Creates a new empty DoubleMultiVector containing numvecs columns. Return a reference-counted pointer to the new multivector.

Definition at line 59 of file trilinos_eigen_solver.h.

◆ CloneCopy() [1/3]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneCopy ( const oomph::DoubleMultiVector mv)
inlinestatic

Creates a deep copy of the DoubleMultiVector mv return Reference-counted pointer to the new DoubleMultiVector.

Definition at line 67 of file trilinos_eigen_solver.h.

◆ CloneCopy() [2/3]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneCopy ( const oomph::DoubleMultiVector mv,
const std::vector< int > &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector and (deep) copies the contents of the vectors in index into the new vector return Reference-counted pointer to the new oomph::DoubleMultiVector.

Definition at line 77 of file trilinos_eigen_solver.h.

◆ CloneCopy() [3/3]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneCopy ( const oomph::DoubleMultiVector mv,
const Teuchos::Range1D &  index 
)
inlinestatic

Deep copy of specified columns of oomph::DoubleMultiVector return Reference-counted pointer to the new oomph::DoubleMultiVector.

Definition at line 85 of file trilinos_eigen_solver.h.

◆ CloneView() [1/3]

static Teuchos::RCP<const oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneView ( const oomph::DoubleMultiVector mv,
const std::vector< int > &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (const version)

Definition at line 116 of file trilinos_eigen_solver.h.

◆ CloneView() [2/3]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneView ( oomph::DoubleMultiVector mv,
const std::vector< int > &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (Non-const version for Trilinos 9 interface)

Definition at line 127 of file trilinos_eigen_solver.h.

◆ CloneView() [3/3]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneView ( oomph::DoubleMultiVector mv,
const Teuchos::Range1D &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector (const version)

Definition at line 138 of file trilinos_eigen_solver.h.

◆ CloneViewNonConst() [1/2]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneViewNonConst ( oomph::DoubleMultiVector mv,
const std::vector< int > &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector.

Definition at line 95 of file trilinos_eigen_solver.h.

◆ CloneViewNonConst() [2/2]

static Teuchos::RCP<oomph::DoubleMultiVector> Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::CloneViewNonConst ( oomph::DoubleMultiVector mv,
const Teuchos::Range1D &  index 
)
inlinestatic

Creates a new oomph::DoubleMultiVector that contains shallow copies of selected entries of the oomph::DoubleMultiVector mv return Reference-counted pointer to the new oomph::DoubleMultiVector.

Definition at line 105 of file trilinos_eigen_solver.h.

◆ GetNumberVecs()

static int Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::GetNumberVecs ( const oomph::DoubleMultiVector mv)
inlinestatic

Obtain the number of vectors in the multivector.

Definition at line 151 of file trilinos_eigen_solver.h.

References oomph::DoubleMultiVector::nvector().

◆ GetVecLength()

static int Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::GetVecLength ( const oomph::DoubleMultiVector mv)
inlinestatic

Obtain the global length of the vector.

Definition at line 145 of file trilinos_eigen_solver.h.

References oomph::DistributableLinearAlgebraObject::nrow().

◆ MvAddMv()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvAddMv ( const double  alpha,
const oomph::DoubleMultiVector A,
const double  beta,
const oomph::DoubleMultiVector B,
oomph::DoubleMultiVector mv 
)
inlinestatic

◆ MvDot()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvDot ( const oomph::DoubleMultiVector mv,
const oomph::DoubleMultiVector A,
std::vector< double > &  b 
)
inlinestatic

Compute a vector b where the components are the individual dot-products of the i-th columns of A and mv, i.e. $ b[i] = * A[i]^Hmv[i] $.

Definition at line 305 of file trilinos_eigen_solver.h.

References oomph::DoubleMultiVector::dot().

◆ MvInit()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvInit ( oomph::DoubleMultiVector mv,
const double  alpha = Teuchos::ScalarTraits<double>::zero() 
)
inlinestatic

Replace each element of the vectors in mv with alpha.

Definition at line 414 of file trilinos_eigen_solver.h.

References oomph::DoubleMultiVector::initialise().

◆ MvNorm()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvNorm ( const oomph::DoubleMultiVector mv,
std::vector< double > &  normvec 
)
inlinestatic

Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of $||mv_i||_2$, the i-th column of mv.

Definition at line 317 of file trilinos_eigen_solver.h.

References oomph::DoubleMultiVector::norm().

◆ MvPrint()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvPrint ( const oomph::DoubleMultiVector mv,
std::ostream &  os 
)
inlinestatic

Print the mv multi-vector to the os output stream.

Definition at line 428 of file trilinos_eigen_solver.h.

References oomph::DoubleMultiVector::output().

◆ MvRandom()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvRandom ( oomph::DoubleMultiVector mv)
inlinestatic

Replace the vectors in mv with random vectors.

Definition at line 399 of file trilinos_eigen_solver.h.

References i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().

◆ MvScale() [1/2]

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvScale ( oomph::DoubleMultiVector mv,
const double  alpha 
)
inlinestatic

Scale each element of the vectors in mv with alpha.

Definition at line 211 of file trilinos_eigen_solver.h.

◆ MvScale() [2/2]

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvScale ( oomph::DoubleMultiVector mv,
const std::vector< double > &  alpha 
)
inlinestatic

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

Definition at line 219 of file trilinos_eigen_solver.h.

References i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().

◆ MvTimesMatAddMv()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvTimesMatAddMv ( const double  alpha,
const oomph::DoubleMultiVector A,
const Teuchos::SerialDenseMatrix< int, double > &  B,
const double  beta,
oomph::DoubleMultiVector mv 
)
inlinestatic

◆ MvTransMv()

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::MvTransMv ( const double  alpha,
const oomph::DoubleMultiVector A,
const oomph::DoubleMultiVector mv,
Teuchos::SerialDenseMatrix< int, double > &  B 
)
inlinestatic

◆ SetBlock() [1/2]

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::SetBlock ( const oomph::DoubleMultiVector A,
const std::vector< int > &  index,
oomph::DoubleMultiVector mv 
)
inlinestatic

Copy the vectors in A to a set of vectors in mv indicated by the indices given in index.

The numvecs vectors in A are copied to a subset of vectors in mv indicated by the indices given in index, i.e. mv[index[i]] = A[i].

Definition at line 334 of file trilinos_eigen_solver.h.

References i, and oomph::DistributableLinearAlgebraObject::nrow_local().

◆ SetBlock() [2/2]

static void Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::SetBlock ( const oomph::DoubleMultiVector A,
const Teuchos::Range1D &  index,
oomph::DoubleMultiVector mv 
)
inlinestatic

Deep copy of A into specified columns of mv.

(Deeply) copy the first index.size() columns of A into the columns of mv specified by the given index range.

Postcondition: mv[i] = A[i - index.lbound()] for all i in [index.lbound(), index.ubound()]

Parameters
A[in] Source multivector
index[in] Inclusive index range of columns of mv; index set of the target
mv[out] Target multivector

Definition at line 366 of file trilinos_eigen_solver.h.

References i, and oomph::DistributableLinearAlgebraObject::nrow_local().


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