47 #ifndef __Teko_InverseFactory_hpp__
48 #define __Teko_InverseFactory_hpp__
51 #include "Teuchos_RCP.hpp"
54 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
55 #include "Thyra_PreconditionerFactoryBase.hpp"
57 #include "Teko_Config.h"
59 #include "Teko_PreconditionerState.hpp"
60 #include "Teko_RequestHandler.hpp"
61 #include "Teko_RequestHandlerContainer.hpp"
84 virtual InverseLinearOp
buildInverse(
const LinearOp & linearOp)
const = 0;
98 virtual InverseLinearOp
buildInverse(
const LinearOp & linearOp,
const LinearOp & )
const
132 virtual InverseLinearOp
buildInverse(
const LinearOp & linearOp,
const LinearOp & precOp,
const PreconditionerState & parentState)
const
147 virtual void rebuildInverse(
const LinearOp & source,InverseLinearOp & dest)
const = 0;
161 virtual void rebuildInverse(
const LinearOp & source,
const LinearOp & ,InverseLinearOp & dest)
const
172 virtual Teuchos::RCP<const Teuchos::ParameterList>
getParameterList()
const = 0;
175 virtual std::string
toString()
const = 0;
192 {
return Teuchos::null; }
236 StaticOpInverseFactory(
const LinearOp inv)
240 StaticOpInverseFactory(
const StaticOpInverseFactory & saFactory)
241 : inverse_(saFactory.inverse_) {}
244 virtual ~StaticOpInverseFactory() {}
260 virtual InverseLinearOp
buildInverse(
const LinearOp & )
const
261 {
return Teuchos::rcp_const_cast<Thyra::LinearOpBase<double> >(this->inverse_); }
277 virtual void rebuildInverse(
const LinearOp & ,InverseLinearOp & )
const
288 virtual Teuchos::RCP<const Teuchos::ParameterList> getParameterList()
const
289 {
return Teuchos::null; }
292 virtual std::string toString()
const {
return inverse_->description(); }
295 Teko::LinearOp inverse_;
299 StaticOpInverseFactory();
315 InverseLinearOp
buildInverse(
const InverseFactory & factory,
const LinearOp & A);
328 InverseLinearOp
buildInverse(
const InverseFactory & factory,
const LinearOp & A,
const LinearOp & precOp);
344 void rebuildInverse(
const InverseFactory & factory,
const LinearOp & A, InverseLinearOp & invA);
361 void rebuildInverse(
const InverseFactory & factory,
const LinearOp & A,
const LinearOp & precOp, InverseLinearOp & invA);
379 Teuchos::RCP<InverseFactory>
invFactoryFromParamList(
const Teuchos::ParameterList & list,
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 ...