Anasazi Version of the Day
Anasazi Operator/Vector Interfaces


class  Anasazi::HelperTraits< ScalarType >
 Class which defines basic traits for working with different scalar types. More...
class  Anasazi::MultiVecTraitsExt< ScalarType, MultiVec< ScalarType > >
 An extension of the MultiVecTraits class that adds a new vector length method.This traits class provides an additional method to the multivector operations for finding the number of rows that is 64-bit compatible. The method in this traits class will replace the GetVecLength() method, which will be deprecated, and removed in the next major Trilinos release. At this time, this traits class will call the GetVecLength() method by default for any traits implementation that does not specialize this template. However, for 64-bit support this template will need to be specialized. More...
class  Anasazi::MultiVecTraits< ScalarType, MV >
 Traits class which defines basic operations on multivectors. More...
class  Anasazi::MultiVecTraitsExt< ScalarType, MV >
 An extension of the MultiVecTraits class that adds a new vector length method.This traits class provides a 64-bit compatible method, GetGlobalLength(), that returns the number of rows in a multivector. GetGlobalLength() will replace the GetVecLength() method in MultiVecTraits, which is not 64-bit compatible. GetVecLength() will be deprecated, and will be removed in the next major Trilinos release. More...
class  Anasazi::OperatorTraits< ScalarType, MV, OP >
 Virtual base class which defines basic traits for the operator type. More...

Detailed Description

Anasazi utilizes abstract interfaces for operators and multivectors to enable the leveraging of existing linear algebra libraries. The choice in linear algebra is made through templating, and access to the functionality of the underlying objects is provided via the traits classes Anasazi::MultiVecTraits and Anasazi::OperatorTraits.

Anasazi::MultiVecTraits requires two template arguments:

Because Anasazi implements block eigensolvers, the underlying primitive is a collection of column vectors (a multivector) instead of a single column vector. The purpose of Anasazi::MultiVecTraits is to provide an interface for performing multivector operations (e.g., multivector AXPY). An example illustrating the manipulation of an Epetra_MultiVector using Anasazi::MultiVecTraits follows:

   // 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);

As is customary among large-scale eigenvalue software, Anasazi assumes matrix-free access to the problem operators, i.e., only matrix-vector products are needed. Therefore, Anasazi::OperatorTraits requires three template arguments:

The Anasazi::OperatorTraits interface provides a single mechanism: the ability to apply an operator of type OP to a multivector of type MV, yielding another multivector of type MV. This is performed as follows:

   // build some Epetra_MultiVector objects...
   Epetra_MultiVector A(...), B(...);
   // ...and an Epetra operator
   Epetra_Operator Op(...);

   // apply the operation B <- Op*A

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). This allows the generic programming of algorithms for the solution of eigenvalue problems.

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), this specialization is provided by the Anasazi adapters to Epetra. Specializations of these traits classes provided by Anasazi are:

Additional specializations of Anasazi::MultiVecTraits and Anasazi::OperatorTraits may be created by the user for any other multivector and operator class.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends