# Thyra::DefaultDiagonalLinearOpWithSolve< Scalar > Class Template Reference

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

`#include <Thyra_DefaultDiagonalLinearOpWithSolveDecl.hpp>`

Inheritance diagram for Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >:

[legend]
List of all members.

## Constructors/initializers/accessors

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

## Overridden from SingleScalarLinearOpWithSolveBase

bool solveSupportsTrans (ETransp M_trans) const

bool solveSupportsSolveMeasureType (ETransp M_trans, const SolveMeasureType &solveMeasureType) const

## Overridden from SingleRhsLinearOpWithSolveBase

SolveStatus< Scalar > solve (const ETransp 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 Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::DefaultDiagonalLinearOpWithSolve ( )
 Constructs to uninitialized. Postconditions: `this->getDiag().get()==NULL` Definition at line 43 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

 template Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::DefaultDiagonalLinearOpWithSolve ( const Teuchos::RefCountPtr< const VectorBase< Scalar > > & diag )
 Calls `initialize()`. Definition at line 47 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

## Member Function Documentation

 template bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsTrans ( ETransp M_trans ) const` [protected, virtual]`
 Definition at line 59 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

 template bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsSolveMeasureType ( ETransp M_trans, const SolveMeasureType & solveMeasureType ) const` [protected, virtual]`
 Definition at line 65 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

 template SolveStatus< Scalar > Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solve ( const ETransp M_trans, const VectorBase< Scalar > & b, VectorBase< Scalar > * x, const SolveCriteria< Scalar > * solveCriteria ) const` [protected, virtual]`
 Definition at line 73 of file Thyra_DefaultDiagonalLinearOpWithSolve.hpp.

The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:32:45 2008 for Thyra Operator Solve Support by  1.3.9.1