Thyra Version of the Day
Related Functions
Thyra::DefaultDiagonalLinearOpWithSolve< Scalar > Class Template Reference

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

#include <Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp>

Inheritance diagram for Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >:
Inheritance graph
[legend]

List of all members.

Related Functions

(Note that these are not member functions.)

template<class Scalar >
RCP
< DefaultDiagonalLinearOpWithSolve
< Scalar > > 
defaultDiagonalLinearOpWithSolve ()
 Nonmember constructor.
template<class Scalar >
RCP
< DefaultDiagonalLinearOpWithSolve
< Scalar > > 
defaultDiagonalLinearOpWithSolve (const RCP< const VectorBase< Scalar > > &diag)
 Nonmember constructor.

Constructors/initializers/accessors

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

Overridden from LinearOpWithSolveBase

bool solveSupportsImpl (EOpTransp M_trans) const
 
bool solveSupportsSolveMeasureTypeImpl (EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const
 
SolveStatus< Scalar > solveImpl (const EOpTransp transp, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< 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 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 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 79 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.


Constructor & Destructor Documentation

Constructs to uninitialized.

Postconditions:

Definition at line 47 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.

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

Member Function Documentation

template<class Scalar >
bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsImpl ( EOpTransp  M_trans) const [protected, virtual]
template<class Scalar >
bool Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveSupportsSolveMeasureTypeImpl ( EOpTransp  M_trans,
const SolveMeasureType solveMeasureType 
) const [protected, virtual]
template<class Scalar >
SolveStatus< Scalar > Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::solveImpl ( const EOpTransp  transp,
const MultiVectorBase< Scalar > &  B,
const Ptr< MultiVectorBase< Scalar > > &  X,
const Ptr< const SolveCriteria< Scalar > >  solveCriteria 
) const [protected, virtual]

Friends And Related Function Documentation

template<class Scalar >
RCP< DefaultDiagonalLinearOpWithSolve< Scalar > > defaultDiagonalLinearOpWithSolve ( ) [related]

Nonmember constructor.

Definition at line 128 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.

template<class Scalar >
RCP< DefaultDiagonalLinearOpWithSolve< Scalar > > defaultDiagonalLinearOpWithSolve ( const RCP< const VectorBase< Scalar > > &  diag) [related]

Nonmember constructor.

Definition at line 140 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines