A factory that creates a block Gauss Seidel preconditioner. The user must specify the solvers (or preconditioners) to use to approximately invert the diagonal operators. More...
#include <Teko_GaussSeidelPreconditionerFactory.hpp>
Public Member Functions | |
LinearOp | buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const |
Create the Gauss-Seidel preconditioner operator. More... | |
Constructors. | |
GaussSeidelPreconditionerFactory (TriSolveType solveType, const LinearOp &invD0, const LinearOp &invD1) | |
GaussSeidelPreconditionerFactory (TriSolveType solveType, const RCP< const BlockInvDiagonalStrategy > &strategy) | |
GaussSeidelPreconditionerFactory () | |
Public Member Functions inherited from Teko::BlockPreconditionerFactory | |
virtual RCP< PreconditionerState > | buildPreconditionerState () const |
Function that permits the construction of an arbitrary BlockPreconditionerState object. More... | |
RCP< BlockPreconditionerState > | buildBlockPreconditionerState () const |
Function that constructs a BlockPreconditionerState object. More... | |
virtual LinearOp | buildPreconditionerOperator (LinearOp &blo, PreconditionerState &state) const |
Function that is called to build the preconditioner for the linear operator that is passed in. More... | |
bool | isCompatible (const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const |
is this operator compatiable with the preconditioner factory? More... | |
Public Member Functions inherited from Teko::PreconditionerFactory | |
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... | |
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 > ¶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... | |
Protected Member Functions | |
virtual void | initializeFromParameterList (const Teuchos::ParameterList &pl) |
Initialize from a parameter list. More... | |
Protected Attributes | |
Teuchos::RCP< const BlockInvDiagonalStrategy > | invOpsStrategy_ |
some members 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... | |
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... | |
A factory that creates a block Gauss Seidel preconditioner. The user must specify the solvers (or preconditioners) to use to approximately invert the diagonal operators.
A factory that creates a block Gauss Seidel preconditioner. The user must specify the solvers (or preconditioners) to use to approximately invert the diagonal operators.
To invoke this preconditioner using the XML file a diagonal inverse needs to be specified. For example the following XML code creates a Gauss-Seidel preconditioner called "GS-Outer" using Amesos (a direct solver) to invert the diagonal blocks. This will invert the lower triangular portion of the matrix.
<ParameterList name="GS-Outer"> <Parameter name="Type" type="string" value="Block Gauss-Seidel"/> <Parameter name="Use Upper Triangle" type="bool" value="false"/> <Parameter name="Inverse Type" type="string" value="Amesos"/> </ParameterList>
Or if you want to specify a different inverse factory for a particular diagonal you can use
<ParameterList name="GS-Outer"> <Parameter name="Type" type="string" value="Block Gauss-Seidel"/> <Parameter name="Use Upper Triangle" type="bool" value="false"/> <Parameter name="Inverse Type" type="string" value="DefaultInverse"/> <Parameter name="Inverse Type 1" type="string" value="InverseOfFirstDigonalEntry"/> <Parameter name="Inverse Type 3" type="string" value="InverseOfThirdDigonalEntry"/> </ParameterList>
Notice that the "Inverse Type" parameter is now a default, and that you can specify each diagonal inverse on its own. The diagonal entries run from 1...N where N is the number of block rows. So the solver "InverseOfFirstDiagonalEntry" will be used for the first diagonal block, for the second "DefaultInverse" will be used, for the third "InverseOfThirdDigonalEntry" will be used, and for any further diagonal blocks "DefaultInverse" will be used.
Definition at line 102 of file Teko_GaussSeidelPreconditionerFactory.hpp.
Teko::GaussSeidelPreconditionerFactory::GaussSeidelPreconditionerFactory | ( | TriSolveType | solveType, |
const LinearOp & | invD0, | ||
const LinearOp & | invD1 | ||
) |
Construct a PreconditionerFactory assuming a specific block matrix. This case is a simple one.
Definition at line 57 of file Teko_GaussSeidelPreconditionerFactory.cpp.
Teko::GaussSeidelPreconditionerFactory::GaussSeidelPreconditionerFactory | ( | TriSolveType | solveType, |
const RCP< const BlockInvDiagonalStrategy > & | strategy | ||
) |
The most flexible JacobiPreconditionerFactory constructor. Pass in a generally defined BlockInvDiagonalStrategy to use the full generality of this class.
Definition at line 61 of file Teko_GaussSeidelPreconditionerFactory.cpp.
Teko::GaussSeidelPreconditionerFactory::GaussSeidelPreconditionerFactory | ( | ) |
Build an empty Gauss-Seidel preconditioner factory
Definition at line 65 of file Teko_GaussSeidelPreconditionerFactory.cpp.
|
virtual |
Create the Gauss-Seidel preconditioner operator.
This method breaks apart the BlockLinearOp and builds a block diagonal preconditioner. The inverse of the diagonals are specified by the BlockInvDiagonalStrategy object.
Implements Teko::BlockPreconditionerFactory.
Definition at line 69 of file Teko_GaussSeidelPreconditionerFactory.cpp.
|
protectedvirtual |
Initialize from a parameter list.
Reimplemented from Teko::PreconditionerFactory.
Definition at line 98 of file Teko_GaussSeidelPreconditionerFactory.cpp.
|
protected |
some members
Definition at line 137 of file Teko_GaussSeidelPreconditionerFactory.hpp.