Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
17 namespace Thyra {
18 
19 
20 // Protected virtual functions
21 
22 
23 template<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
Abstract interface for finite-dimensional dense vectors.
virtual Scalar scalarProdImpl(const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
Default implementation calls scalarProdsImpl().