NAG AD Library
f11bd (real_gen_basic_setup)

Settings help

AD Name Style:


AD Specification Language:

1 Purpose

f11bd is the AD Library version of the primal routine f11bdf. Based (in the C++ interface) on overload resolution, f11bd can be used for primal, tangent and adjoint evaluation. It supports tangents and adjoints of first order.

2 Specification

C++ Interface
#include <dco.hpp>
#include <nagad.h>
namespace nag {
namespace ad {
void f11bd ( handle_t &ad_handle, const char *method, const char *precon, const char *norm, const char *weight, const Integer &iterm, const Integer &n, const Integer &m, const ADTYPE &tol, const Integer &maxitn, const ADTYPE &anorm, const ADTYPE &sigmax, const Integer &monit, Integer &lwreq, ADTYPE work[], const Integer &lwork, Integer &ifail)
}
}
The function is overloaded on ADTYPE which represents the type of active arguments. ADTYPE may be any of the following types:
double,
dco::ga1s<double>::type,
dco::gt1s<double>::type
Note: this function can be used with AD tools other than dco/c++. For details, please contact NAG.

3 Description

f11bd is the AD Library version of the primal routine f11bdf.
f11bdf is a setup routine, the first in a suite of three routines for the iterative solution of a real general (nonsymmetric) system of simultaneous linear equations. f11bdf must be called before f11bef, the iterative solver. The third routine in the suite, f11bff, can be used to return additional information about the computation.
These routines are suitable for the solution of large sparse general (nonsymmetric) systems of equations. For further information see Section 3 in the documentation for f11bdf.

4 References

Arnoldi W (1951) The principle of minimized iterations in the solution of the matrix eigenvalue problem Quart. Appl. Math. 9 17–29
Barrett R, Berry M, Chan T F, Demmel J, Donato J, Dongarra J, Eijkhout V, Pozo R, Romine C and Van der Vorst H (1994) Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods SIAM, Philadelphia
Dias da Cunha R and Hopkins T (1994) PIM 1.1 — the parallel iterative method package for systems of linear equations user's guide — Fortran 77 version Technical Report Computing Laboratory, University of Kent at Canterbury, Kent, UK
Freund R W (1993) A transpose-free quasi-minimal residual algorithm for non-Hermitian linear systems SIAM J. Sci. Comput. 14 470–482
Freund R W and Nachtigal N (1991) QMR: a Quasi-Minimal Residual Method for Non-Hermitian Linear Systems Numer. Math. 60 315–339
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Higham N J (1988) FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation ACM Trans. Math. Software 14 381–396
Saad Y and Schultz M (1986) GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems SIAM J. Sci. Statist. Comput. 7 856–869
Sleijpen G L G and Fokkema D R (1993) BiCGSTAB() for linear equations involving matrices with complex spectrum ETNA 1 11–32
Sonneveld P (1989) CGS, a fast Lanczos-type solver for nonsymmetric linear systems SIAM J. Sci. Statist. Comput. 10 36–52
Van der Vorst H (1989) Bi-CGSTAB, a fast and smoothly converging variant of Bi-CG for the solution of nonsymmetric linear systems SIAM J. Sci. Statist. Comput. 13 631–644

5 Arguments

In addition to the arguments present in the interface of the primal routine, f11bd includes some arguments specific to AD.
A brief summary of the AD specific arguments is given below. For the remainder, links are provided to the corresponding argument from the primal routine. A tooltip popup for all arguments can be found by hovering over the argument name in Section 2 and in this section.
1: ad_handlenag::ad::handle_t Input/Output
On entry: a configuration object that holds information on the differentiation strategy. Details on setting the AD strategy are described in AD handle object in the NAG AD Library Introduction.
2: method – character Input
3: precon – character Input
4: norm – character Input
5: weight – character Input
6: iterm – Integer Input
7: n – Integer Input
8: m – Integer Input
9: tolADTYPE Input
10: maxitn – Integer Input
11: anormADTYPE Input
12: sigmaxADTYPE Input
13: monit – Integer Input
14: lwreq – Integer Output
15: work(lwork) – ADTYPE array Communication Array
16: lwork – Integer Input
17: ifail – Integer Input/Output

6 Error Indicators and Warnings

f11bd preserves all error codes from f11bdf and in addition can return:
ifail=-89
An unexpected AD error has been triggered by this routine. Please contact NAG.
See Error Handling in the NAG AD Library Introduction for further information.
ifail=-199
The routine was called using a strategy that has not yet been implemented.
See AD Strategies in the NAG AD Library Introduction for further information.
ifail=-444
A C++ exception was thrown.
The error message will show the details of the C++ exception text.
ifail=-899
Dynamic memory allocation failed for AD.
See Error Handling in the NAG AD Library Introduction for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f11bd is not threaded in any implementation.

9 Further Comments

None.

10 Example

The following examples are variants of the example for f11bdf, modified to demonstrate calling the NAG AD Library.
Description of the primal example.
This example solves an 8×8 nonsymmetric system of simultaneous linear equations using the bi-conjugate gradient stabilized method of order =1, where the coefficients matrix A has a random sparsity pattern. An incomplete LU preconditioner is used (routines f11da or f11db).

10.1 Adjoint modes

Language Source File Data Results
C++ f11bd_a1w_hcppe.cpp f11bd_a1w_hcppe.d f11bd_a1w_hcppe.r

10.2 Tangent modes

Language Source File Data Results
C++ f11bd_t1w_hcppe.cpp f11bd_t1w_hcppe.d f11bd_t1w_hcppe.r

10.3 Passive mode

Language Source File Data Results
C++ f11bd_p0w_hcppe.cpp f11bd_p0w_hcppe.d f11bd_p0w_hcppe.r