10 #ifndef __Teko_PreconditionerFactory_hpp__
11 #define __Teko_PreconditionerFactory_hpp__
13 #include "Teuchos_ParameterListAcceptor.hpp"
16 #include "Thyra_SolveSupportTypes.hpp"
17 #include "Thyra_LinearOpSourceBase.hpp"
18 #include "Thyra_PreconditionerFactoryBase.hpp"
19 #include "Thyra_DefaultBlockedLinearOp.hpp"
20 #include "Thyra_DefaultPreconditioner.hpp"
24 #include "Teko_InverseLibrary.hpp"
25 #include "Teko_CloneFactory.hpp"
26 #include "Teko_PreconditionerState.hpp"
27 #include "Teko_RequestHandler.hpp"
28 #include "Teko_RequestHandlerContainer.hpp"
32 using Thyra::DefaultPreconditioner;
33 using Thyra::LinearOpBase;
111 return Teuchos::null;
141 bool isCompatible(
const Thyra::LinearOpSourceBase<double> &fwdOpSrc)
const;
144 Teuchos::RCP<Thyra::PreconditionerBase<double> >
createPrec()
const;
156 void initializePrec(
const Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > &fwdOpSrc,
157 const Teuchos::RCP<
const Thyra::MultiVectorBase<double> > &solnVec,
158 Thyra::PreconditionerBase<double> *precOp,
159 const Thyra::ESupportSolveUse supportSolveUse)
const;
162 void initializePrec(
const Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > &fwdOpSrc,
163 Thyra::PreconditionerBase<double> *precOp,
164 const Thyra::ESupportSolveUse supportSolveUse)
const;
168 Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > *fwdOpSrc,
169 Thyra::ESupportSolveUse *supportSolveUse)
const;
176 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList> ¶mList);
200 Teuchos::RCP<const InverseLibrary> inverseLibrary_;
221 const std::string &name,
const Teuchos::ParameterList &settings,
222 const Teuchos::RCP<const InverseLibrary> &invLib = Teuchos::null);
238 const Teuchos::RCP<Cloneable> &clone);
249 static void initializePrecFactoryBuilder();
virtual void initializeFromParameterList(const Teuchos::ParameterList &)
This function builds the internals of the preconditioner factory from a parameter list...
static void getPreconditionerFactoryNames(std::vector< std::string > &names)
Get the names of the block preconditioner factories.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Get the parameter list that was set using setParameterList().
Abstract class which block preconditioner factories in Teko should be based on.
Teuchos::RCP< Teuchos::ParameterList > paramList_
for ParameterListAcceptor
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > ¶mList)
Set parameters from a parameter list and return with default values.
void uninitializePrec(Thyra::PreconditionerBase< double > *prec, Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > *fwdOpSrc, Thyra::ESupportSolveUse *supportSolveUse) const
wipe clean a already initialized preconditioner object
virtual bool updateRequestedParameters(const Teuchos::ParameterList &)
Update this object with the fields from a parameter list.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Unset the parameter list that was set using setParameterList().
void setRequestHandler(const Teuchos::RCP< RequestHandler > &rh)
Set the request handler with pointers to the appropriate callbacks.
static void addPreconditionerFactory(const std::string &name, const Teuchos::RCP< Cloneable > &clone)
Add a preconditioner factory to the builder. This is done using the clone pattern.
Teuchos::RCP< RequestHandler > callbackHandler_
For handling requests and send requests back to the user.
void setInverseLibrary(const Teuchos::RCP< const InverseLibrary > &il)
Set the inverse library used by this preconditioner factory.
virtual LinearOp buildPreconditionerOperator(LinearOp &lo, PreconditionerState &state) const =0
Function that is called to build the preconditioner for the linear operator that is passed in...
bool isCompatible(const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const
is this operator compatiable with the preconditioner factory?
Teuchos::RCP< const InverseLibrary > getInverseLibrary() const
Get the inverse library used by this preconditioner factory.
void initializePrec(const Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > &fwdOpSrc, const Teuchos::RCP< const Thyra::MultiVectorBase< double > > &solnVec, Thyra::PreconditionerBase< double > *precOp, const Thyra::ESupportSolveUse supportSolveUse) const
initialize a newly created preconditioner object
Teuchos::RCP< Thyra::PreconditionerBase< double > > createPrec() const
create an instance of the preconditioner
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
Request the additional parameters this preconditioner factory needs.
An implementation of a state object preconditioners.
Teuchos::RCP< RequestHandler > getRequestHandler() const
Get the request handler with pointers to the appropriate callbacks.
virtual Teuchos::RCP< PreconditionerState > buildPreconditionerState() const
Function that permits the construction of an arbitrary PreconditionerState object.
static Teuchos::RCP< PreconditionerFactory > buildPreconditionerFactory(const std::string &name, const Teuchos::ParameterList &settings, const Teuchos::RCP< const InverseLibrary > &invLib=Teuchos::null)
Builder function for creating preconditioner factories (yes this is a factory factory).