42 #ifndef THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_HPP 43 #define THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_HPP 45 #include "Thyra_ScaledAdjointLinearOpBase_decl.hpp" 46 #include "Thyra_LinearOpBase.hpp" 49 template<
class Scalar>
58 TEUCHOS_TEST_FOR_EXCEPT( scalar==NULL );
59 TEUCHOS_TEST_FOR_EXCEPT( transp==NULL );
60 TEUCHOS_TEST_FOR_EXCEPT( origOp==NULL );
62 typedef Teuchos::ScalarTraits<Scalar> ST;
78 template<
class Scalar>
80 const RCP<
const LinearOpBase<Scalar> > &Op,
83 RCP<
const LinearOpBase<Scalar> > *origOp
87 TEUCHOS_TEST_FOR_EXCEPT( scalar==NULL );
88 TEUCHOS_TEST_FOR_EXCEPT( transp==NULL );
89 TEUCHOS_TEST_FOR_EXCEPT( origOp==NULL );
91 typedef Teuchos::ScalarTraits<Scalar> ST;
92 RCP<const ScaledAdjointLinearOpBase<Scalar> >
93 saOp = Teuchos::rcp_dynamic_cast<
const ScaledAdjointLinearOpBase<Scalar> >(Op);
95 *scalar = saOp->overallScalar();
96 *transp = saOp->overallTransp();
97 *origOp = saOp->getOrigOp();
111 #define THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_INSTANT(SCALAR) \ 113 template void unwrap( \ 114 const LinearOpBase<SCALAR > &Op, \ 117 const LinearOpBase<SCALAR >* *origOp \ 120 template void unwrap( \ 121 const RCP<const LinearOpBase<SCALAR > > &Op, \ 124 RCP<const LinearOpBase<SCALAR > > *origOp \ 128 #endif // THYRA_SCALED_ADJOINT_LINEAR_OP_BASE_HPP EOpTransp
Enumeration for determining how a linear operator is applied. `*.
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...
Use the non-transposed operator.
Base class for LinearOpBase decorator subclasses that wrap a LinearOpBase object and adds on an extra...
virtual EOpTransp overallTransp() const =0
Return the overall transpose (adjoint) enum.
Base class for all linear operators.
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.