1 #include "Teko_ReorderedLinearOp.hpp"
5 ReorderedLinearOp::ReorderedLinearOp(
const Teuchos::RCP<const BlockReorderManager> & mgr,
6 const Teuchos::RCP<Thyra::LinearOpBase<double> > & blockedOp)
7 : mgr_(mgr), blockedOp_(blockedOp)
10 range_ = buildFlatVectorSpace(*mgr_,blockedOp_->range());
11 domain_ = buildFlatVectorSpace(*mgr_,blockedOp_->domain());
25 const double alpha,
const double beta)
const
27 using Teuchos::rcp_dynamic_cast;
29 Teuchos::RCP<const Thyra::MultiVectorBase<double> > reorderX
34 Thyra::apply(*blockedOp_,Thyra::NOTRANS,*reorderX,reorderY.ptr(),alpha,beta);
37 void ReorderedLinearOp::describe(Teuchos::FancyOStream & out_arg,
38 const Teuchos::EVerbosityLevel verbLevel)
const
43 RCP<Teuchos::FancyOStream> out = rcp(&out_arg,
false);
46 case Teuchos::VERB_DEFAULT:
47 case Teuchos::VERB_LOW:
48 *out << this->description() << std::endl;
50 case Teuchos::VERB_MEDIUM:
51 case Teuchos::VERB_HIGH:
52 case Teuchos::VERB_EXTREME:
54 *out << Teuchos::Describable::description() <<
"{"
55 <<
"rangeDim=" << this->range()->dim()
56 <<
",domainDim=" << this->domain()->dim()
60 *out <<
"[Blocked Op] = ";
61 *out << Teuchos::describe(*blockedOp_,verbLevel);
65 *out <<
"[Blocked Manager] = ";
66 *out << mgr_->toString() << std::endl;
71 TEUCHOS_TEST_FOR_EXCEPT(
true);
Teuchos::RCP< const Thyra::MultiVectorBase< double > > buildReorderedMultiVector(const BlockReorderManager &mgr, const Teuchos::RCP< const Thyra::ProductMultiVectorBase< double > > &blkVec)
Convert a flat multi vector into a reordered multivector.
virtual VectorSpace range() const
Range space of this operator.
virtual VectorSpace domain() const
Domain space of this operator.
virtual void implicitApply(const MultiVector &x, MultiVector &y, const double alpha=1.0, const double beta=0.0) const
Perform a matrix vector multiply with this implicitly defined blocked operator.