LinearOpBase objects.
More...
#include <Thyra_PreconditionerFactoryBase.hpp>
Inheritance diagram for Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >:

Pure virtual public functions that must be overridden in subclasses | |
| virtual bool | isCompatible (const LinearOpSourceBase< RangeScalar, DomainScalar > &fwdOpSrc) const =0 |
Check that a LinearOpBase object is compatible with *this factory object. | |
| virtual Teuchos::RCP< PreconditionerBase< DomainScalar, RangeScalar > > | createPrec () const =0 |
Create an (uninitialized) LinearOpBase object to be initalized as the preconditioner later in this->initializePrecOp(). | |
| virtual void | initializePrec (const Teuchos::RCP< const LinearOpSourceBase< RangeScalar, DomainScalar > > &fwdOpSrc, PreconditionerBase< DomainScalar, RangeScalar > *precOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const =0 |
Initialize a pre-created LinearOpBase preconditioner object given a "compatible" LinearOpBase object. | |
| virtual void | uninitializePrec (PreconditionerBase< DomainScalar, RangeScalar > *prec, Teuchos::RCP< const LinearOpSourceBase< RangeScalar, DomainScalar > > *fwdOpSrc=NULL, ESupportSolveUse *supportSolveUse=NULL) const =0 |
Uninitialize a LinearOpBase preconditioner object and return its remembered forward linear operator. | |
Virtual public functions with default implementations | |
| virtual bool | applySupportsConj (EConj conj) const |
Return if precOp->apply() supports the argument conj. | |
| virtual bool | applyTransposeSupportsConj (EConj conj) const |
Return if precOp->solveTranspose() supports the argument conj. | |
LinearOpBase objects.
ToDo: Finish documentation!
Definition at line 47 of file Thyra_PreconditionerFactoryBase.hpp.
| virtual bool Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::isCompatible | ( | const LinearOpSourceBase< RangeScalar, DomainScalar > & | fwdOpSrc | ) | const [pure virtual] |
Check that a LinearOpBase object is compatible with *this factory object.
| virtual Teuchos::RCP<PreconditionerBase<DomainScalar,RangeScalar> > Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::createPrec | ( | ) | const [pure virtual] |
Create an (uninitialized) LinearOpBase object to be initalized as the preconditioner later in this->initializePrecOp().
Note that on output return->domain().get()==NULL may be true which means that the operator is not fully initialized. In fact, the output operator object is not guaranteed to be fully initialized until after it is passed through this->initializePrecOp().
| virtual void Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::initializePrec | ( | const Teuchos::RCP< const LinearOpSourceBase< RangeScalar, DomainScalar > > & | fwdOpSrc, | |
| PreconditionerBase< DomainScalar, RangeScalar > * | precOp, | |||
| const ESupportSolveUse | supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED | |||
| ) | const [pure virtual] |
Initialize a pre-created LinearOpBase preconditioner object given a "compatible" LinearOpBase object.
| fwdOpSrc | [in] The forward linear operator that will be used to create the output LinearOpBase preconditioner object. Note that this object is remembered by the *Op object on output. | |
| prec | [in/out] The output PreconditionerBase preconditioner object. This object must have be created first by this->createPrec(). The object may have also already been passed through this function several times. Note that subclasses should always first strip off the transpose and scaling by calling unwrap() before attempting to dynamic cast the object. | |
| supportSolveUse | [in] Determines if apply() and/or applyTranspose() will be called on the initialized preconditioner operators. This allows *this factory object determine how to best initialize the *prec object. Default supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED |
fwdOpSrc.get()!=NULL this->isCompatible(*fwdOpSrc)==true prec!=NULL *prec must have been created by this->createPrec() prior to calling this function. supportSolveUse==SUPPORT_SOLVE_FORWARD_ONLY] this->applySupportsConj(conj)==true for any value of conj [supportSolveUse==SUPPORT_SOLVE_TRANSPOSE_ONLY] this->applyTransposeSupportsConj(conj)==true for any value of conj [supportSolveUse==SUPPORT_SOLVE_FORWARD_AND_TRANSPOSE] this->applySupportsConj(conj)==true && this->applyTransposeSupportsConj(conj)==true for any value of conj
Postconditions:
CatastrophicSolveFailure if the preconditioner could not be created successfully (e.g. due to a factorization failure or some other cause). precOp->range()->isCompatible(*fwdOpSrc->domain())==true precOp->domain()->isCompatible(*fwdOpSrc->range())==true fwdOpSrc.count() after output is greater than fwdOpSrc.count() just before this call and therefore the client can assume that the *fwdOpSrc object will be remembered by the *prec object. The client must be careful not to modify the *fwdOpSrc object or else the *precOp object may also be modified and become invalid.
| virtual void Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::uninitializePrec | ( | PreconditionerBase< DomainScalar, RangeScalar > * | prec, | |
| Teuchos::RCP< const LinearOpSourceBase< RangeScalar, DomainScalar > > * | fwdOpSrc = NULL, |
|||
| ESupportSolveUse * | supportSolveUse = NULL | |||
| ) | const [pure virtual] |
Uninitialize a LinearOpBase preconditioner object and return its remembered forward linear operator.
| prec | [in/out] On input, *precOp is an initialized or uninitialized object and on output is uninitialized. Note that "uninitialized" does not mean that precOp is completely stateless. It may still remember some aspect of the matrix fwdOpSrc that will allow for a more efficient initialization next time through this->initializePrecOp(). | |
| fwdOpSrc | [in/out] If fwdOpSrc!=NULL on input, then on output this is set to same forward operator passed into <tt>this->initializePrecOp(). | |
| ESupportSolveUse | [in/out] If precOpType!=NULL on input, then on output this is set to same option value passed to this->initializePrecOp(). |
*precOp must have been created by this->createPrecOp() prior to calling this function. precOp may or may not have been passed through a call to this->initializePrecOp(). Postconditions:
*precOp on input was initialized through a call to this->initializePrecOp() then return.get()!=NULL. *precOp was uninitialized on input and fwdOpSrc!=NULL then fwdOpSrc->get()==NULL on output. *precOp can be considered to be uninitialized and it is safe to modify the forward operator object <tt>*(*fwdOpSrc) returned in fwdOpSrc. The default is fwdOpSrc==NULL in which case the forward operator will not be returned in *fwdOpSrc.
This function should be called before the forward operator passed in to this->initializePrecOp() is modified. Otherwise, *this could be left in an inconsistent state. However, this is not required.
| bool Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::applySupportsConj | ( | EConj | conj | ) | const [virtual] |
Return if precOp->apply() supports the argument conj.
The default implementation returns true for real valued scalar types or when conj==NONCONJ_ELE for complex valued types.
Definition at line 198 of file Thyra_PreconditionerFactoryBase.hpp.
| bool Thyra::PreconditionerFactoryBase< RangeScalar, DomainScalar >::applyTransposeSupportsConj | ( | EConj | conj | ) | const [virtual] |
Return if precOp->solveTranspose() supports the argument conj.
The default implementation returns false.
Definition at line 204 of file Thyra_PreconditionerFactoryBase.hpp.
1.4.7