Construct a preconditioner using a LDU dcomposition of a block 2x2 matrix. More...
#include <Teko_LU2x2PreconditionerFactory.hpp>

Public Member Functions | |
| LinearOp | buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const |
| Create the LU 2x2 preconditioner operator. | |
| 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. | |
| virtual bool | useFullLDU () const |
| Determine the type of inverse operator to build. | |
| virtual void | setFullLDU (bool value) |
| Set the type of inverse operation to use. | |
Constructors. | |
| LU2x2PreconditionerFactory (LinearOp &invA00, LinearOp &invS) | |
| Build a simple static LU2x2 preconditioner. | |
| LU2x2PreconditionerFactory (LinearOp &hatInvA00, LinearOp &tildeInvA00, LinearOp &invS) | |
| Build a simple static LU2x2 preconditioner. | |
| LU2x2PreconditionerFactory (const Teuchos::RCP< LU2x2Strategy > &strategy) | |
Constructor that permits the most generality in building and . | |
| LU2x2PreconditionerFactory () | |
| Default constructor for use with AutoClone. | |
Static Public Member Functions | |
| static RCP< LU2x2Strategy > | buildStrategy (const std::string &name, const Teuchos::ParameterList &settings, const RCP< const InverseLibrary > &invLib, const RCP< RequestHandler > &rh) |
| Builder function for creating strategies. | |
| static void | addStrategy (const std::string &name, const RCP< Cloneable > &clone) |
| Add a strategy to the builder. This is done using the clone pattern. | |
Protected Attributes | |
| Teuchos::RCP< LU2x2Strategy > | invOpsStrategy_ |
| some members | |
| bool | useFullLDU_ |
Construct a preconditioner using a LDU dcomposition of a block 2x2 matrix.
This produces a preconditioner using the block-LDU decomposition of the matrix. The general assumption made is that the matrix is 2x2 and the block factorization can be constructed (i.e. assumptions about the invertability of some blocks). The pattern used, and the one you should follow if you want to use this software is
![$ A = \left[ \begin{array}{cc} A_{00} & A_{01} \\ A_{10} & A_{11} \end{array} \right] = \left[ \begin{array}{cc} I & 0 \\ A_{10} A_{00}^{-1} & I \end{array} \right] \left[ \begin{array}{cc} A_{00} & 0 \\ 0 & -S \end{array} \right] \left[ \begin{array}{cc} I & A_{00}^{-1} A_{01} \\ 0 & I \end{array} \right] $](form_105.png)
where the Schur complement is
.
To use an LDU approximation 2 evaluations of
and a single evalution of
are needed. For increased flexibility both evaluations of
can be specified independently. For righthand side vector
and solution vector
the two inverses (
-hat and
-tilde) are needed to evaluate
,

where
is an intermediate step.
In order to facilate using this class in a nonlinear solve (or for a time-dependent problem) the additional abstraction of a ``Strategy'' has been added. This strategy, abstractly represented as the LU2x2Strategy, provides the
and
operators. Typical usage for this class is to build a LU2x2Strategy and pass it into the primary constructor. Additional constructors are provided both for convenience and to ease adoption. Underneath the hood all these constructors do is invoke the corresponding strategy object.
For example, assume that you have the particularly nice case that your approximations of
and
are independent of the source operator. Then, one way to instantiate a LU2x2PreconditionerFactory is
RCP<LinearOpBase<double> > invA00 = buildInvA00(...);
RCP<LinearOpBase<double> > invS = buildInvS(...);
RCP<LU2x2PreconditionerFactory> precFact = rcp(new LU2x2PreconditionerFactory(invA00,invS));
Now using the strategy constructor, an entirely equivalent factory object can be constructed by
RCP<LinearOpBase<double> > invA00 = buildInvA00(...);
RCP<LinearOpBase<double> > invS = buildInvS(...);
RCP<LU2x2Strateghy> precStrat = rcp(new StaticLU2x2Strategy(invA00,invS));
RCP<LU2x2PreconditionerFactory> precFact = rcp(new LU2x2PreconditionerFactory(precStrat));
Notice that the StaticLU2x2Strategy takes the same objects as the original constructor, it acts as an intermediary to tell the LU2x2PreconditionerFactory what those operators are.
Definition at line 141 of file Teko_LU2x2PreconditionerFactory.hpp.
| Teko::LU2x2PreconditionerFactory::LU2x2PreconditionerFactory | ( | LinearOp & | invA00, |
| LinearOp & | invS | ||
| ) |
Build a simple static LU2x2 preconditioner.
Definition at line 63 of file Teko_LU2x2PreconditionerFactory.cpp.
| Teko::LU2x2PreconditionerFactory::LU2x2PreconditionerFactory | ( | LinearOp & | hatInvA00, |
| LinearOp & | tildeInvA00, | ||
| LinearOp & | invS | ||
| ) |
Build a simple static LU2x2 preconditioner.
Definition at line 68 of file Teko_LU2x2PreconditionerFactory.cpp.
| Teko::LU2x2PreconditionerFactory::LU2x2PreconditionerFactory | ( | const Teuchos::RCP< LU2x2Strategy > & | strategy | ) |
Constructor that permits the most generality in building
and
.
Constructor that permits the most generality in building
and
.
| [in] | strategy | Strategy object that takes a 2x2 block matrix and and constructs the and objects. |
Default constructor for use with AutoClone.
Default constructor for use with AutoClone
Definition at line 76 of file Teko_LU2x2PreconditionerFactory.cpp.
| LinearOp Teko::LU2x2PreconditionerFactory::buildPreconditionerOperator | ( | BlockedLinearOp & | blo, |
| BlockPreconditionerState & | state | ||
| ) | const [virtual] |
Create the LU 2x2 preconditioner operator.
This method breaks apart the BlockLinearOp and builds a block LU preconditioner. This will require two applications of the inverse of the (0,0) block and one application of the inverse Schur complement.
Implements Teko::BlockPreconditionerFactory.
Definition at line 84 of file Teko_LU2x2PreconditionerFactory.cpp.
| void Teko::LU2x2PreconditionerFactory::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.
| [in] | settings | Parmaeter list to use as the internal settings |
Reimplemented from Teko::PreconditionerFactory.
Definition at line 114 of file Teko_LU2x2PreconditionerFactory.cpp.
| Teuchos::RCP< Teuchos::ParameterList > Teko::LU2x2PreconditionerFactory::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.
Reimplemented from Teko::PreconditionerFactory.
Definition at line 144 of file Teko_LU2x2PreconditionerFactory.cpp.
| bool Teko::LU2x2PreconditionerFactory::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).
| [in] | pl | Parameter list containing the requested parameters. |
Reimplemented from Teko::PreconditionerFactory.
Definition at line 163 of file Teko_LU2x2PreconditionerFactory.cpp.
| virtual bool Teko::LU2x2PreconditionerFactory::useFullLDU | ( | ) | const [inline, virtual] |
Determine the type of inverse operator to build.
Determine the type of inverse operator to build. If true use the full LDU decomposition. If false only the upper triangular solve should be used. Motivation for doing this can be found in Murphy, Golub and Wathen, SISC 2000.
Definition at line 236 of file Teko_LU2x2PreconditionerFactory.hpp.
| virtual void Teko::LU2x2PreconditionerFactory::setFullLDU | ( | bool | value | ) | [inline, virtual] |
Set the type of inverse operation to use.
Set the type of inverse operator to use. If true use the full LDU decomposition. If false only the upper triangular solve should be used. Motivation for doing this can be found in Murphy, Golub and Wathen, SISC 2000.
| [in] | value | Boolean indicating type of inverse operator to build. |
Definition at line 248 of file Teko_LU2x2PreconditionerFactory.hpp.
| RCP< LU2x2Strategy > Teko::LU2x2PreconditionerFactory::buildStrategy | ( | const std::string & | name, |
| const Teuchos::ParameterList & | settings, | ||
| const RCP< const InverseLibrary > & | invLib, | ||
| const RCP< RequestHandler > & | rh | ||
| ) | [static] |
Builder function for creating strategies.
Builder function for creating strategies.
| [in] | name | String name of strategy to build |
| [in] | settings | Parameter list describing the parameters for the strategy to build |
| [in] | invLib | Inverse library for the strategy to use. |
Definition at line 188 of file Teko_LU2x2PreconditionerFactory.cpp.
| void Teko::LU2x2PreconditionerFactory::addStrategy | ( | const std::string & | name, |
| const RCP< Cloneable > & | clone | ||
| ) | [static] |
Add a strategy to the builder. This is done using the clone pattern.
Add a strategy 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 237 of file Teko_LU2x2PreconditionerFactory.cpp.
Teuchos::RCP<LU2x2Strategy> Teko::LU2x2PreconditionerFactory::invOpsStrategy_ [protected] |
some members
Definition at line 253 of file Teko_LU2x2PreconditionerFactory.hpp.
bool Teko::LU2x2PreconditionerFactory::useFullLDU_ [protected] |
If true, use full LDU decomposition, otherwise use the Golub & Wathen style upper block. This is true by default.
Definition at line 259 of file Teko_LU2x2PreconditionerFactory.hpp.
1.7.6.1