## Classes | |

class | Anasazi::MultiVecTraits< ScalarType, MV > |

Virtual base class which defines basic traits for the multi-vector type. More... | |

class | Anasazi::OperatorTraits< ScalarType, MV, OP > |

Virtual base class which defines basic traits for the operator type. More... |

Anasazi::MultiVecTraits requires two template arguments:

- a scalar class (
`ScalarType`

), describing the field over which the multivectors are defined, and - a multivector class (
`MV`

).

Because Anasazi implements block eigensolvers, the underlying primitive is a collection of column vectors (a multivector) instead of a single column vector. Anasazi::MultiVecTraits provides an interface for accessing multivector operations (e.g., multivector `AXPY`

). For example code, to manipulate an Epetra_Multivector via the Anasazi::MultiVecTraits interface is

// build some Epetra_MultiVector objects... Epetra_MultiVector A(...), B(...), C(...); // ...and a Teuchos::SerialDenseMatrix Teuchos::SerialDenseMatrix<int,double> D(...); // perform C <- 1.0*A + 0.5*B; Anasazi::MultiVecTraits<double,Epetra_MultiVector>::MvAddMv(1.0, A, 0.5, B, C); // perform C <- -2.0*A*D + 1.0*C Anasazi::MultiVecTraits<double,Epetra_MultiVector>::MvTimesMatAddMv(-2.0, A, D, 1.0, C);

Similarly, OperatorTraits is used to access the functionality of operators, namely, their effect on multivectors. In this respect, Anasazi::OperatorTraits requires three template arguments:

- a scalar class (
`ScalarType`

), describing the field over which the multivectors are defined, - a multivector class (
`MV`

), describing the domain and range of the operator, and - an operator class (
`OP`

).

The Anasazi::OperatorTraits interface provides access to a single mechanism: the ability to apply an operator of type `OP`

to a multivector of type `MV`

yields another multivector of type `MV`

. This is perfomed as follows:

// build some Epetra_MultiVector objects... Epetra_MultiVector A(...), B(...); // ...and an operator Epetra_Operator Op(...); // apply the operation B <- Op*A Anasazi::OperatorTraits<double,Epetra_MultiVector,Epetra_Operator>::Apply(Op,A,B);

These interfaces are used throughout Anasazi to manipulate multivectors and apply operators, so that no low-level access to the underlying objects are needed. Hence, Anasazi is independent of the underlying linear algebra data structures(e.g., serial or parallel, real or complex).

Calling methods of MultiVecTraits<ScalarType,MV> requires that a specialization of MultiVecTraits has been implemented for classes `ScalarType`

and `MV`

. In the case of Epetra_MultiVector and Epetra_Operator (which are both defined on the field of doubles), is provided by the Anasazi adapters to Epetra. Other specialization of these traits classes that are provided by Anasazi are:

- Epetra_MultiVector and Epetra_Operator (with scalar type
`double`

) - Thyra::MultiVectorBase and Thyra::LinearOpBase (with arbitrary scalar type)

This allows Anasazi to be used with any classes that implement the abstract interfaces provided by the Thyra package. - Anasazi::MultiVec and Anasazi::Operator (with arbitrary scalar type)

This allows Anasazi to be used with any classes that implement the abstract base classes Anasazi::MultiVec and Anasazi::Operator.

Additional specializations of Anasazi::MultiVecTraits and Anasazi::OperatorTraits are created by the user.

Generated on Thu Sep 18 12:31:38 2008 for Anasazi by 1.3.9.1