10 #include "Teko_BlockImplicitLinearOp.hpp"
15 using Teuchos::rcp_const_cast;
16 using Teuchos::rcp_dynamic_cast;
17 using Teuchos::rcpFromRef;
19 using Thyra::ProductMultiVectorBase;
22 const BlockedMultiVector& x, BlockedMultiVector& y,
23 const double alpha,
const double beta)
const {
24 TEUCHOS_TEST_FOR_EXCEPTION(M_trans != Thyra::NOTRANS, std::runtime_error,
25 "Linear operators of inherited type BlockImplicitLinearOp "
26 "cannot handle conjugation (yet!)");
33 return (M_trans == Thyra::NOTRANS);
36 void BlockImplicitLinearOp::applyImpl(
const Thyra::EOpTransp M_trans,
37 const Thyra::MultiVectorBase<double>& x,
38 const Teuchos::Ptr<Thyra::MultiVectorBase<double> >& y,
39 const double alpha,
const double beta)
const {
41 RCP<const ProductMultiVectorBase<double> > src =
42 rcp_dynamic_cast<
const ProductMultiVectorBase<double> >(rcpFromRef(x));
43 BlockedMultiVector srcX = rcp_const_cast<ProductMultiVectorBase<double> >(src);
46 BlockedMultiVector destY = rcp_dynamic_cast<ProductMultiVectorBase<double> >(rcpFromPtr(y));
virtual void implicitApply(const BlockedMultiVector &x, BlockedMultiVector &y, const double alpha=1.0, const double beta=0.0) const =0
Perform a matrix vector multiply with this implicitly defined blocked operator.
virtual bool opSupportedImpl(const Thyra::EOpTransp M_trans) const
Functions required by Thyra::LinearOpBase.