Abstract class which block preconditioner factories in Teko should be based on. More...
#include <Teko_PreconditionerFactory.hpp>
Public Member Functions | |
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. More... | |
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... | |
Methods for construction from a parameter list entry | |
virtual void | initializeFromParameterList (const Teuchos::ParameterList &) |
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 &) |
Update this object with the fields from a parameter list. More... | |
Methods inherited from Thyra::PreconditionerFactoryBase | |
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... | |
Methods inherited from Teuchos::ParameterListAcceptor | |
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... | |
Static Public Member Functions | |
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 | |
Teuchos::RCP < Teuchos::ParameterList > | paramList_ |
for ParameterListAcceptor More... | |
Teuchos::RCP< RequestHandler > | callbackHandler_ |
For handling requests and send requests back to the user. More... | |
Abstract class which block preconditioner factories in Teko should be based on.
Abstract class which block preconditioner factories in Teko should be based on. All that is needed is the implementation of "buildPreconditionerOperator". This class also uses the RequestHandler
concrete interface. This is useful for extracting information from the user in an unobtrusive and modular way.
Definition at line 82 of file Teko_PreconditionerFactory.hpp.
|
pure 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. |
Implemented in Teko::IterativePreconditionerFactory, Teko::BlockPreconditionerFactory, Teko::DiagonalPreconditionerFactory, Teko::DiagonallyScaledPreconditionerFactory, Teko::DiagnosticPreconditionerFactory, and Teko::IdentityPreconditionerFactory.
|
inlinevirtual |
Function that permits the construction of an arbitrary PreconditionerState object.
Function that permits the construction of an arbitrary PreconditionerState object. If the basic state object, which takes a parameter list, is sufficient the default behavior does precisely what is needed. Otherwise, an author of a PreconditionerFactory would need to reimplement this method to return a new state object.
Reimplemented in Teko::NS::ModALPreconditionerFactory, Teko::MultPreconditionerFactory, Teko::BlockPreconditionerFactory, Teko::DiagonalPreconditionerFactory, Teko::AddPreconditionerFactory, and Teko::MLPreconditionerFactory.
Definition at line 114 of file Teko_PreconditionerFactory.hpp.
|
inlinevirtual |
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 in Teko::LU2x2PreconditionerFactory, Teko::IterativePreconditionerFactory, Teko::MultPreconditionerFactory, Teko::GaussSeidelPreconditionerFactory, Teko::DiagonallyScaledPreconditionerFactory, Teko::DiagonalPreconditionerFactory, Teko::DiagnosticPreconditionerFactory, Teko::JacobiPreconditionerFactory, Teko::NS::TimingsSIMPLEPreconditionerFactory, Teko::NS::SIMPLEPreconditionerFactory, Teko::AddPreconditionerFactory, Teko::IdentityPreconditionerFactory, and Teko::MLPreconditionerFactory.
Definition at line 132 of file Teko_PreconditionerFactory.hpp.
|
inlinevirtual |
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 in Teko::LU2x2PreconditionerFactory, Teko::IterativePreconditionerFactory, Teko::DiagnosticPreconditionerFactory, Teko::NS::TimingsSIMPLEPreconditionerFactory, and Teko::NS::SIMPLEPreconditionerFactory.
Definition at line 149 of file Teko_PreconditionerFactory.hpp.
|
inlinevirtual |
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 in Teko::LU2x2PreconditionerFactory, Teko::IterativePreconditionerFactory, Teko::DiagnosticPreconditionerFactory, Teko::NS::TimingsSIMPLEPreconditionerFactory, and Teko::NS::SIMPLEPreconditionerFactory.
Definition at line 165 of file Teko_PreconditionerFactory.hpp.
void Teko::PreconditionerFactory::setInverseLibrary | ( | const Teuchos::RCP< const InverseLibrary > & | il | ) |
Set the inverse library used by this preconditioner factory.
Definition at line 174 of file Teko_PreconditionerFactory.cpp.
RCP< const InverseLibrary > Teko::PreconditionerFactory::getInverseLibrary | ( | ) | const |
Get the inverse library used by this preconditioner factory.
Definition at line 180 of file Teko_PreconditionerFactory.cpp.
bool Teko::PreconditionerFactory::isCompatible | ( | const Thyra::LinearOpSourceBase< double > & | fwdOpSrc | ) | const |
is this operator compatiable with the preconditioner factory?
Definition at line 84 of file Teko_PreconditionerFactory.cpp.
RCP< Thyra::PreconditionerBase< double > > Teko::PreconditionerFactory::createPrec | ( | ) | const |
create an instance of the preconditioner
Definition at line 91 of file Teko_PreconditionerFactory.cpp.
void Teko::PreconditionerFactory::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
Initialize a newly created preconditioner object. For use with nonlinear solvers.
[in] | fwdOpSrc | Forward operator to be preconditioned |
[in] | solnVec | Vector associated with this linear operator. |
[in,out] | precOp | Return location for the preconditioner |
[in] | supportSolveUse | Thyra information (?) |
void Teko::PreconditionerFactory::initializePrec | ( | const Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > & | fwdOpSrc, |
Thyra::PreconditionerBase< double > * | precOp, | ||
const Thyra::ESupportSolveUse | supportSolveUse | ||
) | const |
initialize a newly created preconditioner object
void Teko::PreconditionerFactory::uninitializePrec | ( | Thyra::PreconditionerBase< double > * | prec, |
Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > * | fwdOpSrc, | ||
Thyra::ESupportSolveUse * | supportSolveUse | ||
) | const |
wipe clean a already initialized preconditioner object
Definition at line 140 of file Teko_PreconditionerFactory.cpp.
void Teko::PreconditionerFactory::setParameterList | ( | const Teuchos::RCP< Teuchos::ParameterList > & | paramList | ) |
Set parameters from a parameter list and return with default values.
Definition at line 154 of file Teko_PreconditionerFactory.cpp.
RCP< Teuchos::ParameterList > Teko::PreconditionerFactory::getNonconstParameterList | ( | ) |
Get the parameter list that was set using setParameterList().
Definition at line 160 of file Teko_PreconditionerFactory.cpp.
RCP< Teuchos::ParameterList > Teko::PreconditionerFactory::unsetParameterList | ( | ) |
Unset the parameter list that was set using setParameterList().
Definition at line 166 of file Teko_PreconditionerFactory.cpp.
|
inlinevirtual |
Set the request handler with pointers to the appropriate callbacks.
Implements Teko::RequestHandlerContainer.
Definition at line 225 of file Teko_PreconditionerFactory.hpp.
|
inlinevirtual |
Get the request handler with pointers to the appropriate callbacks.
Implements Teko::RequestHandlerContainer.
Definition at line 229 of file Teko_PreconditionerFactory.hpp.
|
static |
Builder function for creating preconditioner factories (yes this is a factory factory).
Builder function for creating preconditioner factories (yes this is a factory factory.
Builder function for creating preconditioner factories (yes this is a factory factory).
[in] | name | String name of factory to build |
[in] | settings | Parameter list describing the parameters for the factory to build |
[in] | invLib | Inverse library for the factory to use. |
Builder function for creating preconditioner factories (yes this is a factory factory.
[in] | name | String name of factory to build |
[in] | settings | Parameter list describing the parameters for the factory to build |
[in] | invLib | Inverse library for the factory to use. |
Definition at line 227 of file Teko_PreconditionerFactory.cpp.
|
static |
Add a preconditioner factory to the builder. This is done using the clone pattern.
Add a preconditioner factory to the builder. This is done using the clone pattern. If your class does not support the Cloneable interface then you can use the AutoClone class to construct your object.
[in] | name | String to associate with this object |
[in] | clone | Pointer to Cloneable object |
Definition at line 273 of file Teko_PreconditionerFactory.cpp.
|
static |
Get the names of the block preconditioner factories.
Definition at line 338 of file Teko_PreconditionerFactory.cpp.
|
protected |
for ParameterListAcceptor
Definition at line 234 of file Teko_PreconditionerFactory.hpp.
|
protected |
For handling requests and send requests back to the user.
Definition at line 237 of file Teko_PreconditionerFactory.hpp.