10 #ifndef __Teko_InverseFactory_hpp__
11 #define __Teko_InverseFactory_hpp__
14 #include "Teuchos_RCP.hpp"
17 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
18 #include "Thyra_PreconditionerFactoryBase.hpp"
20 #include "Teko_Config.h"
22 #include "Teko_PreconditionerState.hpp"
23 #include "Teko_RequestHandler.hpp"
24 #include "Teko_RequestHandlerContainer.hpp"
47 virtual InverseLinearOp
buildInverse(
const LinearOp& linearOp)
const = 0;
62 const LinearOp& )
const {
97 virtual InverseLinearOp
buildInverse(
const LinearOp & linearOp,
const LinearOp & precOp,
const PreconditionerState & parentState)
const
112 virtual void rebuildInverse(
const LinearOp& source, InverseLinearOp& dest)
const = 0;
127 InverseLinearOp& dest)
const {
139 virtual Teuchos::RCP<const Teuchos::ParameterList>
getParameterList()
const = 0;
142 virtual std::string
toString()
const = 0;
159 return Teuchos::null;
201 StaticOpInverseFactory(
const LinearOp inv) : inverse_(inv) {}
204 StaticOpInverseFactory(
const StaticOpInverseFactory& saFactory) : inverse_(saFactory.inverse_) {}
207 virtual ~StaticOpInverseFactory() {}
223 virtual InverseLinearOp
buildInverse(
const LinearOp& )
const {
224 return Teuchos::rcp_const_cast<Thyra::LinearOpBase<double> >(this->inverse_);
241 virtual void rebuildInverse(
const LinearOp& , InverseLinearOp& )
const {}
251 virtual Teuchos::RCP<const Teuchos::ParameterList> getParameterList()
const {
252 return Teuchos::null;
256 virtual std::string toString()
const {
return inverse_->description(); }
259 Teko::LinearOp inverse_;
263 StaticOpInverseFactory();
279 InverseLinearOp
buildInverse(
const InverseFactory& factory,
const LinearOp& A);
292 InverseLinearOp
buildInverse(
const InverseFactory& factory,
const LinearOp& A,
293 const LinearOp& precOp);
309 void rebuildInverse(
const InverseFactory& factory,
const LinearOp& A, InverseLinearOp& invA);
326 void rebuildInverse(
const InverseFactory& factory,
const LinearOp& A,
const LinearOp& precOp,
327 InverseLinearOp& invA);
346 const std::string& type);
void rebuildInverse(const InverseFactory &factory, const LinearOp &A, InverseLinearOp &invA)
Abstract class for building an inverse operator.
virtual InverseLinearOp buildInverse(const LinearOp &linearOp) const =0
Build an inverse operator.
Teuchos::RCP< RequestHandler > getRequestHandler() const
Get the request handler with pointers to the appropriate callbacks.
Teuchos::RCP< RequestHandler > callbackHandler_
For handling requests and send requests back to the user.
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
Request the additional parameters this preconditioner factory needs.
RCP< InverseFactory > invFactoryFromParamList(const Teuchos::ParameterList &list, const std::string &type)
Build an InverseFactory object from a ParameterList, as specified in Stratimikos. ...
virtual std::string toString() const =0
virtual Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const =0
A function that permits inspection of the parameters used to create this object.
virtual InverseLinearOp buildInverse(const LinearOp &linearOp, const LinearOp &) const
Build a preconditioned inverse operator.
virtual bool updateRequestedParameters(const Teuchos::ParameterList &)
Update this object with the fields from a parameter list.
virtual void rebuildInverse(const LinearOp &source, const LinearOp &, InverseLinearOp &dest) const
Pass in an already constructed inverse operator. Update the inverse operator based on the new source ...
InverseLinearOp buildInverse(const InverseFactory &factory, const LinearOp &A)
Build an inverse operator using a factory and a linear operator.
void setRequestHandler(const Teuchos::RCP< RequestHandler > &rh)
Set the request handler with pointers to the appropriate callbacks.
An implementation of a state object preconditioners.
Teuchos::RCP< const Teuchos::ParameterList > invFactoryValidParameters()
Get a valid parameter list for the inverse factory class.
virtual void rebuildInverse(const LinearOp &source, InverseLinearOp &dest) const =0
Pass in an already constructed inverse operator. Update the inverse operator based on the new source ...