Engineering and Scientific Subroutine Library for AIX Version 3 Release 3: Guide and Reference
This section describes how to design and code the subf subroutine
for use by the numerical quadrature subrutines.
For the Gaussian quadrature subroutines, you must supply a separate
subroutine that is callable by ESSL. You specify the name of the
subroutine in the subf argument. This subroutine name is
selected by you. You should design the subf subroutine so it
receives, as input, a tabulated set of points at which the integrand is
evaluated, and it returns, as output, the values of the integrand evaluated at
these points.
Depending on the numerical quadrature subroutine that you use, the
subf subroutine is defined in one of the two following ways:
- For _GLNQ, _GLGQ, _GRAQ, and _GHMQ, you define the subf
subroutine with three arguments: t, y, and n,
where:
- t
- is an input array, referred to as T, of tabulated Gaussian
quadrature abscissas, containing n real numbers,
ti, where ti is
automatically provided by the ESSL subroutine and is determined by n
and the Gaussian quadrature method chosen.
- y
- is an output array, referred to as Y, containing n
real numbers, where for the integrand, the following is true:
yi = f(ti)
for i = 1, n.
- n
- is a positive integer indicating the number of elements in T
and Y.
- For _GLNQ2, you define the subf subroutine with six
arguments: s, n1, t, n2, z,
and ldz, where:
- s
- is an input array, referred to as S, of tabulated Gaussian
quadrature abscissas, containing n1 real numbers,
si, where si is
automatically provided by the ESSL subroutine and is determined by n1
and the Gaussian quadrature method.
- n1
- is a positive integer indicating the number of elements in S
and the number of rows to be used in array Z.
- t
- is an input array, referred to as T, of tabulated Gaussian
quadrature abscissas, containing n2 real numbers,
ti, where ti is
automatically provided by the ESSL subroutine and is determined by n2
and the Gaussian quadrature method.
- n2
- is a positive integer indicating the number of elements in T
and the number of columns to be used in array Z.
- z
- is an ldz by (at least) n2 output array, referred to as
Z, of real numbers, where for the integrand, the following is
true:
zij = f(si,
tj) for i = 1, n1 and
j = 1, n2.
- ldz
- is a positive integer indicating the size of the leading dimension of the
array Z.
Examples of coding a subf subroutine in Fortran are provided for
each subroutine in this chapter. Examples of coding a subf
subroutine in C, C++, and PL/I are provided in Example 1.
Depending on the programming language you use for your program that calls
the numerical quadrature subroutines, you have a choice of one or more
languages that you can use for writing subf. These rules and
other langauge-related coding rules for setting up subf in your
program are described in the following sections:
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]