Thyra::DefaultInverseLinearOp< Scalar > Class Template Reference

Concrete LinearOpBase subclass that creates an implicit LinearOpBase object using the inverse action of a LinearOpWithSolveBase object. More...

#include <Thyra_DefaultInverseLinearOpDecl.hpp>

List of all members.

Constructors/initializers/accessors

 DefaultInverseLinearOp ()
 Constructs to uninitialized (see postconditions for uninitialize()).
 DefaultInverseLinearOp (const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &lows, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
 DefaultInverseLinearOp (const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &lows, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
void initialize (const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &lows, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
 Initialize given a non-const LinearOpWithSolveBase object and an optional .
void initialize (const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &lows, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
 Initialize given a non-const LinearOpWithSolveBase object and an optional .
void uninitialize ()
 Set to uninitialized.

Overridden from InverseLinearOpBase

bool isLowsConst () const
 
Teuchos::RCP< LinearOpWithSolveBase<
Scalar > > 
getNonconstLows ()
 
Teuchos::RCP< const LinearOpWithSolveBase<
Scalar > > 
getLows () const
 

Overridden from LinearOpBase

Teuchos::RCP< const VectorSpaceBase<
Scalar > > 
range () const
 Returns this->getLows()->domain() if <t>this->getLows().get()!=NULL and returns Teuchos::null otherwise.
Teuchos::RCP< const VectorSpaceBase<
Scalar > > 
domain () const
 Returns this->getLows()->range() if <t>this->getLows().get()!=NULL and returns Teuchos::null otherwise.
Teuchos::RCP< const LinearOpBase<
Scalar > > 
clone () const
 

Overridden from Teuchos::Describable

std::string description () const
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 

Overridden from SingleScalarLinearOpBase

bool opSupported (EOpTransp M_trans) const
 Returns true only if all constituent operators support M_trans.
void apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 

Related Functions

(Note that these are not member functions.)

Teuchos::RCP< LinearOpBase<
Scalar > > 
nonconstInverse (const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &A, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
 Form a non-const implicit inverse operator <tt>M = inv(A).
Teuchos::RCP< LinearOpBase<
Scalar > > 
inverse (const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &A, const SolveCriteria< Scalar > *fwdSolveCriteria=NULL, const EThrowOnSolveFailure throwOnFwdSolveFailure=THROW_ON_SOLVE_FAILURE, const SolveCriteria< Scalar > *adjSolveCriteria=NULL, const EThrowOnSolveFailure throwOnAdjSolveFailure=THROW_ON_SOLVE_FAILURE)
 Form a const implicit inverse operator <tt>M = inv(A).


Detailed Description

template<class Scalar>
class Thyra::DefaultInverseLinearOp< Scalar >

Concrete LinearOpBase subclass that creates an implicit LinearOpBase object using the inverse action of a LinearOpWithSolveBase object.

This class represents an implicitly inverse linear operator:

 M = inv(A)
 
 

where A is any LinearOpWithSolveBase object. Specifically, the solve(...) function A is used to implement this->apply() and the solveTranspose(...) function A is used to implement this->applyTranspose().

SolveCriteria objects can be associated with A to define the solve criterion for calling the A.solve(...,fwdSolveCriteria) and A.solveTranspose(...,adjSolveCriteria).

Definition at line 71 of file Thyra_DefaultInverseLinearOpDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::DefaultInverseLinearOp< Scalar >::DefaultInverseLinearOp (  ) 

Constructs to uninitialized (see postconditions for uninitialize()).

Definition at line 46 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Thyra::DefaultInverseLinearOp< Scalar >::DefaultInverseLinearOp ( const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &  lows,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
)

Calls initialize().

Definition at line 51 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Thyra::DefaultInverseLinearOp< Scalar >::DefaultInverseLinearOp ( const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &  lows,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
)

Calls initialize().

Rather than calling this constructor directly, consider using the non-member helper functions described here.

Definition at line 67 of file Thyra_DefaultInverseLinearOp.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::DefaultInverseLinearOp< Scalar >::initialize ( const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &  lows,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
)

Initialize given a non-const LinearOpWithSolveBase object and an optional .

Parameters:
lows [in] The LinearOpWithSolveBase object that will solve(...) and/or solveTranspose(...) will be called on. Note that *this may give up non-const views of *lows so that *lows may be changed through clients of this object.
fwdSolveCriteria [in] The criteria used to call lows->solve(...). If fwdSolveCriteria==NULL then the default solve criteria built into *lows will be used. If fwdSolveCriteria!=NULL then *fwdSolveCriteria will be copied internally. Warning! If shallow copy is used by any parameters in fwdSolveCriteria->extraParameter these these parameters will be "remembered" by *this.
adjSolveCriteria  [in] The criteria used to call lows->solveTranspose(...). If adjSolveCriteria==NULL then the default solve criteria built into *lows will be used. If adjSolveCriteria!=NULL then *adjSolveCriteria will be copied internally. Warning! If shallow copy is used by any parameters in adjSolveCriteria->extraParameter these these parameters will be "remembered" by *this.
Preconditions:

Postconditions:

Definition at line 83 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultInverseLinearOp< Scalar >::initialize ( const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &  lows,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
)

Initialize given a non-const LinearOpWithSolveBase object and an optional .

Parameters:
lows [in] The LinearOpWithSolveBase object that will solve(...) and/or solveTranspose(...) will be called on. Note that *this may give up non-const views of *lows so that *lows may be changed through clients of this object.
fwdSolveCriteria [in] The criteria used to call lows->solve(...). If fwdSolveCriteria==NULL then the default solve criteria built into *lows will be used. If fwdSolveCriteria!=NULL then *fwdSolveCriteria will be copied internally. Warning! If shallow copy is used by any parameters in fwdSolveCriteria->extraParameter these these parameters will be "remembered" by *this.
adjSolveCriteria  [in] The criteria used to call lows->solveTranspose(...). If adjSolveCriteria==NULL then the default solve criteria built into *lows will be used. If adjSolveCriteria!=NULL then *adjSolveCriteria will be copied internally. Warning! If shallow copy is used by any parameters in adjSolveCriteria->extraParameter these these parameters will be "remembered" by *this.
Preconditions:

Postconditions:

Definition at line 99 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultInverseLinearOp< Scalar >::uninitialize (  ) 

Set to uninitialized.

Postconditions:

Definition at line 115 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
bool Thyra::DefaultInverseLinearOp< Scalar >::isLowsConst (  )  const

Definition at line 127 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< LinearOpWithSolveBase< Scalar > > Thyra::DefaultInverseLinearOp< Scalar >::getNonconstLows (  ) 

Definition at line 135 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > Thyra::DefaultInverseLinearOp< Scalar >::getLows (  )  const

Definition at line 143 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultInverseLinearOp< Scalar >::range (  )  const

Returns this->getLows()->domain() if <t>this->getLows().get()!=NULL and returns Teuchos::null otherwise.

Definition at line 154 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultInverseLinearOp< Scalar >::domain (  )  const

Returns this->getLows()->range() if <t>this->getLows().get()!=NULL and returns Teuchos::null otherwise.

Definition at line 163 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultInverseLinearOp< Scalar >::clone (  )  const

Definition at line 172 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
std::string Thyra::DefaultInverseLinearOp< Scalar >::description (  )  const

Definition at line 182 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultInverseLinearOp< Scalar >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel 
) const

Definition at line 197 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
bool Thyra::DefaultInverseLinearOp< Scalar >::opSupported ( EOpTransp  M_trans  )  const [protected]

Returns true only if all constituent operators support M_trans.

Definition at line 254 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultInverseLinearOp< Scalar >::apply ( const EOpTransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta 
) const [protected]

Definition at line 262 of file Thyra_DefaultInverseLinearOp.hpp.


Friends And Related Function Documentation

template<class Scalar>
Teuchos::RCP< LinearOpBase< Scalar > > nonconstInverse ( const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &  A,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
) [related]

Form a non-const implicit inverse operator <tt>M = inv(A).

Definition at line 365 of file Thyra_DefaultInverseLinearOp.hpp.

template<class Scalar>
Teuchos::RCP< LinearOpBase< Scalar > > inverse ( const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &  A,
const SolveCriteria< Scalar > *  fwdSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnFwdSolveFailure = THROW_ON_SOLVE_FAILURE,
const SolveCriteria< Scalar > *  adjSolveCriteria = NULL,
const EThrowOnSolveFailure  throwOnAdjSolveFailure = THROW_ON_SOLVE_FAILURE 
) [related]

Form a const implicit inverse operator <tt>M = inv(A).

Definition at line 383 of file Thyra_DefaultInverseLinearOp.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:42:47 2010 for Thyra Operator Solve Support by  doxygen 1.4.7