Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_ScaledAdjointLinearOpBase_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_SCALED_ADJOINT_LINEAR_OP_BASE_DECL_HPP
11#define THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_DECL_HPP
12
13#include "Thyra_LinearOpBase.hpp"
14
15
16namespace Thyra {
17
18
40template<class Scalar>
41class ScaledAdjointLinearOpBase : virtual public LinearOpBase<Scalar> {
42public:
43
44#ifdef THYRA_INJECT_USING_DECLARATIONS
45 using LinearOpBase<Scalar>::apply;
46#endif
47
50
53 virtual Scalar overallScalar() const = 0;
54
57 virtual EOpTransp overallTransp() const = 0;
58
65
69
71
72};
73
74
109template<class Scalar>
110void unwrap(
111 const LinearOpBase<Scalar> &Op,
112 Scalar *scalar,
113 EOpTransp *transp,
114 const LinearOpBase<Scalar>* *origOp
115 );
116
117
153template<class Scalar>
154void unwrap(
155 const RCP<const LinearOpBase<Scalar> > &Op,
156 Scalar *scalar,
157 EOpTransp *transp,
158 RCP<const LinearOpBase<Scalar> > *origOp
159 );
160
161
162} // namespace Thyra
163
164
165#endif // THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_DECL_HPP
Base class for all linear operators.
void apply(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y.
Base class for LinearOpBase decorator subclasses that wrap a LinearOpBase object and adds on an extra...
virtual Scalar overallScalar() const =0
Return the overall scale factor.
virtual RCP< const LinearOpBase< Scalar > > getOrigOp() const =0
Return the const original linear operator origOp.
virtual RCP< LinearOpBase< Scalar > > getNonconstOrigOp()=0
Return the non-const original linear operator origOp.
virtual EOpTransp overallTransp() const =0
Return the overall transpose (adjoint) enum.
void unwrap(const LinearOpBase< Scalar > &Op, Scalar *scalar, EOpTransp *transp, const LinearOpBase< Scalar > **origOp)
Extract the overallScalar, overallTransp and const origOp from a const LinearOpBase object.
EOpTransp
Enumeration for determining how a linear operator is applied. `*.