NAG FL Interface
d05byf (abel_​weak_​weights)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

d05byf computes the fractional quadrature weights associated with the Backward Differentiation Formulae (BDF) of orders 4, 5 and 6. These weights can then be used in the solution of weakly singular equations of Abel type.

2 Specification

Fortran Interface
Subroutine d05byf ( iorder, iq, lenfw, wt, sw, ldsw, work, lwk, ifail)
Integer, Intent (In) :: iorder, iq, lenfw, ldsw, lwk
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (Inout) :: sw(ldsw,2*iorder-1)
Real (Kind=nag_wp), Intent (Out) :: wt(lenfw), work(lwk)
C Header Interface
#include <nag.h>
void  d05byf_ (const Integer *iorder, const Integer *iq, const Integer *lenfw, double wt[], double sw[], const Integer *ldsw, double work[], const Integer *lwk, Integer *ifail)
The routine may be called by the names d05byf or nagf_inteq_abel_weak_weights.

3 Description

d05byf computes the weights Wi,j and ωi for a family of quadrature rules related to a BDF method for approximating the integral:
1π0tϕ(s) t-s dshj=0 2p-2Wi,jϕ(j×h)+hj=2p-1iωi-jϕ(j×h),  0tT, (1)
with t=i×h(i0), for some given h. In (1), p is the order of the BDF method used and Wi,j, ωi are the fractional starting and the fractional convolution weights respectively. The algorithm for the generation of ωi is based on Newton's iteration. Fast Fourier transform (FFT) techniques are used for computing these weights and subsequently Wi,j (see Baker and Derakhshan (1987) and Henrici (1979) for practical details and Lubich (1986) for theoretical details). Some special functions can be represented as the fractional integrals of simpler functions and fractional quadratures can be employed for their computation (see Lubich (1986)). A description of how these weights can be used in the solution of weakly singular equations of Abel type is given in Section 9.

4 References

Baker C T H and Derakhshan M S (1987) Computational approximations to some power series Approximation Theory (eds L Collatz, G Meinardus and G Nürnberger) 81 11–20
Henrici P (1979) Fast Fourier methods in computational complex analysis SIAM Rev. 21 481–529
Lubich Ch (1986) Discretized fractional calculus SIAM J. Math. Anal. 17 704–719

5 Arguments

1: iorder Integer Input
On entry: p, the order of the BDF method to be used.
Constraint: 4iorder6.
2: iq Integer Input
On entry: determines the number of weights to be computed. By setting iq to a value, 2iq+1 fractional convolution weights are computed.
Constraint: iq0.
3: lenfw Integer Input
On entry: the dimension of the array wt as declared in the (sub)program from which d05byf is called.
Constraint: lenfw2iq+2.
4: wt(lenfw) Real (Kind=nag_wp) array Output
On exit: the first 2iq+1 elements of wt contains the fractional convolution weights ωi, for i=0,1,,2iq+1-1. The remainder of the array is used as workspace.
5: sw(ldsw,2×iorder-1) Real (Kind=nag_wp) array Output
On exit: sw(i,j+1) contains the fractional starting weights Wi-1,j, for i=1,2,,N and j=0,1,,2×iorder-2, where N=(2iq+1+2×iorder-1).
6: ldsw Integer Input
On entry: the first dimension of the array sw as declared in the (sub)program from which d05byf is called.
Constraint: ldsw2iq+1+2×iorder-1.
7: work(lwk) Real (Kind=nag_wp) array Workspace
8: lwk Integer Input
On entry: the dimension of the array work as declared in the (sub)program from which d05byf is called.
Constraint: lwk2iq+3.
9: ifail Integer Input/Output
On entry: ifail must be set to 0, −1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of −1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value −1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or −1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, iorder=value.
Constraint: 4iorder6.
On entry, iq=value.
Constraint: iq0.
On entry, ldsw=value, iq=value and iorder=value.
Constraint: ldsw2iq+1+2×iorder-1.
On entry, lenfw=value and iq=value.
Constraint: lenfw2iq+2.
On entry, lwk=value and iq=value.
Constraint: lwk2iq+3
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
d05byf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
d05byf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

Fractional quadrature weights can be used for solving weakly singular integral equations of Abel type. In this section, we propose the following algorithm which you may find useful in solving a linear weakly singular integral equation of the form
y(t)=f(t)+1π0tK(t,s)y(s) t-s ds,  0tT, (2)
using d05byf. In (2), K(t,s) and f(t) are given and the solution y(t) is sought on a uniform mesh of size h such that T=N×h. Discretization of (2) yields
yi = f(i×h) + h j=0 2p-2 W i,j K (i×h,j×h) yj + h j=2p-1 i ωi-j K (i×h,j×h) yj , (3)
where yiy(i×h), for i=1,2,,N. We propose the following algorithm for computing yi from (3) after a call to d05byf:
  1. (a)Set N=2iq+1+2×iorder-2 and h=T/N.
  2. (b)Equation (3) requires 2×iorder-2 starting values, yj, for j=1,2,,2×iorder-2, with y0=f(0). These starting values can be computed by solving the system
    yi = f(i×h) + h j=0 2×iorder-2 sw(i+1,j+1) K (i×h,j×h) yj ,  i=1,2,,2×iorder-2 .  
  3. (c)Compute the inhomogeneous terms
    σi = f(i×h) + h j=0 2×iorder- 2 sw(i+1,j+1) K (i×h,j×h) yj ,   i = 2 × iorder-1 , 2×iorder , , N .  
  4. (d)Start the iteration for i=2×iorder-1,2×iorder,,N to compute yi from:
    (1- h wt(1)K(i×h,i×h)) yi = σi + h j=2×iorder-1 i-1 wt(i-j+1) K (i×h,j×h) yj .  
Note that for nonlinear weakly singular equations, the solution of a nonlinear algebraic system is required at step (b) and a single nonlinear equation at step (d).

10 Example

The following example generates the first 16 fractional convolution and 23 fractional starting weights generated by the fourth-order BDF method.

10.1 Program Text

Program Text (d05byfe.f90)

10.2 Program Data

None.

10.3 Program Results

Program Results (d05byfe.r)