Teko  Version of the Day
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | Related Functions | List of all members
Teko::InverseFactory Class Referenceabstract

Abstract class for building an inverse operator. More...

#include <Teko_InverseFactory.hpp>

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

Public Member Functions

virtual InverseLinearOp buildInverse (const LinearOp &linearOp) const =0
 Build an inverse operator. More...
 
virtual InverseLinearOp buildInverse (const LinearOp &linearOp, const LinearOp &) const
 Build a preconditioned inverse operator. More...
 
virtual void rebuildInverse (const LinearOp &source, InverseLinearOp &dest) const =0
 Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator. More...
 
virtual void rebuildInverse (const LinearOp &source, const LinearOp &, InverseLinearOp &dest) const
 Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator. More...
 
virtual Teuchos::RCP< const
Teuchos::ParameterList > 
getParameterList () const =0
 A function that permits inspection of the parameters used to create this object. More...
 
virtual std::string toString () const =0
 
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...
 
void setRequestHandler (const Teuchos::RCP< RequestHandler > &rh)
 Set the request handler with pointers to the appropriate callbacks. More...
 
Teuchos::RCP< RequestHandlergetRequestHandler () const
 Get the request handler with pointers to the appropriate callbacks. More...
 

Protected Attributes

Teuchos::RCP< RequestHandlercallbackHandler_
 For handling requests and send requests back to the user. More...
 

Related Functions

(Note that these are not member functions.)

InverseLinearOp buildInverse (const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp)
 
void rebuildInverse (const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp, InverseLinearOp &invA)
 
Functions for constructing and initializing solvers
InverseLinearOp buildInverse (const InverseFactory &factory, const LinearOp &A)
 
InverseLinearOp buildInverse (const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp)
 
void rebuildInverse (const InverseFactory &factory, const LinearOp &A, InverseLinearOp &invA)
 
void rebuildInverse (const InverseFactory &factory, const LinearOp &A, const LinearOp &precOp, InverseLinearOp &invA)
 
Teuchos::RCP< InverseFactoryinvFactoryFromParamList (const Teuchos::ParameterList &list, const std::string &type)
 Build an InverseFactory object from a ParameterList, as specified in Stratimikos. More...
 
Teuchos::RCP< const
Teuchos::ParameterList > 
invFactoryValidParameters ()
 Get a valid parameter list for the inverse factory class. More...
 

Detailed Description

Abstract class for building an inverse operator.

Abstract class for building an inverse operator. It pairs with a linear operator and gives you a new operator that behaves like its inverse.

Definition at line 71 of file Teko_InverseFactory.hpp.

Member Function Documentation

virtual InverseLinearOp Teko::InverseFactory::buildInverse ( const LinearOp &  linearOp) const
pure virtual

Build an inverse operator.

Build the inverse operator using this factory.

Parameters
[in]linearOpLinear operator needing to be inverted.
Returns
New linear operator that functions as the inverse of linearOp.
virtual InverseLinearOp Teko::InverseFactory::buildInverse ( const LinearOp &  linearOp,
const LinearOp &   
) const
inlinevirtual

Build a preconditioned inverse operator.

Build the inverse operator using this factory and a user specified preconditioning operator. The default behavior is to call buildInverse ignoring the preconditioner.

Parameters
[in]linearOpLinear operator needing to be inverted.
[in]precOpPreconditioning operator
Returns
New linear operator that functions as the inverse of linearOp.

Definition at line 98 of file Teko_InverseFactory.hpp.

virtual void Teko::InverseFactory::rebuildInverse ( const LinearOp &  source,
InverseLinearOp &  dest 
) const
pure virtual

Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator.

Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator.

Parameters
[in]sourceSource operator to be inverted.
[in,out]destPre constructed inverse operator to be rebuilt using the source object.
virtual void Teko::InverseFactory::rebuildInverse ( const LinearOp &  source,
const LinearOp &  ,
InverseLinearOp &  dest 
) const
inlinevirtual

Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator.

Pass in an already constructed inverse operator. Update the inverse operator based on the new source operator.

Parameters
[in]sourceSource operator to be inverted.
[in]precOpPreconditioning operator
[in,out]destPre constructed inverse operator to be rebuilt using the source object.

Definition at line 161 of file Teko_InverseFactory.hpp.

virtual Teuchos::RCP<const Teuchos::ParameterList> Teko::InverseFactory::getParameterList ( ) const
pure virtual

A function that permits inspection of the parameters used to create this object.

A function that permits inspection of the parameters used to create this object. Useful for determining defaults and settings used.

Returns
A list used to parameterize this object.
virtual std::string Teko::InverseFactory::toString ( ) const
pure virtual

Return a string that describes this factory

virtual Teuchos::RCP<Teuchos::ParameterList> Teko::InverseFactory::getRequestedParameters ( ) const
inlinevirtual

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.

Returns
A parameter list with the requested parameters.
Note
The default implementation returns Teuchos::null.

Definition at line 191 of file Teko_InverseFactory.hpp.

virtual bool Teko::InverseFactory::updateRequestedParameters ( const Teuchos::ParameterList &  )
inlinevirtual

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

Parameters
[in]plParameter list containing the requested parameters.
Returns
If the method succeeded (found all its required parameters) this method returns true, otherwise it returns false.
Note
The default implementation returns true (it does nothing!).

Definition at line 207 of file Teko_InverseFactory.hpp.

void Teko::InverseFactory::setRequestHandler ( const Teuchos::RCP< RequestHandler > &  rh)
inlinevirtual

Set the request handler with pointers to the appropriate callbacks.

Implements Teko::RequestHandlerContainer.

Definition at line 211 of file Teko_InverseFactory.hpp.

Teuchos::RCP<RequestHandler> Teko::InverseFactory::getRequestHandler ( ) const
inlinevirtual

Get the request handler with pointers to the appropriate callbacks.

Implements Teko::RequestHandlerContainer.

Definition at line 215 of file Teko_InverseFactory.hpp.

Friends And Related Function Documentation

InverseLinearOp buildInverse ( const InverseFactory factory,
const LinearOp &  A,
const LinearOp &  precOp 
)
related

Build an inverse operator using a factory and a linear operator

Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]precOpPreconditioning operator
[in]ALinear operator whose inverse is required
Returns
An (approximate) inverse operator is returned for the operator A.

Definition at line 151 of file Teko_InverseFactory.cpp.

void rebuildInverse ( const InverseFactory factory,
const LinearOp &  A,
const LinearOp &  precOp,
InverseLinearOp &  invA 
)
related

Using a prebuilt linear operator, use factory to build an inverse operator given a new forward operator.

Note
This function sometimes fails depending on the underlying type of the inverse factory. Use with caution.
Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]ALinear operator whose inverse is required
[in]precOpPreconditioning operator
[in]invAThe inverse operator that is to be rebuilt using the A operator.

Definition at line 212 of file Teko_InverseFactory.cpp.

InverseLinearOp buildInverse ( const InverseFactory factory,
const LinearOp &  A 
)
related

Build an inverse operator using a factory and a linear operator

Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]ALinear operator whose inverse is required
Returns
An (approximate) inverse operator is returned for the operator A.

Definition at line 118 of file Teko_InverseFactory.cpp.

InverseLinearOp buildInverse ( const InverseFactory factory,
const LinearOp &  A,
const LinearOp &  precOp 
)
related

Build an inverse operator using a factory and a linear operator

Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]precOpPreconditioning operator
[in]ALinear operator whose inverse is required
Returns
An (approximate) inverse operator is returned for the operator A.
void rebuildInverse ( const InverseFactory factory,
const LinearOp &  A,
InverseLinearOp &  invA 
)
related

Using a prebuilt linear operator, use factory to build an inverse operator given a new forward operator.

Note
This function sometimes fails depending on the underlying type of the inverse factory. Use with caution.
Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]ALinear operator whose inverse is required
[in]invAThe inverse operator that is to be rebuilt using the A operator.

Definition at line 177 of file Teko_InverseFactory.cpp.

void rebuildInverse ( const InverseFactory factory,
const LinearOp &  A,
const LinearOp &  precOp,
InverseLinearOp &  invA 
)
related

Using a prebuilt linear operator, use factory to build an inverse operator given a new forward operator.

Note
This function sometimes fails depending on the underlying type of the inverse factory. Use with caution.
Parameters
[in]factoryThe inverse factory used to construct the inverse operator
[in]ALinear operator whose inverse is required
[in]precOpPreconditioning operator
[in]invAThe inverse operator that is to be rebuilt using the A operator.
Teuchos::RCP< InverseFactory > invFactoryFromParamList ( const Teuchos::ParameterList &  list,
const std::string &  type 
)
related

Build an InverseFactory object from a ParameterList, as specified in Stratimikos.

Build an InverseFactory object from a ParameterList, as specified in Stratimikos. The specific inverse routine (either solver or preconditioner) to be chosen is specified by a string.

Note
It is preferred that the InverseLibrary is used to construct an InverseFactory instead.
Parameters
[in]listParameterList that describes the available solvers/preconditioners.
[in]typeString saying which solver/preconditioner to use.
Returns
An inverse factory using the specified inverse operation.

Definition at line 243 of file Teko_InverseFactory.cpp.

Teuchos::RCP< const Teuchos::ParameterList > invFactoryValidParameters ( )
related

Get a valid parameter list for the inverse factory class.

Get a valid parameter list for the inverse factory class. This will specify the set of parameters for each possible "inverse".

Note
It is preferred that the InverseLibrary is used to get paramter lists for InverseFactory construction.
Returns
A parameter list is returned that is suitable to be passed to invFactoryFromParamList.

Definition at line 280 of file Teko_InverseFactory.cpp.

Member Data Documentation

Teuchos::RCP<RequestHandler> Teko::InverseFactory::callbackHandler_
protected

For handling requests and send requests back to the user.

Definition at line 220 of file Teko_InverseFactory.hpp.


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