10#ifndef THYRA_TPETRA_EUCLIDEAN_SCALAR_PROD_DEF_HPP
11#define THYRA_TPETRA_EUCLIDEAN_SCALAR_PROD_DEF_HPP
13#include "Thyra_TpetraEuclideanScalarProd_decl.hpp"
14#include "Thyra_TpetraMultiVector.hpp"
15#include "Thyra_TpetraVector.hpp"
21template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
28 typedef Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> TMV;
32 if (nonnull(X_tpetra) && nonnull(Y_tpetra)) {
39 X_tpetra->dot(*Y_tpetra, scalarProds_out);
46template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
51 using Teuchos::rcp_dynamic_cast;
57 return tmv->getConstTpetraMultiVector();
60 RCP<const TV> tv = rcp_dynamic_cast<const TV>(mv);
62 return tv->getConstTpetraVector();
virtual void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const
Simply calls dots(X,Y,scalar_prods).
Interface for a collection of column vectors called a multi-vector.
Extends concrete implementation of a Euclidean scalar product for specifically Tpetra vectors/multive...
virtual void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const
If X and Y are both Tpetra wrappers, computes the pair-wise scalar products directly with Tpetra call...
Concrete implementation of Thyra::MultiVector in terms of Tpetra::MultiVector.
Concrete Thyra::SpmdVectorBase using Tpetra::Vector.
T_To & dyn_cast(T_From &from)