10 #ifndef __Teko_BlockInvDiagonalStrategy_hpp__
11 #define __Teko_BlockInvDiagonalStrategy_hpp__
16 #include "Teuchos_RCP.hpp"
19 #include "Thyra_LinearOpBase.hpp"
23 #include "Teko_InverseFactory.hpp"
24 #include "Teko_BlockPreconditionerFactory.hpp"
48 std::vector<LinearOp> &invDiag)
const = 0;
60 invDiag_.push_back(invD0);
61 invDiag_.push_back(invD1);
72 std::vector<LinearOp> &invDiag)
const {
79 std::vector<Teuchos::RCP<const Thyra::LinearOpBase<double> > > invDiag_;
103 const Teuchos::RCP<InverseFactory> &defaultFact = Teuchos::null);
106 const std::vector<Teuchos::RCP<InverseFactory> > &inverseFactories,
107 const std::vector<Teuchos::RCP<InverseFactory> > &preconditionerFactories,
108 const Teuchos::RCP<InverseFactory> &defaultInverseFact = Teuchos::null,
109 const Teuchos::RCP<InverseFactory> &defaultPreconditionerFact = Teuchos::null);
121 std::vector<LinearOp> &invDiag)
const;
124 const std::vector<Teuchos::RCP<InverseFactory> > &
getFactories()
const {
return invDiagFact_; }
128 std::vector<Teuchos::RCP<InverseFactory> > invDiagFact_;
129 std::vector<Teuchos::RCP<InverseFactory> > precDiagFact_;
130 Teuchos::RCP<InverseFactory> defaultInvFact_;
131 Teuchos::RCP<InverseFactory> defaultPrecFact_;
136 const std::string &opPrefix,
int i)
const;
Abstract class for building an inverse operator.
virtual void getInvD(const BlockedLinearOp &A, BlockPreconditionerState &state, std::vector< LinearOp > &invDiag) const
virtual void getInvD(const BlockedLinearOp &, BlockPreconditionerState &, std::vector< LinearOp > &invDiag) const
An implementation of a state object for block preconditioners.
const std::vector< Teuchos::RCP< InverseFactory > > & getFactories() const
Get factories for testing purposes.
virtual void getInvD(const BlockedLinearOp &A, BlockPreconditionerState &state, std::vector< LinearOp > &invDiag) const =0
returns an (approximate) inverse of the diagonal blocks of A
LinearOp buildInverse(const InverseFactory &invFact, Teuchos::RCP< InverseFactory > &precFact, const LinearOp &matrix, BlockPreconditionerState &state, const std::string &opPrefix, int i) const
Conveinence function for building inverse operators.