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

Using an absolute row sum approximation of the matrix this factory creates an inverse using the explicity scaled matrix. The inverse of the scaling operation is automatically applied. More...

#include <Teko_DiagonallyScaledPreconditionerFactory.hpp>

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

Public Member Functions

 DiagonallyScaledPreconditionerFactory ()
 Default constructor, for use with the AutoClone class.
 
 DiagonallyScaledPreconditionerFactory (const Teuchos::RCP< Teko::InverseFactory > &invFactory, ScalingType columnScaling=COLUMN_SCALING, DiagonalType diagonalType=AbsRowSum)
 
virtual ~DiagonallyScaledPreconditionerFactory ()
 default destructor: prints out diagnostic string
 
virtual LinearOp buildPreconditionerOperator (LinearOp &lo, PreconditionerState &state) const
 Function that is called to build the preconditioner for the linear operator that is passed in.
 
- Public Member Functions inherited from Teko::PreconditionerFactory
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< PreconditionerStatebuildPreconditionerState () 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 > &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< RequestHandlergetRequestHandler () 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< RequestHandlergetRequestHandler () const =0
 Get the request handler with pointers to the appropriate callbacks.
 

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.
 

Additional Inherited Members

- Static Public Member Functions inherited from Teko::PreconditionerFactory
static Teuchos::RCP< PreconditionerFactorybuildPreconditionerFactory (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< RequestHandlercallbackHandler_
 For handling requests and send requests back to the user.
 

Detailed Description

Using an absolute row sum approximation of the matrix this factory creates an inverse using the explicity scaled matrix. The inverse of the scaling operation is automatically applied.

The current behavior for this factory on an operator $A$ is to compute the absolute row sum of $A$ and define the scaling matrix $D$. Then explicitly right muliply by $D^{-1}$ ( $A$ is not modified, and invert the linear system $ A D^{-1}$ using the user specified inverse factory. Then the scaling is removed by second (implicit) multiplication by $D^{-1}$. Thus the operator returned by the factory is $D^{-1} \, \mbox{userInv} (A D^{-1})^{-1})$.

For construction purposes this class can be initialized using a parameter list. Most often used in conjuncition with an InverseLibrary object. In particular the relevant parameters are

<Parameter name="Type" type="string" value="Diagonal Scaling"/>
<Parameter name="Inverse Factory" type="string" value="<Some Inverse Factory>"/>
<Parameter name="Scaling Type" type="string" value="<Row,Column>"/> <!-- Row is default -->
<Parameter name="Diagonal Type" type="string" value="<AbsRowSum,Diagonal,Lumped>"/> <!-- AbsRowSum is default -->
@ AbsRowSum
Specifies that the diagonal entry is .

Definition at line 83 of file Teko_DiagonallyScaledPreconditionerFactory.hpp.

Constructor & Destructor Documentation

◆ DiagonallyScaledPreconditionerFactory() [1/2]

Teko::DiagonallyScaledPreconditionerFactory::DiagonallyScaledPreconditionerFactory ( )

Default constructor, for use with the AutoClone class.

Definition at line 55 of file Teko_DiagonallyScaledPreconditionerFactory.cpp.

◆ DiagonallyScaledPreconditionerFactory() [2/2]

Teko::DiagonallyScaledPreconditionerFactory::DiagonallyScaledPreconditionerFactory ( const Teuchos::RCP< Teko::InverseFactory > &  invFactory,
ScalingType  scalingType = COLUMN_SCALING,
DiagonalType  diagonalType = AbsRowSum 
)

Construct a preconditioner factory that scales the operator.

Parameters
[in]invFactoryFactory to perform the inverse

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

Definition at line 62 of file Teko_DiagonallyScaledPreconditionerFactory.cpp.

◆ ~DiagonallyScaledPreconditionerFactory()

Teko::DiagonallyScaledPreconditionerFactory::~DiagonallyScaledPreconditionerFactory ( )
virtual

default destructor: prints out diagnostic string

Definition at line 68 of file Teko_DiagonallyScaledPreconditionerFactory.cpp.

Member Function Documentation

◆ buildPreconditionerOperator()

LinearOp Teko::DiagonallyScaledPreconditionerFactory::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 75 of file Teko_DiagonallyScaledPreconditionerFactory.cpp.

◆ initializeFromParameterList()

void Teko::DiagonallyScaledPreconditionerFactory::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 112 of file Teko_DiagonallyScaledPreconditionerFactory.cpp.


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