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::DoubleMultiVector > | Clone (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::DoubleMultiVector > | CloneCopy (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::DoubleMultiVector > | CloneCopy (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::DoubleMultiVector > | CloneCopy (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::DoubleMultiVector > | CloneViewNonConst (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::DoubleMultiVector > | CloneViewNonConst (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::DoubleMultiVector > | CloneView (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::DoubleMultiVector > | CloneView (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::DoubleMultiVector > | CloneView (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 . More... | |
static void | MvAddMv (const double alpha, const oomph::DoubleMultiVector &A, const double beta, const oomph::DoubleMultiVector &B, oomph::DoubleMultiVector &mv) |
Replace mv with . 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 . 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. . 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 , 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... | |
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.
|
inlinestatic |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inlinestatic |
Obtain the number of vectors in the multivector.
Definition at line 151 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Obtain the global length of the vector.
Definition at line 145 of file trilinos_eigen_solver.h.
References oomph::DistributableLinearAlgebraObject::nrow().
|
inlinestatic |
Replace mv
with .
Definition at line 192 of file trilinos_eigen_solver.h.
References oomph::OcTreeNames::B, i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Compute a vector b
where the components are the individual dot-products of the i-th
columns of A
and mv
, i.e. .
Definition at line 305 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::dot().
|
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().
|
inlinestatic |
Compute the 2-norm of each individual vector of mv
. Upon return, normvec
[i] holds the value of , the i-th
column of mv
.
Definition at line 317 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::norm().
|
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().
|
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().
|
inlinestatic |
Scale each element of the vectors in mv
with alpha
.
Definition at line 211 of file trilinos_eigen_solver.h.
|
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().
|
inlinestatic |
Update mv
with .
Definition at line 157 of file trilinos_eigen_solver.h.
References oomph::OcTreeNames::B, i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Compute a dense matrix B
through the matrix-matrix multiply .
Definition at line 236 of file trilinos_eigen_solver.h.
References oomph::OcTreeNames::B, oomph::LinearAlgebraDistribution::communicator_pt(), oomph::DistributableLinearAlgebraObject::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().
|
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().
|
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()]
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().