10 #ifndef __Teko_BlockDiagonalInverseOp_hpp__
11 #define __Teko_BlockDiagonalInverseOp_hpp__
14 #include "Teko_BlockImplicitLinearOp.hpp"
62 virtual void implicitApply(
const BlockedMultiVector &x, BlockedMultiVector &y,
63 const double alpha = 1.0,
const double beta = 0.0)
const;
78 virtual void implicitApply(
const Thyra::EOpTransp M_trans,
const BlockedMultiVector &x,
79 BlockedMultiVector &y,
const double alpha = 1.0,
80 const double beta = 0.0)
const;
83 virtual void describe(Teuchos::FancyOStream &out_arg,
84 const Teuchos::EVerbosityLevel verbLevel)
const;
90 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> >
92 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> >
96 mutable BlockedMultiVector srcScrap_;
97 mutable BlockedMultiVector dstScrap_;
98 mutable bool allocated =
false;
101 inline LinearOp createBlockDiagonalInverseOp(BlockedLinearOp &A,
102 const std::vector<LinearOp> &invDiag) {
106 inline LinearOp createBlockDiagonalInverseOp(BlockedLinearOp &A,
107 const std::vector<LinearOp> &invDiag,
108 const std::string &str) {
109 Teuchos::RCP<Thyra::LinearOpBase<double> > result =
110 Teuchos::rcp(
new BlockDiagonalInverseOp(A, invDiag));
111 result->setObjectLabel(str);
This linear operator computes the inverse of a diagonal matrix.
virtual VectorSpace domain() const
Domain space of this operator.
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productRange_
Range vector space.
virtual void implicitApply(const BlockedMultiVector &x, BlockedMultiVector &y, const double alpha=1.0, const double beta=0.0) const
Perform a matrix vector multiply with this operator.
A virtual class that simplifies the construction of custom operators.
std::vector< LinearOp > invDiag_
(Approximate) Inverses of the diagonal operators
virtual VectorSpace range() const
Range space of this operator.
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productDomain_
Domain vector space.