10 #include "Teko_BlockPreconditionerFactory.hpp"
12 #include "Teko_Preconditioner.hpp"
13 #include "Teko_InverseLibrary.hpp"
15 #include "Thyra_DefaultPreconditioner.hpp"
17 using namespace Thyra;
23 LinearOp BlockPreconditionerFactory::buildPreconditionerOperator(LinearOp &lo,
26 RCP<LinearOpBase<double> > loA = Teuchos::rcp_const_cast<Thyra::LinearOpBase<double> >(lo);
27 BlockedLinearOp A = Teuchos::rcp_dynamic_cast<Thyra::PhysicallyBlockedLinearOpBase<double> >(loA);
31 return buildPreconditionerOperator(A, dynamic_cast<BlockPreconditionerState &>(state));
35 bool BlockPreconditionerFactory::isCompatible(
36 const Thyra::LinearOpSourceBase<double> &fwdOpSrc)
const {
37 RCP<const Thyra::PhysicallyBlockedLinearOpBase<double> > A =
38 Teuchos::rcp_dynamic_cast<
const Thyra::PhysicallyBlockedLinearOpBase<double> >(
40 return A != Teuchos::null;
An implementation of a state object preconditioners.
virtual void setInitialized(bool init=true)