NAG CL Interface
f12fdc (real_​symm_​option)

Note: this function uses optional parameters to define choices in the problem specification. If you wish to use default settings for all of the optional parameters, then this function need not be called. If, however, you wish to reset some or all of the settings please refer to Section 11 for a detailed description of the specification of the optional parameters.
Settings help

CL Name Style:


1 Purpose

f12fdc is an option setting function in a suite of functions consisting of f12fac, f12fbc, f12fcc, f12fdc and f12fec, and may be used to supply individual optional parameters to f12fbc and f12fcc. The initialization function f12fac must have been called prior to calling f12fdc.

2 Specification

#include <nag.h>
void  f12fdc (const char *str, Integer icomm[], double comm[], NagError *fail)
The function may be called by the names: f12fdc, nag_sparseig_real_symm_option or nag_real_symm_sparse_eigensystem_option.

3 Description

f12fdc may be used to supply values for optional parameters to f12fbc and f12fcc. It is only necessary to call f12fdc for those arguments whose values are to be different from their default values. One call to f12fdc sets one argument value.
Each optional parameter is defined by a single character string consisting of one or more items. The items associated with a given option must be separated by spaces, or equals signs [=] . Alphabetic characters may be upper or lower case. The string
Iteration Limit = 500
is an example of a string used to set an optional parameter. For each option the string contains one or more of the following items:
f12fdc does not have an equivalent function from the ARPACK package which passes options by directly setting values to scalar arguments or to specific elements of array arguments. f12fdc is intended to make the passing of options more transparent and follows the same principle as the single option setting functions in Chapter E04.
The setup function f12fac must be called prior to the first call to f12fdc and all calls to f12fdc must precede the first call to f12fbc, the reverse communication iterative solver.
A complete list of optional parameters, their abbreviations, synonyms and default values is given in Section 11.

4 References

Lehoucq R B (2001) Implicitly restarted Arnoldi methods and subspace iteration SIAM Journal on Matrix Analysis and Applications 23 551–562
Lehoucq R B and Scott J A (1996) An evaluation of software for computing eigenvalues of sparse nonsymmetric matrices Preprint MCS-P547-1195 Argonne National Laboratory
Lehoucq R B and Sorensen D C (1996) Deflation techniques for an implicitly restarted Arnoldi iteration SIAM Journal on Matrix Analysis and Applications 17 789–821
Lehoucq R B, Sorensen D C and Yang C (1998) ARPACK Users' Guide: Solution of Large-scale Eigenvalue Problems with Implicitly Restarted Arnoldi Methods SIAM, Philadelphia

5 Arguments

1: str const char * Input
On entry: a single valid option string (as described in Section 3 and Section 11).
2: icomm[dim] Integer Communication Array
Note: the actual argument supplied must be the array icomm supplied to the initialization routine f12fac.
On initial entry: must remain unchanged following a call to the setup function f12fac.
On exit: contains data on the current options set.
3: comm[dim] double Communication Array
Note: the actual argument supplied must be the array comm supplied to the initialization routine f12fac.
On initial entry: must remain unchanged following a call to the setup function f12fac.
On exit: contains data on the current options set.
4: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_INVALID_OPTION
Ambiguous keyword: value
Keyword not recognized: value
Second keyword not recognized: value
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f12fdc is not threaded in any implementation.

9 Further Comments

None.

10 Example

This example solves Ax = λBx in Shifted Inverse mode, where A and B are obtained from the standard central difference discretization of the one-dimensional Laplacian operator 2u x2 on [0,1] , with zero Dirichlet boundary conditions. Data is passed to and from the reverse communication function f12fbc using pointers to the communication array.

10.1 Program Text

Program Text (f12fdce.c)

10.2 Program Data

Program Data (f12fdce.d)

10.3 Program Results

Program Results (f12fdce.r)

11 Optional Parameters

Several optional parameters for the computational functions f12fbc and f12fcc define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of f12fbc and f12fcc these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
The remainder of this section can be skipped if you wish to use the default values for all optional parameters.
The following is a list of the optional parameters available. A full description of each optional parameter is provided in Section 11.1.
Optional parameters may be specified by calling f12fdc before a call to f12fbc, but after a call to f12fac. One call is necessary for each optional parameter.
All optional parameters you do not specify are set to their default values. Optional parameters you do specify are unaltered by f12fbc and f12fcc (unless they define invalid values) and so remain in effect for subsequent calls unless you alter them.

11.1 Description of the Optional Parameters

For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
Keywords and character values are case and white space insensitive.
Optional parameters used to specify files (e.g., Advisory and Monitoring) have type Nag_FileID. This ID value must either be set to 0 (the default value) in which case there will be no output, or will be as returned by a call of x04acc.
Advisory Default =0
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
Advisory messages are output to Nag_FileID Advisory during the solution of the problem.
Defaults
This special keyword may be used to reset all optional parameters to their default values.
Exact Shifts Default
Supplied Shifts
During the Lanczos iterative process, shifts are applied internally as part of the implicit restarting scheme. The shift strategy used by default and selected by the Exact Shifts is strongly recommended over the alternative Supplied Shifts (see Lehoucq et al. (1998) for details of shift strategies).
If Exact Shifts are used then these are computed internally by the algorithm in the implicit restarting scheme.
If Supplied Shifts are used then, during the Lanczos iterative process, you must supply shifts through array arguments of f12fbc when f12fbc returns with irevcm=3; the real and imaginary parts of the shifts are supplied in y and mx respectively. This option should only be used if you are an experienced user since this requires some algorithmic knowledge and because more operations are usually required than for the implicit shift scheme. Details on the use of explicit shifts and further references on shift strategies are available in Lehoucq et al. (1998).
Iteration Limiti Default = 300
The limit on the number of Lanczos iterations that can be performed before f12fbc exits. If not all requested eigenvalues have converged to within Tolerance and the number of Lanczos iterations has reached this limit then f12fbc exits with an error; f12fcc can still be called subsequently to return the number of converged eigenvalues, the converged eigenvalues and, if requested, the corresponding eigenvectors.
Largest Magnitude Default
Both Ends
Largest Algebraic
Smallest Algebraic
Smallest Magnitude
The Lanczos iterative method converges on a number of eigenvalues with given properties. The default is for f12fbc to compute the eigenvalues of largest magnitude using Largest Magnitude. Alternatively, eigenvalues may be chosen which have Largest Algebraic part, Smallest Magnitude, or Smallest Algebraic part; or eigenvalues which are from Both Ends of the algebraic spectrum.
Note that these options select the eigenvalue properties for eigenvalues of op (and B for Generalized problems), the linear operator determined by the computational mode and problem type.
Nolist Default
List
Optional parameter List enables printing of each optional parameter specification as it is supplied. Nolist suppresses this printing.
Monitoring Default = −1
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
Unless Monitoring is set to −1 (the default), monitoring information is output to Nag_FileID Monitoring during the solution of each problem; this may be the same as Advisory. The type of information produced is dependent on the value of Print Level, see the description of the optional parameter Print Level in this section for details of the information produced. Please see x04acc to associate a file with a given Nag_FileID.
Print LeveliDefault = 0
This controls the amount of printing produced by f12fdc as follows.
i Output
=0 No output except error messages. If you want to suppress all output, set Print Level=0.
>0 The set of selected options.
=2 Problem and timing statistics on final exit from f12fbc.
5 A single line of summary output at each Lanczos iteration.
10 If Monitoring is set, then at each iteration, the length and additional steps of the current Lanczos factorization and the number of converged Ritz values; during re-orthogonalization, the norm of initial/restarted starting vector; on a final Lanczos iteration, the number of update iterations taken, the number of converged eigenvalues, the converged eigenvalues and their Ritz estimates.
20 Problem and timing statistics on final exit from f12fbc. If Monitoring is set, then at each iteration, the number of shifts being applied, the eigenvalues and estimates of the symmetric tridiagonal matrix H, the size of the Lanczos basis, the wanted Ritz values and associated Ritz estimates and the shifts applied; vector norms prior to and following re-orthogonalization.
30 If Monitoring is set, then on final iteration, the norm of the residual; when computing the Schur form, the eigenvalues and Ritz estimates both before and after sorting; for each iteration, the norm of residual for compressed factorization and the symmetric tridiagonal matrix H; during re-orthogonalization, the initial/restarted starting vector; during the Lanczos iteration loop, a restart is flagged and the number of the residual requiring iterative refinement; while applying shifts, some indices.
40 If Monitoring is set, then during the Lanczos iteration loop, the Lanczos vector number and norm of the current residual; while applying shifts, key measures of progress and the order of H; while computing eigenvalues of H, the last rows of the Schur and eigenvector matrices; when computing implicit shifts, the eigenvalues and Ritz estimates of H.
50 If Monitoring is set, then during Lanczos iteration loop: norms of key components and the active column of H, norms of residuals during iterative refinement, the final symmetric tridiagonal matrix H; while applying shifts: number of shifts, shift values, block indices, updated tridiagonal matrix H; while computing eigenvalues of H: the diagonals of H, the computed eigenvalues and Ritz estimates.
Note that setting Print Level30 can result in very lengthy Monitoring output.
Random Residual Default
Initial Residual
To begin the Lanczos iterative process, f12fbc requires an initial residual vector. By default f12fbc provides its own random initial residual vector; this option can also be set using optional parameter Random Residual. Alternatively, you can supply an initial residual vector (perhaps from a previous computation) to f12fbc through the array argument resid; this option can be set using optional parameter Initial Residual.
Regular Default
Regular Inverse
Shifted Inverse
Buckling
Cayley
These options define the computational mode which in turn defines the form of operation op(x) to be performed when f12fbc returns with irevcm=−1 or 1 and the matrix-vector product Bx when f12fbc returns with irevcm=2.
Given a Standard eigenvalue problem in the form Ax=λx then the following modes are available with the appropriate operator op(x).
Regular op=A
Shifted Inverse op=(A-σI)−1 where σ is real
Given a Generalized eigenvalue problem in the form Ax=λBx then the following modes are available with the appropriate operator op(x).
Regular Inverse op=B-1A
Shifted Inverse op=(A-σB)−1B, where σ is real
Buckling op=(B-σA)−1A, where σ is real
Cayley op=(A-σB)−1(A+σB), where σ is real
Standard Default
Generalized
The problem to be solved is either a standard eigenvalue problem, Ax=λx, or a generalized eigenvalue problem, Ax=λBx. The optional parameter Standard should be used when a standard eigenvalue problem is being solved and the optional parameter Generalized should be used when a generalized eigenvalue problem is being solved.
Tolerancer Default = ε
An approximate eigenvalue has deemed to have converged when the corresponding Ritz estimate is within Tolerance relative to the magnitude of the eigenvalue.
Vectors Default = RITZ
The function f12fcc can optionally compute the Schur vectors and/or the eigenvectors corresponding to the converged eigenvalues. To turn off computation of any vectors the option Vectors=NONE should be set. To compute only the Schur vectors (at very little extra cost), the option Vectors=SCHUR should be set and these will be returned in the array argument v of f12fcc. To compute the eigenvectors (Ritz vectors) ­corresponding to the eigenvalue estimates, the option Vectors=RITZ should be set and these will be returned in the array argument z of f12fcc, if z is set equal to v then the Schur vectors in v are overwritten by the eigenvectors computed by f12fcc.