Teko Version of the Day
Public Member Functions
Teko::IterativePreconditionerFactory Class Reference

A class which applies a preconditioner repeatedly. The inherit assumption is that the preconditioner corresponds to a residual correction. More...

#include <Teko_IterativePreconditionerFactory.hpp>

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

List of all members.

Public Member Functions

 IterativePreconditionerFactory ()
 Default constructor, for use with the AutoClone class.
 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.
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.
virtual Teuchos::RCP
< Teuchos::ParameterList > 
getRequestedParameters () const
 Request the additional parameters this preconditioner factory needs.
virtual bool updateRequestedParameters (const Teuchos::ParameterList &pl)
 Update this object with the fields from a parameter list.

Detailed Description

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 $A$ preconditioned by $P^{-1}$ the initial residual correction is

$ e_0 = P^{-1} r_0. $

Now because the preconditioner approximates $A^{-1}$ we have $r_1 = r_0 - A e_0$. This leads to the following residual correction scheme

$ r_i = (I - A P^{-1})^i r_0. $

An additional application of the preconditioner will give the $i^{th}$ correction

$ e_i = P^{-1} \sum_{j=0}^i r_j. $

This factory takes a preconditioner (or inverse) factory and constructs $P^{-1}$, 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:

    <ParameterList name="Iterative Solve">
      <Parameter name="Type" type="string" value="Iterative Preconditioner"/>
      <Parameter name="Preconditioner Type" type="string" value="ML"/>
      <Parameter name="Iteration Count" type="int" value="3"/>
    </ParameterList>

Definition at line 97 of file Teko_IterativePreconditionerFactory.hpp.


Constructor & Destructor Documentation

Teko::IterativePreconditionerFactory::IterativePreconditionerFactory ( )

Default constructor, for use with the AutoClone class.

Definition at line 55 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.

Parameters:
[in]correctionNumThe correction number to be returned by the preconditioner operator. If the preconditioner is only applied once than correctionNum=0 and $e_0$ is returned.
[in]precFactoryFactory used to construct the preconditioner

Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.

Definition at line 62 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.

Parameters:
[in]correctionNumThe correction number to be returned by the preconditioner operator. If the preconditioner is only applied once than correctionNum=0 and $e_0$ is returned.
[in]precFactoryFactory used to construct the preconditioner

Construct a preconditioner factory that applies a specified preconditioner, a fixed number of times.

Definition at line 70 of file Teko_IterativePreconditionerFactory.cpp.


Member Function Documentation

LinearOp Teko::IterativePreconditionerFactory::buildPreconditionerOperator ( LinearOp &  lo,
PreconditionerState state 
) const [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.

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 81 of file Teko_IterativePreconditionerFactory.cpp.

void Teko::IterativePreconditionerFactory::initializeFromParameterList ( const Teuchos::ParameterList &  settings) [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.

Parameters:
[in]settingsParmaeter list to use as the internal settings

Reimplemented from Teko::PreconditionerFactory.

Definition at line 113 of file Teko_IterativePreconditionerFactory.cpp.

Teuchos::RCP< Teuchos::ParameterList > Teko::IterativePreconditionerFactory::getRequestedParameters ( ) const [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.

Returns:
A parameter list with the requested parameters.

Reimplemented from Teko::PreconditionerFactory.

Definition at line 137 of file Teko_IterativePreconditionerFactory.cpp.

bool Teko::IterativePreconditionerFactory::updateRequestedParameters ( const Teuchos::ParameterList &  pl) [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).

Parameters:
[in]plParameter list containing the requested parameters.
Returns:
If the method succeeded (found all its required parameters) this method returns true, otherwise it returns false.

Reimplemented from Teko::PreconditionerFactory.

Definition at line 148 of file Teko_IterativePreconditionerFactory.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables