Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_LinearOpScalarProd_decl.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_LINEAR_OP_SCALAR_PROD_DECL_HPP
11 #define THYRA_LINEAR_OP_SCALAR_PROD_DECL_HPP
12 
13 
14 #include "Thyra_ScalarProdBase_decl.hpp"
15 
16 
17 namespace Thyra {
18 
28 template<class Scalar>
29 class LinearOpScalarProd : public ScalarProdBase<Scalar> {
30 public:
31 
34 
37 
40 
42  void initialize( const RCP<const LinearOpBase<Scalar> > &op );
43 
45  const RCP<const LinearOpBase<Scalar> >& op() const;
46 
48  void uninitialize(
49  const Ptr<RCP<const LinearOpBase<Scalar> > > &op = Teuchos::null );
50 
52 
53 protected:
54 
57 
59  virtual bool isEuclideanImpl() const;
60 
62  void scalarProdsImpl(
64  const ArrayView<Scalar> &scalarProds_out
65  ) const;
66 
69 
71 
72 private:
73 
75 
76 };
77 
78 
79 // //////////////////////////////////
80 // Inline members
81 
82 
83 template<class Scalar>
84 inline
86 {
87  return op_;
88 }
89 
90 
91 } // end namespace Thyra
92 
93 
94 #endif // THYRA_LINEAR_OP_SCALAR_PROD_DECL_HPP
void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
RCP< const LinearOpBase< Scalar > > getLinearOpImpl() const
Interface for a collection of column vectors called a multi-vector.
void initialize(const RCP< const LinearOpBase< Scalar > > &op)
virtual bool isEuclideanImpl() const
Returns false.
Base class for all linear operators.
const RCP< const LinearOpBase< Scalar > > & op() const
void uninitialize(const Ptr< RCP< const LinearOpBase< Scalar > > > &op=Teuchos::null)
Concrete implementation of a scalar product using a symmetric positive-definite linear operator...
Abstract interface for scalar products.