Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_ScalarProdBase_def.hpp
1// @HEADER
2// *****************************************************************************
3// Thyra: Interfaces and Support for Abstract Numerical Algorithms
4//
5// Copyright 2004 NTESS and the Thyra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef THYRA_SCALAR_PROD_BASE_DEF_HPP
11#define THYRA_SCALAR_PROD_BASE_DEF_HPP
12
13#include "Thyra_ScalarProdBase_decl.hpp"
14#include "Thyra_VectorBase.hpp"
15
16
17namespace Thyra {
18
19
20// Protected virtual functions
21
22
23template<class Scalar>
25 const VectorBase<Scalar>& x, const VectorBase<Scalar>& y
26 ) const
27{
28 Tuple<Scalar,1> scalarProds_out;
29 this->scalarProds(x, y, scalarProds_out());
30 return scalarProds_out[0];
31}
32
33
34} // end namespace Thyra
35
36
37#endif // THYRA_SCALAR_PROD_BASE_DEF_HPP
virtual Scalar scalarProdImpl(const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
Default implementation calls scalarProdsImpl().
Abstract interface for finite-dimensional dense vectors.