56class PrecBlock2x2 :
public PreconditionerOperator<SC,LO,GO,NO> {
59 typedef Teuchos::RCP<Thyra::LinearOpBase<SC> > ThyraLinOpPtr_Type;
60 typedef Teuchos::Comm<int> Comm_Type;
61 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
65 PrecBlock2x2(CommConstPtr_Type comm);
70 ThyraLinOpPtr_Type pressureInv);
74 ThyraLinOpPtr_Type pressureInv,
75 ThyraLinOpPtr_Type BT);
79 ThyraLinOpPtr_Type laplaceInverse,
80 ThyraLinOpPtr_Type convectionDiffusionOperator,
81 ThyraLinOpPtr_Type massMatrixInverse,
82 ThyraLinOpPtr_Type massMatrixVInverse,
83 ThyraLinOpPtr_Type BT);
87 ThyraLinOpPtr_Type laplaceInverse,
88 ThyraLinOpPtr_Type massMatrixVInverse,
89 ThyraLinOpPtr_Type BT);
98 void setPressureInvs(ThyraLinOpPtr_Type laplaceInverse, ThyraLinOpPtr_Type convectionDiffusionOperator, ThyraLinOpPtr_Type massMatrixInverse, ThyraLinOpPtr_Type massMatrixVInverse);
101 void setPressureInvs(ThyraLinOpPtr_Type laplaceInverse, ThyraLinOpPtr_Type massMatrixVInverse);
104 void setB(ThyraLinOpPtr_Type B) {B_ = B;};
107 void setF(ThyraLinOpPtr_Type F) {F_ = F;};
110 void setType(std::string type);
114 virtual void applyIt(
115 const Thyra::EOpTransp M_trans,
116 const Thyra::MultiVectorBase<SC> &X,
117 const Teuchos::Ptr<Thyra::MultiVectorBase<SC> > &Y,
125 const Thyra::EOpTransp M_trans,
126 const Thyra::MultiVectorBase<SC> &X,
127 const Teuchos::Ptr<Thyra::MultiVectorBase<SC> > &Y,
138 ThyraLinOpPtr_Type velocityInv_;
139 ThyraLinOpPtr_Type pressureInv_;
140 ThyraLinOpPtr_Type BT_;
141 ThyraLinOpPtr_Type B_;
142 ThyraLinOpPtr_Type F_;
143 ThyraLinOpPtr_Type laplaceInverse_;
144 ThyraLinOpPtr_Type convectionDiffusionOperator_;
145 ThyraLinOpPtr_Type massMatrixInverse_;
146 ThyraLinOpPtr_Type massMatrixVInverse_;
148 mutable Teuchos::RCP<const Thyra::DefaultProductVectorSpace<SC> > productRangeFluid_;
150 CommConstPtr_Type comm_;
virtual void applyImpl(const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< SC > &X, const Teuchos::Ptr< Thyra::MultiVectorBase< SC > > &Y, const SC alpha, const SC beta) const
Apply of preconditioner in e.g. GMRES.
Definition PrecBlock2x2_def.hpp:188
void setDiagonal(ThyraLinOpPtr_Type velocityInv, ThyraLinOpPtr_Type pressureInv)
Diagonal preconditioner with \hat{S}= -1/nu M_p schur complement approximation.
Definition PrecBlock2x2_def.hpp:38
void setTriangular(ThyraLinOpPtr_Type velocityInv, ThyraLinOpPtr_Type pressureInv, ThyraLinOpPtr_Type BT)
Triangular preconditioner with \hat{S}= -1/nu M_p schur complement approximation.
Definition PrecBlock2x2_def.hpp:52
void setPressureInvs(ThyraLinOpPtr_Type laplaceInverse, ThyraLinOpPtr_Type convectionDiffusionOperator, ThyraLinOpPtr_Type massMatrixInverse, ThyraLinOpPtr_Type massMatrixVInverse)
Setting inverse approximation of Schur complement by multiple operators. Corresponds to PCD.
Definition PrecBlock2x2_def.hpp:117