NAG FL Interface
d03pyf (dim1_​parab_​coll_​interp)

Settings help

FL Name Style:

FL Specification Language:

1 Purpose

d03pyf may be used in conjunction with either d03pdf/​d03pda or d03pjf/​d03pja. It computes the solution and its first derivative at user-specified points in the spatial coordinate.

2 Specification

Fortran Interface
Subroutine d03pyf ( npde, u, nbkpts, xbkpts, npoly, npts, xp, intpts, itype, up, rsave, lrsave, ifail)
Integer, Intent (In) :: npde, nbkpts, npoly, npts, intpts, itype, lrsave
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: u(npde,npts), xbkpts(nbkpts), xp(intpts)
Real (Kind=nag_wp), Intent (Inout) :: rsave(lrsave)
Real (Kind=nag_wp), Intent (Out) :: up(npde,intpts,itype)
C Header Interface
#include <nag.h>
void  d03pyf_ (const Integer *npde, const double u[], const Integer *nbkpts, const double xbkpts[], const Integer *npoly, const Integer *npts, const double xp[], const Integer *intpts, const Integer *itype, double up[], double rsave[], const Integer *lrsave, Integer *ifail)
The routine may be called by the names d03pyf or nagf_pde_dim1_parab_coll_interp.

3 Description

d03pyf is an interpolation routine for evaluating the solution of a system of partial differential equations (PDEs), or the PDE components of a system of PDEs with coupled ordinary differential equations (ODEs), at a set of user-specified points. The solution of a system of equations can be computed using d03pdf/​d03pda or d03pjf/​d03pja on a set of mesh points; d03pyf can then be employed to compute the solution at a set of points other than those originally used in d03pdf/​d03pda or d03pjf/​d03pja. It can also evaluate the first derivative of the solution. Polynomial interpolation is used between each of the break-points xbkpts(i), for i=1,2,,nbkpts. When the derivative is needed (itype=2), the array xp(intpts) must not contain any of the break-points, as the method, and consequently the interpolation scheme, assumes that only the solution is continuous at these points.

4 References


5 Arguments

Note: the arguments u, npts, npde, xbkpts, nbkpts, rsave and lrsave must be supplied unchanged from either d03pdf/​d03pda or d03pjf/​d03pja.
1: npde Integer Input
On entry: the number of PDEs.
Constraint: npde1.
2: u(npde,npts) Real (Kind=nag_wp) array Input
On entry: the PDE part of the original solution returned in the argument u by the routine d03pdf/​d03pda or d03pjf/​d03pja.
3: nbkpts Integer Input
On entry: the number of break-points.
Constraint: nbkpts2.
4: xbkpts(nbkpts) Real (Kind=nag_wp) array Input
On entry: xbkpts(i), for i=1,2,,nbkpts, must contain the break-points as used by d03pdf/​d03pda or d03pjf/​d03pja.
Constraint: xbkpts(1)<xbkpts(2)<<xbkpts(nbkpts).
5: npoly Integer Input
On entry: the degree of the Chebyshev polynomial used for approximation as used by d03pdf/​d03pda or d03pjf/​d03pja.
Constraint: 1npoly49.
6: npts Integer Input
On entry: the number of mesh points as used by d03pdf/​d03pda or d03pjf/​d03pja.
Constraint: npts=(nbkpts-1)×npoly+1.
7: xp(intpts) Real (Kind=nag_wp) array Input
On entry: xp(i), for i=1,2,,intpts, must contain the spatial interpolation points.
  • xbkpts(1)xp(1)<xp(2)<<xp(intpts)xbkpts(nbkpts);
  • if itype=2, xp(i)xbkpts(j), for i=1,2,,intpts and j=2,3,,nbkpts-1.
8: intpts Integer Input
On entry: the number of interpolation points.
Constraint: intpts1.
9: itype Integer Input
On entry: specifies the interpolation to be performed.
The solution at the interpolation points are computed.
Both the solution and the first derivative at the interpolation points are computed.
Constraint: itype=1 or 2.
10: up(npde,intpts,itype) Real (Kind=nag_wp) array Output
On exit: if itype=1, up(i,j,1), contains the value of the solution Ui(xj,tout), at the interpolation points xj=xp(j), for j=1,2,,intpts and i=1,2,,npde.
If itype=2, up(i,j,1) contains Ui(xj,tout) and up(i,j,2) contains Ui x at these points.
11: rsave(lrsave) Real (Kind=nag_wp) array Communication Array
The array rsave contains information required by d03pyf as returned by d03pdf/​d03pda or d03pjf/​d03pja. The contents of rsave must not be changed from the call to d03pdf/​d03pda or d03pjf/​d03pja. Some elements of this array are overwritten on exit.
12: lrsave Integer Input
On entry: the size of the workspace rsave, as in d03pdf/​d03pda or d03pjf/​d03pja.
13: 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:
On entry, i=value, xbkpts(i)=value, j=value and xbkpts(j)=value.
Constraint: xbkpts(1)<xbkpts(2)<<xbkpts(nbkpts).
On entry, intpts=value.
Constraint: intpts1.
On entry, itype=value.
Constraint: itype=1 or 2.
On entry, nbkpts=value.
Constraint: nbkpts2.
On entry, npde=value.
Constraint: npde>0.
On entry, npoly=value.
Constraint: npoly>0.
On entry, npts=value, nbkpts=value and npoly=value.
Constraint: npts=(nbkpts-1)×npoly+1.
On entry, i=value, xp(i)=value, j=value and xp(j)=value.
Constraint: xbkpts(1)xp(1)<xp(2)<<xp(intpts)xbkpts(nbkpts).
On entry, itype=2 and at least one interpolation point coincides with a break-point, i.e., interpolation point no value with value value is close to break-point value with value value.
Extrapolation is not allowed.
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.
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.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

See the documents for d03pdf/​d03pda or d03pjf/​d03pja.

8 Parallelism and Performance

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

9 Further Comments


10 Example

See d03pdf/​d03pda.