10 #ifndef THYRA_SCALAR_PROD_VECTOR_SPACE_BASE_DEF_HPP
11 #define THYRA_SCALAR_PROD_VECTOR_SPACE_BASE_DEF_HPP
13 #include "Thyra_ScalarProdVectorSpaceBase_decl.hpp"
14 #include "Thyra_VectorSpaceDefaultBase.hpp"
15 #include "Thyra_EuclideanScalarProd.hpp"
16 #include "Thyra_AssertOp.hpp"
25 template<
class Scalar>
31 template<
class Scalar>
35 :scalarProd_(scalarProd_in.assert_not_null())
39 template<
class Scalar>
44 scalarProd_ = scalarProd_in.assert_not_null();
48 template<
class Scalar>
59 template<
class Scalar>
62 return scalarProd_->isEuclidean();
66 template<
class Scalar>
76 return scalarProd_->scalarProd(x,y);
80 template<
class Scalar>
93 scalarProd_->scalarProds(X, Y, scalarProds_out);
100 #endif // THYRA_SCALAR_PROD_VECTOR_SPACE_BASE_DEF_HPP
virtual RCP< const VectorSpaceBase< Scalar > > space() const =0
Return a smart pointer to the vector space that this vector belongs to.
#define THYRA_ASSERT_VEC_SPACES(FUNC_NAME, VS1, VS2)
This is a very useful macro that should be used to validate that two vector spaces are compatible...
virtual RCP< const VectorSpaceBase< Scalar > > range() const =0
Return a smart pointer for the range space for this operator.
ScalarProdVectorSpaceBase()
Construct to use dot product as the default.
void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
Calls getScalarProd()->scalarProds(X,Y,scalar_prods)
bool isEuclidean() const
Returns getScalarProd()->isEuclidean()
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Interface for a collection of column vectors called a multi-vector.
Abstract interface for finite-dimensional dense vectors.
RCP< const ScalarProdBase< Scalar > > getScalarProd() const
Return the current scalar product.
Concrete implementation of a scalar product for a Euclidean vector space (i.e. using the dot product)...
virtual RCP< const VectorSpaceBase< Scalar > > domain() const =0
Return a smart pointer for the domain space for this operator.
virtual void setScalarProd(const RCP< const ScalarProdBase< Scalar > > &scalarProd)
Set a different scalar product.
Abstract interface for scalar products.
Scalar scalarProd(const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
Returns getScalarProd()->scalarProd(x,y)