9 #ifndef Thyra_AdjointPreconditioner_hpp
10 #define Thyra_AdjointPreconditioner_hpp
12 #include "Thyra_PreconditionerBase.hpp"
13 #include "Teuchos_ConstNonconstObjectContainer.hpp"
14 #include "Thyra_DefaultScaledAdjointLinearOp.hpp"
21 template<
class Scalar>
33 const RCP<PreconditionerBase<Scalar> > &prec) {
39 const RCP<
const PreconditionerBase<Scalar> > &prec) {
44 RCP<PreconditionerBase<Scalar> >
47 RCP<const PreconditionerBase<Scalar> >
60 {
return prec_.getConstObj()->isLeftPrecOpConst(); }
63 {
return nonconstAdjoint(
prec_.getNonconstObj()->getNonconstLeftPrecOp()); }
66 {
return adjoint(
prec_.getConstObj()->getLeftPrecOp()); }
69 {
return prec_.getConstObj()->isRightPrecOpConst(); }
72 {
return nonconstAdjoint(
prec_.getNonconstObj()->getNonconstRightPrecOp()); }
75 {
return adjoint(
prec_.getConstObj()->getRightPrecOp()); }
78 {
return prec_.getConstObj()->isUnspecifiedPrecOpConst(); }
81 {
return nonconstAdjoint(
82 prec_.getNonconstObj()->getNonconstUnspecifiedPrecOp()); }
85 {
return adjoint(
prec_.getNonconstObj()->getUnspecifiedPrecOp()); }
94 typedef Teuchos::ConstNonconstObjectContainer<PreconditionerBase<Scalar> >
CNPB;
105 const RCP<
const PreconditionerBase<Scalar> > &prec) {
107 TEUCHOS_TEST_FOR_EXCEPT(is_null(prec));
119 template<
class Scalar>
120 RCP<AdjointPreconditioner<Scalar> >
130 template<
class Scalar>
131 RCP<AdjointPreconditioner<Scalar> >
133 const RCP<PreconditionerBase<Scalar> > &prec
136 RCP<AdjointPreconditioner<Scalar> >
138 aprec->nonconstInitialize(prec);
146 template<
class Scalar>
147 RCP<AdjointPreconditioner<Scalar> >
149 const RCP<
const PreconditionerBase<Scalar> > &prec
152 RCP<AdjointPreconditioner<Scalar> >
154 aprec->initialize(prec);
bool isUnspecifiedPrecOpConst() const
Concrete PreconditionerBase subclass that wraps a preconditioner operator in MultiVectorLinearOp.
bool isLeftPrecOpConst() const
RCP< AdjointPreconditioner< Scalar > > adjointPreconditioner()
Nonmember constructor function.
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstRightPrecOp()
RCP< AdjointPreconditioner< Scalar > > adjointPreconditioner(const RCP< const PreconditionerBase< Scalar > > &prec)
Nonmember constructor function.
bool isRightPrecOpConst() const
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstLeftPrecOp()
void initialize(const RCP< const PreconditionerBase< Scalar > > &prec)
Teuchos::RCP< const LinearOpBase< Scalar > > getRightPrecOp() const
AdjointPreconditioner()
Construct to uninitialized.
void nonconstInitialize(const RCP< PreconditionerBase< Scalar > > &prec)
Teuchos::RCP< const LinearOpBase< Scalar > > getLeftPrecOp() const
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstUnspecifiedPrecOp()
static void validateInitialize(const RCP< const PreconditionerBase< Scalar > > &prec)
RCP< PreconditionerBase< Scalar > > getNonconstPreconditioner()
Teuchos::RCP< const LinearOpBase< Scalar > > getUnspecifiedPrecOp() const
Teuchos::ConstNonconstObjectContainer< PreconditionerBase< Scalar > > CNPB
RCP< AdjointPreconditioner< Scalar > > nonconstAdjointPreconditioner(const RCP< PreconditionerBase< Scalar > > &prec)
Nonmember constructor function.
RCP< const PreconditionerBase< Scalar > > getPreconditioner() const