42 #ifndef THYRA_SCALAR_PROD_VECTOR_SPACE_BASE_DEF_HPP
43 #define THYRA_SCALAR_PROD_VECTOR_SPACE_BASE_DEF_HPP
45 #include "Thyra_ScalarProdVectorSpaceBase_decl.hpp"
46 #include "Thyra_VectorSpaceDefaultBase.hpp"
47 #include "Thyra_EuclideanScalarProd.hpp"
48 #include "Thyra_AssertOp.hpp"
57 template<
class Scalar>
63 template<
class Scalar>
67 :scalarProd_(scalarProd_in.assert_not_null())
71 template<
class Scalar>
76 scalarProd_ = scalarProd_in.assert_not_null();
80 template<
class Scalar>
91 template<
class Scalar>
94 return scalarProd_->isEuclidean();
98 template<
class Scalar>
108 return scalarProd_->scalarProd(x,y);
112 template<
class Scalar>
125 scalarProd_->scalarProds(X, Y, scalarProds_out);
132 #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)