Teko  Version of the Day
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
Teko::DiagnosticPreconditionerFactory Class Reference

A class which builds a diagnostic operator to wrap the application of the inverse operator. Also times the construction of the inverse operator. More...

#include <Teko_DiagnosticPreconditionerFactory.hpp>

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

Public Member Functions

 DiagnosticPreconditionerFactory ()
 Default constructor, for use with the AutoClone class. More...
 
 DiagnosticPreconditionerFactory (const Teuchos::RCP< Teko::InverseFactory > &invFactory, const std::string &label, const Teuchos::RCP< std::ostream > &os=Teuchos::null, bool printResidual=false)
 
 DiagnosticPreconditionerFactory (const Teuchos::RCP< Teko::InverseFactory > &invFactory, const Teuchos::RCP< Teko::InverseFactory > &precFactory, const std::string &label, const Teuchos::RCP< std::ostream > &os=Teuchos::null, bool printResidual=false)
 
virtual ~DiagnosticPreconditionerFactory ()
 default destructor: prints out diagnostic string More...
 
virtual LinearOp buildPreconditionerOperator (LinearOp &lo, PreconditionerState &state) const
 Function that is called to build the preconditioner for the linear operator that is passed in. More...
 
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. More...
 
virtual Teuchos::RCP
< Teuchos::ParameterList > 
getRequestedParameters () const
 Request the additional parameters this preconditioner factory needs. More...
 
virtual bool updateRequestedParameters (const Teuchos::ParameterList &pl)
 Update this object with the fields from a parameter list. More...
 
- Public Member Functions inherited from Teko::PreconditionerFactory
virtual Teuchos::RCP
< PreconditionerState
buildPreconditionerState () const
 Function that permits the construction of an arbitrary PreconditionerState object. More...
 
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< RequestHandlergetRequestHandler () const
 Get the request handler with pointers to the appropriate callbacks. 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 > &paramList)
 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...
 

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

Detailed Description

A class which builds a diagnostic operator to wrap the application of the inverse operator. Also times the construction of the inverse operator.

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="Diagnostic Inverse"/>
<Parameter name="Inverse Factory" type="string" value="<Some Inverse Factory>"/>
<!-- Optional, use if Inverse Factory is an iterative solver, e.g. -->
<Parameter name="Preconditioner Factory" type="string" value="<Some Other Inverse Factory>"/>
<Parameter name="Descriptive Label" type="string" value="<Some Label>"/>
<Parameter name="Print Residual" type="bool" value="false"/>

Definition at line 37 of file Teko_DiagnosticPreconditionerFactory.hpp.

Constructor & Destructor Documentation

Teko::DiagnosticPreconditionerFactory::DiagnosticPreconditionerFactory ( )

Default constructor, for use with the AutoClone class.

Definition at line 21 of file Teko_DiagnosticPreconditionerFactory.cpp.

Teko::DiagnosticPreconditionerFactory::DiagnosticPreconditionerFactory ( const Teuchos::RCP< Teko::InverseFactory > &  invFactory,
const std::string &  label,
const Teuchos::RCP< std::ostream > &  os = Teuchos::null,
bool  printResidual = false 
)

Construct a preconditioner factory that prints diagnostics about a particualar inverse operator.

Parameters
[in]invFactoryFactory and operator to use diagnostics
[in]labelLabel to give to factory and operator

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

Definition at line 30 of file Teko_DiagnosticPreconditionerFactory.cpp.

Teko::DiagnosticPreconditionerFactory::DiagnosticPreconditionerFactory ( const Teuchos::RCP< Teko::InverseFactory > &  invFactory,
const Teuchos::RCP< Teko::InverseFactory > &  precFactory,
const std::string &  label,
const Teuchos::RCP< std::ostream > &  os = Teuchos::null,
bool  printResidual = false 
)

Construct a preconditioner factory that prints diagnostics about a particualar inverse operator.

Parameters
[in]invFactoryFactory and operator to use diagnostics
[in]precFactoryPreconditioner for invFactory, if applicable
[in]labelLabel to give to factory and operator

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

Definition at line 46 of file Teko_DiagnosticPreconditionerFactory.cpp.

Teko::DiagnosticPreconditionerFactory::~DiagnosticPreconditionerFactory ( )
virtual

default destructor: prints out diagnostic string

Definition at line 68 of file Teko_DiagnosticPreconditionerFactory.cpp.

Member Function Documentation

LinearOp Teko::DiagnosticPreconditionerFactory::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 120 of file Teko_DiagnosticPreconditionerFactory.cpp.

void Teko::DiagnosticPreconditionerFactory::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 197 of file Teko_DiagnosticPreconditionerFactory.cpp.

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

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.

Reimplemented from Teko::PreconditionerFactory.

Definition at line 229 of file Teko_DiagnosticPreconditionerFactory.cpp.

bool Teko::DiagnosticPreconditionerFactory::updateRequestedParameters ( const Teuchos::ParameterList &  pl)
virtual

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.

Reimplemented from Teko::PreconditionerFactory.

Definition at line 241 of file Teko_DiagnosticPreconditionerFactory.cpp.


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