47 #ifndef __Teko_PreconditionerFactory_hpp__
48 #define __Teko_PreconditionerFactory_hpp__
50 #include "Teuchos_ParameterListAcceptor.hpp"
53 #include "Thyra_SolveSupportTypes.hpp"
54 #include "Thyra_LinearOpSourceBase.hpp"
55 #include "Thyra_PreconditionerFactoryBase.hpp"
56 #include "Thyra_DefaultBlockedLinearOp.hpp"
57 #include "Thyra_DefaultPreconditioner.hpp"
61 #include "Teko_InverseLibrary.hpp"
62 #include "Teko_CloneFactory.hpp"
63 #include "Teko_PreconditionerState.hpp"
64 #include "Teko_RequestHandler.hpp"
65 #include "Teko_RequestHandlerContainer.hpp"
69 using Thyra::LinearOpBase;
70 using Thyra::DefaultPreconditioner;
150 {
return Teuchos::null; }
180 bool isCompatible(
const Thyra::LinearOpSourceBase<double> &fwdOpSrc)
const;
183 Teuchos::RCP<Thyra::PreconditionerBase<double> >
createPrec()
const;
195 void initializePrec(
const Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > & fwdOpSrc,
196 const Teuchos::RCP<
const Thyra::MultiVectorBase<double> > & solnVec,
197 Thyra::PreconditionerBase<double> * precOp,
198 const Thyra::ESupportSolveUse supportSolveUse)
const;
201 void initializePrec(
const Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > & fwdOpSrc,
202 Thyra::PreconditionerBase<double> * precOp,
203 const Thyra::ESupportSolveUse supportSolveUse)
const;
207 Teuchos::RCP<
const Thyra::LinearOpSourceBase<double> > * fwdOpSrc,
208 Thyra::ESupportSolveUse *supportSolveUse)
const;
215 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList> & paramList);
241 Teuchos::RCP<const InverseLibrary> inverseLibrary_;
262 static Teuchos::RCP<PreconditionerFactory>
264 const Teuchos::ParameterList & settings,
265 const Teuchos::RCP<const InverseLibrary> & invLib=Teuchos::null);
292 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).