Teko  Version of the Day
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
Teko::AdaptivePreconditionerFactory Class Reference

#include <Teko_AdaptivePreconditionerFactory.hpp>

Inheritance diagram for Teko::AdaptivePreconditionerFactory:
Inheritance graph
[legend]

Public Member Functions

LinearOp buildPreconditionerOperator (LinearOp &lo, PreconditionerState &state) const override
 Function that is called to build the preconditioner for the linear operator that is passed in. More...
 
void initializeFromParameterList (const Teuchos::ParameterList &pl) override
 This function builds the internals of the preconditioner factory 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< RequestHandlergetRequestHandler () const
 Get the request handler with pointers to the appropriate callbacks. 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...
 
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 > &paramList)
 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< RequestHandlercallbackHandler_
 For handling requests and send requests back to the user. More...
 

Detailed Description

Adaptive sub-block solver. Given a user-provided schedule of sub-block solvers, progressively try more sub-block solvers until sufficient residual reduction has been reached.

<Parameter name="Type" type="string" value="Adaptive"/>
<!-- Target relative residual reduction. Default: 1e-1. -->
<Parameter name="Target Residual Reduction" type="double" value="1e-2"/>
<!-- Specify schedule of inverses:
Robustness/cost should increase, with, e.g., 3 more expensive and robust than 2, 2 more
expensive and robust than 1, etc.
-->
<Parameter name="Inverse Type 1" type="string" value="GMRES"/>
<Parameter name="Preconditioner Type 1" type="string" value="Jacobi"/>
<Parameter name="Inverse Type 2" type="string" value="GMRES"/>
<Parameter name="Preconditioner Type 2" type="string" value="MueLu"/>
<Parameter name="Inverse Type 3" type="string" value="Amesos2"/>
<!--
If a system has more rows than the given maximum size, avoid constructing the
preconditioner/solver at this position. For example, this can be used to prevent a direct solver
from being used on a sufficiently large sub-block. Default:
std::numeric_limits<SizeOrdinalType>::max().
-->
<Parameter name="Maximum Size 3" type="long long int" value="10000"/>
<!-- Number of times to try a solver before resetting to the first solver. Default: 100.-->
<Parameter name="Number of Successful Applications Before Resetting" type="int" value="100"/>

Definition at line 56 of file Teko_AdaptivePreconditionerFactory.hpp.

Member Function Documentation

LinearOp Teko::AdaptivePreconditionerFactory::buildPreconditionerOperator ( LinearOp &  lo,
PreconditionerState state 
) const
overridevirtual

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.

Parameters
[in]loSource linear operator that is to be preconditioned.
[in]stateAn object associated with this operator to store the preconditioner state.
Returns
The preconditioner as a linear operator (i.e. to perform a matrix-vector operation simply call "apply").

Implements Teko::PreconditionerFactory.

Definition at line 205 of file Teko_AdaptivePreconditionerFactory.cpp.

void Teko::AdaptivePreconditionerFactory::initializeFromParameterList ( const Teuchos::ParameterList &  )
overridevirtual

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.

Parameters
[in]settingsParmaeter list to use as the internal settings
Note
The default implementation does nothing.

Reimplemented from Teko::PreconditionerFactory.

Definition at line 211 of file Teko_AdaptivePreconditionerFactory.cpp.


The documentation for this class was generated from the following files: