A class which applies a preconditioner repeatedly. The inherit assumption is that the preconditioner corresponds to a residual correction. More...
#include <Teko_IterativePreconditionerFactory.hpp>
Public Member Functions | |
IterativePreconditionerFactory () | |
Default constructor, for use with the AutoClone class. More... | |
IterativePreconditionerFactory (unsigned int correctionNum, const Teuchos::RCP< Teko::InverseFactory > &precFactory) | |
IterativePreconditionerFactory (unsigned int correctionNum, const Teuchos::RCP< Teko::PreconditionerFactory > &precFactory) | |
virtual LinearOp | buildPreconditionerOperator (LinearOp &lo, PreconditionerState &state) const |
Function that is called to build the preconditioner for the linear operator that is passed in. More... | |
Methods for construction from a parameter list entry | |
virtual void | initializeFromParameterList (const Teuchos::ParameterList &settings) |
This function builds the internals of the preconditioner factory from a parameter list. More... | |
virtual Teuchos::RCP < Teuchos::ParameterList > | getRequestedParameters () const |
Request the additional parameters this preconditioner factory needs. More... | |
virtual bool | updateRequestedParameters (const Teuchos::ParameterList &pl) |
Update this object with the fields from a parameter list. More... | |
Public Member Functions inherited from Teko::PreconditionerFactory | |
virtual Teuchos::RCP < PreconditionerState > | buildPreconditionerState () const |
Function that permits the construction of an arbitrary PreconditionerState object. More... | |
void | setInverseLibrary (const Teuchos::RCP< const InverseLibrary > &il) |
Set the inverse library used by this preconditioner factory. More... | |
Teuchos::RCP< const InverseLibrary > | getInverseLibrary () const |
Get the inverse library used by this preconditioner factory. More... | |
void | setRequestHandler (const Teuchos::RCP< RequestHandler > &rh) |
Set the request handler with pointers to the appropriate callbacks. More... | |
Teuchos::RCP< RequestHandler > | getRequestHandler () const |
Get the request handler with pointers to the appropriate callbacks. More... | |
bool | isCompatible (const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const |
is this operator compatiable with the preconditioner factory? More... | |
Teuchos::RCP < Thyra::PreconditionerBase < double > > | createPrec () const |
create an instance of the preconditioner More... | |
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 More... | |
void | initializePrec (const Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > &fwdOpSrc, Thyra::PreconditionerBase< double > *precOp, const Thyra::ESupportSolveUse supportSolveUse) const |
initialize a newly created preconditioner object More... | |
void | uninitializePrec (Thyra::PreconditionerBase< double > *prec, Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > *fwdOpSrc, Thyra::ESupportSolveUse *supportSolveUse) const |
wipe clean a already initialized preconditioner object More... | |
void | setParameterList (const Teuchos::RCP< Teuchos::ParameterList > ¶mList) |
Set parameters from a parameter list and return with default values. More... | |
Teuchos::RCP < Teuchos::ParameterList > | getNonconstParameterList () |
Get the parameter list that was set using setParameterList(). More... | |
Teuchos::RCP < Teuchos::ParameterList > | unsetParameterList () |
Unset the parameter list that was set using setParameterList(). More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Teko::PreconditionerFactory | |
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). More... | |
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. More... | |
static void | getPreconditionerFactoryNames (std::vector< std::string > &names) |
Get the names of the block preconditioner factories. More... | |
Protected Attributes inherited from Teko::PreconditionerFactory | |
Teuchos::RCP < Teuchos::ParameterList > | paramList_ |
for ParameterListAcceptor More... | |
Teuchos::RCP< RequestHandler > | callbackHandler_ |
For handling requests and send requests back to the user. More... | |
A class which applies a preconditioner repeatedly. The inherit assumption is that the preconditioner corresponds to a residual correction.
A class which applies a preconditioner repeatedly. The inherit assumption is that the preconditioner corresponds to a residual correction. For a linear operator preconditioned by the initial residual correction is
Now because the preconditioner approximates we have . This leads to the following residual correction scheme
An additional application of the preconditioner will give the $i^{th}$ correction
This factory takes a preconditioner (or inverse) factory and constructs , and then applies it, as outlined above, a user specified number of times.
Similar to the other preconditioner in Teko this class can be constructed through an XML file. For example:
Definition at line 60 of file Teko_IterativePreconditionerFactory.hpp.
Teko::IterativePreconditionerFactory::IterativePreconditionerFactory | ( | ) |
Default constructor, for use with the AutoClone class.
Definition at line 18 of file Teko_IterativePreconditionerFactory.cpp.
Teko::IterativePreconditionerFactory::IterativePreconditionerFactory | ( | unsigned int | correctionNum, |
const Teuchos::RCP< Teko::InverseFactory > & | precFactory | ||
) |
Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.
[in] | correctionNum | The correction number to be returned by the preconditioner operator. If the preconditioner is only applied once than correctionNum=0 and is returned. |
[in] | precFactory | Factory used to construct the preconditioner |
Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.
Definition at line 24 of file Teko_IterativePreconditionerFactory.cpp.
Teko::IterativePreconditionerFactory::IterativePreconditionerFactory | ( | unsigned int | correctionNum, |
const Teuchos::RCP< Teko::PreconditionerFactory > & | precFactory | ||
) |
Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.
[in] | correctionNum | The correction number to be returned by the preconditioner operator. If the preconditioner is only applied once than correctionNum=0 and is returned. |
[in] | precFactory | Factory used to construct the preconditioner |
Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.
Definition at line 31 of file Teko_IterativePreconditionerFactory.cpp.
|
virtual |
Function that is called to build the preconditioner for the linear operator that is passed in.
This function builds a preconditioner based on the passed in LinearOp.
[in] | lo | Source linear operator that is to be preconditioned. |
[in] | state | An object associated with this operator to store the preconditioner state. |
Implements Teko::PreconditionerFactory.
Definition at line 41 of file Teko_IterativePreconditionerFactory.cpp.
|
virtual |
This function builds the internals of the preconditioner factory from a parameter list.
This function builds the internals of the preconditioner factory from a parameter list. Furthermore, it allows a preconditioner factory developer to easily add a factory to the build system. This function is required for building a preconditioner from a parameter list.
[in] | settings | Parmaeter list to use as the internal settings |
Reimplemented from Teko::PreconditionerFactory.
Definition at line 74 of file Teko_IterativePreconditionerFactory.cpp.
|
virtual |
Request the additional parameters this preconditioner factory needs.
Request the additonal parameters needed by this preconditioner factory. The parameter list will have a set of fields that can be filled with the requested values. These fields include all requirements, even those of the sub-solvers if there are any. Once correctly filled the object can be updated by calling the updateRequestedParameters with the filled parameter list.
Reimplemented from Teko::PreconditionerFactory.
Definition at line 98 of file Teko_IterativePreconditionerFactory.cpp.
|
virtual |
Update this object with the fields from a parameter list.
Update the requested fields using a parameter list. This method is expected to pair with the getRequestedParameters method (i.e. the fields requested are going to be update using this method).
[in] | pl | Parameter list containing the requested parameters. |
Reimplemented from Teko::PreconditionerFactory.
Definition at line 110 of file Teko_IterativePreconditionerFactory.cpp.