Teko Version of the Day
|
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>
Constructors. | |
Teuchos::RCP< const BlockInvDiagonalStrategy > | invOpsStrategy_ |
some members | |
TriSolveType | solveType_ |
GaussSeidelPreconditionerFactory (TriSolveType solveType, const LinearOp &invD0, const LinearOp &invD1) | |
GaussSeidelPreconditionerFactory (TriSolveType solveType, const RCP< const BlockInvDiagonalStrategy > &strategy) | |
GaussSeidelPreconditionerFactory () | |
LinearOp | buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const |
Create the Gauss-Seidel preconditioner operator. | |
virtual void | initializeFromParameterList (const Teuchos::ParameterList &pl) |
Initialize from a parameter list. | |
virtual LinearOp | buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const=0 |
Function that is called to build the preconditioner for the linear operator that is passed in. | |
virtual LinearOp | buildPreconditionerOperator (LinearOp &blo, PreconditionerState &state) const |
Function that is called to build the preconditioner for the linear operator that is passed in. | |
Additional Inherited Members | |
![]() | |
virtual LinearOp | buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const =0 |
Function that is called to build the preconditioner for the linear operator that is passed in. | |
virtual RCP< PreconditionerState > | buildPreconditionerState () const |
Function that permits the construction of an arbitrary BlockPreconditionerState object. | |
RCP< BlockPreconditionerState > | buildBlockPreconditionerState () const |
Function that constructs a BlockPreconditionerState object. | |
virtual LinearOp | buildPreconditionerOperator (LinearOp &blo, PreconditionerState &state) const |
Function that is called to build the preconditioner for the linear operator that is passed in. | |
bool | isCompatible (const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const |
is this operator compatiable with the preconditioner factory? | |
![]() | |
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. | |
virtual Teuchos::RCP< PreconditionerState > | buildPreconditionerState () const |
Function that permits the construction of an arbitrary PreconditionerState object. | |
virtual Teuchos::RCP< Teuchos::ParameterList > | getRequestedParameters () const |
Request the additional parameters this preconditioner factory needs. | |
virtual bool | updateRequestedParameters (const Teuchos::ParameterList &) |
Update this object with the fields from a parameter list. | |
void | setInverseLibrary (const Teuchos::RCP< const InverseLibrary > &il) |
Set the inverse library used by this preconditioner factory. | |
Teuchos::RCP< const InverseLibrary > | getInverseLibrary () const |
Get the inverse library used by this preconditioner factory. | |
bool | isCompatible (const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const |
is this operator compatiable with the preconditioner factory? | |
Teuchos::RCP< Thyra::PreconditionerBase< double > > | createPrec () const |
create an instance of the preconditioner | |
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 | |
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 | |
void | uninitializePrec (Thyra::PreconditionerBase< double > *prec, Teuchos::RCP< const Thyra::LinearOpSourceBase< double > > *fwdOpSrc, Thyra::ESupportSolveUse *supportSolveUse) const |
wipe clean a already initialized preconditioner object | |
void | setParameterList (const Teuchos::RCP< Teuchos::ParameterList > ¶mList) |
Set parameters from a parameter list and return with default values. | |
Teuchos::RCP< Teuchos::ParameterList > | getNonconstParameterList () |
Get the parameter list that was set using setParameterList(). | |
Teuchos::RCP< Teuchos::ParameterList > | unsetParameterList () |
Unset the parameter list that was set using setParameterList(). | |
void | setRequestHandler (const Teuchos::RCP< RequestHandler > &rh) |
Set the request handler with pointers to the appropriate callbacks. | |
Teuchos::RCP< RequestHandler > | getRequestHandler () const |
Get the request handler with pointers to the appropriate callbacks. | |
virtual void | setRequestHandler (const Teuchos::RCP< RequestHandler > &rh)=0 |
Set the request handler with pointers to the appropriate callbacks. | |
virtual Teuchos::RCP< RequestHandler > | getRequestHandler () const =0 |
Get the request handler with pointers to the appropriate callbacks. | |
![]() | |
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). | |
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. | |
static void | getPreconditionerFactoryNames (std::vector< std::string > &names) |
Get the names of the block preconditioner factories. | |
![]() | |
Teuchos::RCP< Teuchos::ParameterList > | paramList_ |
for ParameterListAcceptor | |
Teuchos::RCP< RequestHandler > | callbackHandler_ |
For handling requests and send requests back to the user. | |
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
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.
|
protectedvirtual |
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 BlockedLinearOp.
[in] | blo | Source linear operator that is to be preconditioned. |
[in] | state | An object associated with this operator to store the preconditioner state. |
Implements Teko::BlockPreconditionerFactory.
|
protectedvirtual |
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. |
Reimplemented from Teko::BlockPreconditionerFactory.
Definition at line 141 of file Teko_BlockPreconditionerFactory.cpp.
|
protected |
some members
Definition at line 137 of file Teko_GaussSeidelPreconditionerFactory.hpp.