     Next: The Reverse Communication Interface Up: Getting Started with ARPACK Previous: Getting Started

# An Example for a Symmetric Eigenvalue Problem

In this section, the simple code dssimp is discussed.         All of the other example drivers are similar in nature. This particular example program illustrates the simplest computational mode of using ARPACK in considerable detail. dssimp shows how to use ARPACK to find a few eigenvalues and corresponding eigenvectors for the standard eigenvalue problem:

where is an n by n real symmetric matrix. The main points illustrated are:

• How to declare sufficient memory to find nev eigenvalues. dssimp is set up to find nev eigenvalues of largest magnitude LM. This may be reset to any one of the additional options (SM, LA, SA, BE) to find other eigenvalues of interest.
• Illustration of the reverse communication interface needed to utilize the top level ARPACK routine dsaupd. This routine computes the quantities needed to construct the desired eigenvalues and the corresponding eigenvectors.
• How to extract the desired eigenvalues and eigenvectors from the quantities computed with dsaupd by using the ARPACK routine dseupd.

This dssimp program is a driver for the subroutine dsaupd and it is set up to solve the following problem:

• Solve in regular mode. Regular mode only uses matrix vector products involving
• The matrix for this example is derived from the central difference discretization of the 2-dimensional Laplacian on the unit square with zero Dirichlet boundary conditions.
• The goal is to compute nev eigenvalues of largest magnitude and corresponding eigenvectors.

The only thing that must be supplied in order to use this routine on your problem is to change the array dimensions and to supply a means to compute the matrix-vector product

on request from dsaupd. The selection of which eigenvalues to compute may be altered by changing the parameter which.

Once usage of dsaupd in the simplest mode is understood, you may wish to explore the other available options such as solving generalized eigenvalue problems using a shift-invert computational mode. Some of these additional modes are described in the latter sections of this chapter and also in the file ex-sym.doc  in DOCUMENTS directory.     Next: The Reverse Communication Interface Up: Getting Started with ARPACK Previous: Getting Started
Chao Yang
11/7/1997