Thyra::DefaultDiagonalLinearOpWithSolve< Scalar > Class Template Reference

Concrete LinearOpWithSolveBase subclass for diagonal linear operators. More...

#include <Thyra_DefaultDiagonalLinearOpWithSolveDecl.hpp>

Inheritance diagram for Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >:

Inheritance graph
[legend]
List of all members.

Constructors/initializers/accessors

 DefaultDiagonalLinearOpWithSolve ()
 Constructs to uninitialized.
 DefaultDiagonalLinearOpWithSolve (const Teuchos::RCP< const VectorBase< Scalar > > &diag)
 Calls initialize().

Overridden from SingleScalarLinearOpWithSolveBase

bool solveSupportsTrans (EOpTransp M_trans) const
 
bool solveSupportsSolveMeasureType (EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const
 

Overridden from SingleRhsLinearOpWithSolveBase

SolveStatus< Scalar > solve (const EOpTransp M_trans, const VectorBase< Scalar > &b, VectorBase< Scalar > *x, const SolveCriteria< Scalar > *solveCriteria) const
 

Detailed Description

template<class Scalar>
class Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >

Concrete LinearOpWithSolveBase subclass for diagonal linear operators.

This class represents a diagonal linear operator M of the form:

 M = diag(diag)
 

where diag is a VectorBase object.

The defined operator implements <tt>this->apply() as follows:

 y = alpha*op(M)*x + beta*y
 
 =>

 y(i) = alpha*diag(i)*x(i) + beta*y(i), for i = 0 ... n-1
 

where n = this->domain()->dim().

The defined operator implements <tt>this->solve() as follows:

 x = inv(op(M))*b
 
 =>

 x(i) = b(i)/diag(i), for i = 0 ... n-1
 

where n = this->domain()->dim().

That is all there is to this subclass.

Definition at line 78 of file Thyra_DefaultDiagonalLinearOpWithSolveDecl.hpp.


Constructor & Destructor Documentation

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

Constructs to uninitialized.

Postconditions:

Definition at line 43 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

template<class Scalar>
Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::DefaultDiagonalLinearOpWithSolve ( const Teuchos::RCP< const VectorBase< Scalar > > &  diag  ) 

Calls initialize().

Definition at line 47 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.


Member Function Documentation

template<class Scalar>
bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsTrans ( EOpTransp  M_trans  )  const [protected, virtual]

Implements Thyra::SingleScalarLinearOpWithSolveBase< Scalar >.

Definition at line 59 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

template<class Scalar>
bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsSolveMeasureType ( EOpTransp  M_trans,
const SolveMeasureType solveMeasureType 
) const [protected, virtual]

Implements Thyra::SingleScalarLinearOpWithSolveBase< Scalar >.

Definition at line 65 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

template<class Scalar>
SolveStatus< Scalar > Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solve ( const EOpTransp  M_trans,
const VectorBase< Scalar > &  b,
VectorBase< Scalar > *  x,
const SolveCriteria< Scalar > *  solveCriteria 
) const [protected, virtual]

Implements Thyra::SingleRhsLinearOpWithSolveBase< Scalar >.

Definition at line 73 of file Thyra_DefaultDiagonalLinearOpWithSolve.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