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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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) | |
| 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) NOTE: Not required in Trilinos 13.4.0. | |
| 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) | |
| static int | GetVecLength (const oomph::DoubleMultiVector &mv) |
| Obtain the global length of the vector. | |
| static ptrdiff_t | GetGlobalLength (const oomph::DoubleMultiVector &mv) |
| Return the number of rows in the given multivector. NOTE: Trilinos 13.4.0 uses GetGlobalLength instead of GetVecLength. | |
| static int | GetNumberVecs (const oomph::DoubleMultiVector &mv) |
| Obtain the number of vectors in the multivector. | |
| 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 | |
| static void | MvAddMv (const double alpha, const oomph::DoubleMultiVector &A, const double beta, const oomph::DoubleMultiVector &B, oomph::DoubleMultiVector &mv) |
Replace mv with | |
| static void | MvScale (oomph::DoubleMultiVector &mv, const double alpha) |
Scale each element of the vectors in mv with alpha. | |
| static void | MvScale (oomph::DoubleMultiVector &mv, const std::vector< double > &alpha) |
Scale each element of the i-th vector in mv with alpha[i]. | |
| 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 | |
| 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. | |
| 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 i-th column of mv. | |
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. | |
| static void | SetBlock (const oomph::DoubleMultiVector &A, const Teuchos::Range1D &index, oomph::DoubleMultiVector &mv) |
| Deep copy of A into specified columns of mv. | |
| static void | Assign (const oomph::DoubleMultiVector &A, oomph::DoubleMultiVector &mv) |
| mv := A | |
| static void | MvRandom (oomph::DoubleMultiVector &mv) |
Replace the vectors in mv with random vectors. | |
| static void | MvInit (oomph::DoubleMultiVector &mv, const double alpha=Teuchos::ScalarTraits< double >::zero()) |
Replace each element of the vectors in mv with alpha. | |
Print method | |
| typedef Anasazi::details::StubTsqrAdapter< MV > | tsqr_adaptor_type |
| TsqrAdaptor specialization for the multivector type MV. | |
| static void | MvPrint (const oomph::DoubleMultiVector &mv, std::ostream &os) |
Print the mv multi-vector to the os output stream. | |
Specialize the Anasazi traits class for the oomph-lib DoubleMultiVector. This provides the interfaces required by the Anasazi eigensolvers.
Definition at line 51 of file trilinos_eigen_solver.h.
| Anasazi::MultiVecTraits< double, oomph::DoubleMultiVector >::tsqr_adaptor_type |
TsqrAdaptor specialization for the multivector type MV.
By default, we provide a "stub" implementation. It has the right methods and typedefs, but its constructors and methods all throw std::logic_error. If you plan to use TSQR in Anasazi (e.g., through TsqrOrthoManager), and if your multivector type MV is neither Epetra_MultiVector nor Tpetra::MultiVector, you must implement a functional TSQR adapter. Please refer to Epetra::TsqrAdapter (for Epetra_MultiVector) or Tpetra::TsqrAdaptor (for Tpetra::MultiVector) for examples.
Definition at line 453 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 56 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 64 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 74 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 82 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 113 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) NOTE: Not required in Trilinos 13.4.0.
Definition at line 125 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 136 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 92 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 102 of file trilinos_eigen_solver.h.
|
inlinestatic |
Return the number of rows in the given multivector. NOTE: Trilinos 13.4.0 uses GetGlobalLength instead of GetVecLength.
Definition at line 150 of file trilinos_eigen_solver.h.
References oomph::DistributableLinearAlgebraObject::nrow().
|
inlinestatic |
Obtain the number of vectors in the multivector.
Definition at line 156 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Obtain the global length of the vector.
Definition at line 143 of file trilinos_eigen_solver.h.
References oomph::DistributableLinearAlgebraObject::nrow().
|
inlinestatic |
Replace mv with
.
Definition at line 197 of file trilinos_eigen_solver.h.
References 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 310 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::dot().
|
inlinestatic |
Replace each element of the vectors in mv with alpha.
Definition at line 419 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 322 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::norm().
|
inlinestatic |
Print the mv multi-vector to the os output stream.
Definition at line 433 of file trilinos_eigen_solver.h.
References oomph::DoubleMultiVector::output().
|
inlinestatic |
Replace the vectors in mv with random vectors.
Definition at line 404 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 216 of file trilinos_eigen_solver.h.
|
inlinestatic |
Scale each element of the i-th vector in mv with alpha[i].
Definition at line 224 of file trilinos_eigen_solver.h.
References i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Update mv with
.
Definition at line 162 of file trilinos_eigen_solver.h.
References i, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleMultiVector::nvector().
|
inlinestatic |
Compute a dense matrix B through the matrix-matrix multiply
.
Definition at line 241 of file trilinos_eigen_solver.h.
References 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 339 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 371 of file trilinos_eigen_solver.h.
References i, and oomph::DistributableLinearAlgebraObject::nrow_local().