ExampleTridiagSerialLinearOp< Scalar > Class Template Reference

Simple example subclass for serial tridiagonal matrices. More...

#include <ExampleTridiagSerialLinearOp.hpp>

Inheritance diagram for ExampleTridiagSerialLinearOp< Scalar >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ExampleTridiagSerialLinearOp ()
 Construct to uninitialized.
 ExampleTridiagSerialLinearOp (const Thyra::Ordinal dim, const Teuchos::ArrayView< const Scalar > &lower, const Teuchos::ArrayView< const Scalar > &diag, const Teuchos::ArrayView< const Scalar > &upper)
 initialize().
void initialize (const Thyra::Ordinal dim, const Teuchos::ArrayView< const Scalar > &lower, const Teuchos::ArrayView< const Scalar > &diag, const Teuchos::ArrayView< const Scalar > &upper)

Protected Member Functions

Teuchos::RCP< const Thyra::VectorSpaceBase<
Scalar > > 
range () const
 
Teuchos::RCP< const Thyra::VectorSpaceBase<
Scalar > > 
domain () const
 
bool opSupportedImpl (Thyra::EOpTransp M_trans) const
 
void applyImpl (const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< Scalar > &X_in, const Teuchos::Ptr< Thyra::MultiVectorBase< Scalar > > &Y_inout, const Scalar alpha, const Scalar beta) const
 

Detailed Description

template<class Scalar>
class ExampleTridiagSerialLinearOp< Scalar >

Simple example subclass for serial tridiagonal matrices.

This subclass form a linear operator for tridiagonal matrices of the form:

\[ M= \left[\begin{array}{ccccc} d_{(1)} & u_{(1)} \\ l_{(1)} & d_{(2)} & u_{(2)} \\ & \ddots & \ddots & \ddots \\ & & l_{(n-2)} & d_{(n-1)} & u_{(n-1)} \\ & & & l_{(n-1)} & d_{(n)} \end{array}\right] \]

given the arrays lower[], diag[], and upper[] of dimension dim-1, dim and dim-1 respectively (see initialize()).

See the source code for this simple example by clicking on the link to the definition below.

Definition at line 66 of file ExampleTridiagSerialLinearOp.hpp.


Constructor & Destructor Documentation

template<class Scalar>
ExampleTridiagSerialLinearOp< Scalar >::ExampleTridiagSerialLinearOp (  )  [inline]

Construct to uninitialized.

Definition at line 71 of file ExampleTridiagSerialLinearOp.hpp.

template<class Scalar>
ExampleTridiagSerialLinearOp< Scalar >::ExampleTridiagSerialLinearOp ( const Thyra::Ordinal  dim,
const Teuchos::ArrayView< const Scalar > &  lower,
const Teuchos::ArrayView< const Scalar > &  diag,
const Teuchos::ArrayView< const Scalar > &  upper 
) [inline]

initialize().

Definition at line 74 of file ExampleTridiagSerialLinearOp.hpp.


Member Function Documentation

template<class Scalar>
void ExampleTridiagSerialLinearOp< Scalar >::initialize ( const Thyra::Ordinal  dim,
const Teuchos::ArrayView< const Scalar > &  lower,
const Teuchos::ArrayView< const Scalar > &  diag,
const Teuchos::ArrayView< const Scalar > &  upper 
) [inline]

Initialize given lower, diagonal and upper arrays of data.

Parameters:
dim [in] Dimension of this matrix (must be >= 2).
lower [in] Array (length dim-1) of the lower diagonal elements
diag [in] Array (length dim) of the central diagonal elements
upper [in] Array (length dim-1) of the upper diagonal elements
Preconditions:

Postconditions:

Definition at line 103 of file ExampleTridiagSerialLinearOp.hpp.

template<class Scalar>
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > ExampleTridiagSerialLinearOp< Scalar >::range (  )  const [inline, protected, virtual]

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 122 of file ExampleTridiagSerialLinearOp.hpp.

template<class Scalar>
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > ExampleTridiagSerialLinearOp< Scalar >::domain (  )  const [inline, protected, virtual]

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 126 of file ExampleTridiagSerialLinearOp.hpp.

template<class Scalar>
bool ExampleTridiagSerialLinearOp< Scalar >::opSupportedImpl ( Thyra::EOpTransp  M_trans  )  const [inline, protected, virtual]

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 130 of file ExampleTridiagSerialLinearOp.hpp.

template<class Scalar>
void ExampleTridiagSerialLinearOp< Scalar >::applyImpl ( const Thyra::EOpTransp  M_trans,
const Thyra::MultiVectorBase< Scalar > &  X_in,
const Teuchos::Ptr< Thyra::MultiVectorBase< Scalar > > &  Y_inout,
const Scalar  alpha,
const Scalar  beta 
) const [protected, virtual]

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 153 of file ExampleTridiagSerialLinearOp.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 09:26:25 2010 for Thyra by  doxygen 1.4.7