Teko Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Teko::HierarchicalGaussSeidelPreconditionerFactory Class Reference

A block Gauss-Seidel preconditioner that groups the sub-blocks hierarchically before sweeping. More...

#include <Teko_HierarchicalGaussSeidelPreconditionerFactory.hpp>

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

Public Member Functions

LinearOp buildPreconditionerOperator (BlockedLinearOp &blo, BlockPreconditionerState &state) const override
 Function that is called to build the preconditioner for the linear operator that is passed in.
 
- Public Member Functions inherited from Teko::BlockPreconditionerFactory
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.
 
bool isCompatible (const Thyra::LinearOpSourceBase< double > &fwdOpSrc) const
 is this operator compatiable with the preconditioner factory?
 
- Public Member Functions inherited from Teko::PreconditionerFactory
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 > &paramList)
 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.
 

Protected Member Functions

void initializeFromParameterList (const Teuchos::ParameterList &pl) override
 This function builds the internals of the preconditioner factory 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

- 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).
 
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.
 
- Protected Attributes inherited from Teko::PreconditionerFactory
Teuchos::RCP< Teuchos::ParameterList > paramList_
 for ParameterListAcceptor
 
Teuchos::RCP< RequestHandler > callbackHandler_
 For handling requests and send requests back to the user.
 

Detailed Description

A block Gauss-Seidel preconditioner that groups the sub-blocks hierarchically before sweeping.

Unlike the flat BlockGaussSeidelPreconditionerFactory, this factory lets you collect the operator's row blocks into a smaller number of coarse "hierarchical" blocks and then performs a block Gauss-Seidel sweep over those groups. Each hierarchical block gets its own inverse factory (and optional preconditioner factory); the diagonal solves reuse their inverses across rebuilds via the BlockPreconditionerState. The sweep direction (upper- or lower-triangular) is selectable. The actual application is carried out by the NestedBlockGS implicit operator.

This is the factory behind the "Hierarchical Block Gauss-Seidel" type; see the Block Preconditioner Reference for its parameters ("Included Subblocks" and the per-block "Inverse Type").

Definition at line 73 of file Teko_HierarchicalGaussSeidelPreconditionerFactory.hpp.

Member Function Documentation

◆ buildPreconditionerOperator() [1/3]

LinearOp Teko::HierarchicalGaussSeidelPreconditionerFactory::buildPreconditionerOperator ( BlockedLinearOp &  blo,
BlockPreconditionerState &  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 BlockedLinearOp.

Parameters
[in]bloSource 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::BlockPreconditionerFactory.

Definition at line 247 of file Teko_HierarchicalGaussSeidelPreconditionerFactory.cpp.

◆ initializeFromParameterList()

void Teko::HierarchicalGaussSeidelPreconditionerFactory::initializeFromParameterList ( const Teuchos::ParameterList &  )
overrideprotectedvirtual

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 274 of file Teko_HierarchicalGaussSeidelPreconditionerFactory.cpp.

◆ buildPreconditionerOperator() [2/3]

virtual LinearOp Teko::BlockPreconditionerFactory::buildPreconditionerOperator ( BlockedLinearOp &  blo,
BlockPreconditionerState &  state 
) const
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.

Parameters
[in]bloSource 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::BlockPreconditionerFactory.

◆ buildPreconditionerOperator() [3/3]

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

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").

Reimplemented from Teko::BlockPreconditionerFactory.

Definition at line 107 of file Teko_BlockPreconditionerFactory.cpp.


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