About News Download Benchmark Documentation FAQ Links

Fortran 77 interface

The Fortran 77 wrappers provide a very similar interface to the einspline library as in C, with a few exceptions:
Boundary condition type Code Meaning
PERIODIC 0 Use periodic boundary conditions. The value, first derivative and second derivative at the left boundary match those at the right boundary.
DERIV1 1 The value of the first derivative is specified in lVal or rVal.
DERIV2 2 The value of the second derivative is specified in lVal or rVal.
FLAT 3 The value of the first derivative is set to zero at the boundary.
NATURAL 4 The value of the second derivative is set to zero at the boundary.
ANTIPERIODIC 5 Use anti-periodic boundary conditions. The value, first derivative and second derivative at the left boundary are the negative of those at the right boundary.
Please see the documentation for the C routines for more information. The subroutine names and parameters are given below:

Uniform spline creation routines

One-dimensional:

Single-precision real

SUBROUTINE FCREATE_UBSPLINE_1D_S (x0, x1, num_x, x0_code, x0_val, x1_code, x1_val, data, spline)
Argument Intent Type Description
x0 IN REAL*8 First grid point
x1 IN REAL*8 Last grid point
num_x IN INTEGER # of grid points
x0_code IN INTEGER Left BC type
x0_val IN REAL*4 Left BC value
x1_code IN INTEGER Right BC type
x1_val IN REAL*4 Right BC value
data IN REAL*4 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision real

SUBROUTINE FCREATE_UBSPLINE_1D_D (x0, x1, num_x, x0_code, x0_val, x1_code, x1_val, data, spline)
Argument Intent Type Description
x0 IN REAL*8 First grid point
x1 IN REAL*8 Last grid point
num_x IN INTEGER # of grid points
x0_code IN INTEGER Left BC type
x0_val IN REAL*8 Left BC value
x1_code IN INTEGER Right BC type
x1_val IN REAL*8 Right BC value
data IN REAL*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Single-precision complex

SUBROUTINE FCREATE_UBSPLINE_1D_C (x0, x1, num_x, x0_code, x0_val, x1_code, x1_val, data, spline)
Argument Intent Type Description
x0 IN REAL*8 First grid point
x1 IN REAL*8 Last grid point
num_x IN INTEGER # of grid points
x0_code IN INTEGER Left BC type
x0_val IN COMPLEX*8 Left BC value
x1_code IN INTEGER Right BC type
x1_val IN COMPLEX*8 Right BC value
data IN COMPLEX*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision complex

SUBROUTINE FCREATE_UBSPLINE_1D_Z (x0, x1, num_x, x0_code, x0_val, x1_code, x1_val, data, spline)
Argument Intent Type Description
x0 IN REAL*8 First grid point
x1 IN REAL*8 Last grid point
num_x IN INTEGER # of grid points
x0_code IN INTEGER Left BC type
x0_val IN COMPLEX*16 Left BC value
x1_code IN INTEGER Right BC type
x1_val IN COMPLEX*16 Right BC value
data IN COMPLEX*16 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Two-dimensional:

Single-precision real

SUBROUTINE FCREATE_UBSPLINE_2D_S (x0, x1, num_x, y0, y1, num_y, 
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
x0_code IN INTEGER Left x BC type
x0_val IN REAL*4 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN REAL*4 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN REAL*4 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN REAL*4 Right y BC value
data IN REAL*4 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision real

SUBROUTINE FCREATE_UBSPLINE_2D_D (x0, x1, num_x, y0, y1, num_y, 
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
x0_code IN INTEGER Left x BC type
x0_val IN REAL*8 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN REAL*8 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN REAL*8 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN REAL*8 Right y BC value
data IN REAL*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Single-precision complex

SUBROUTINE FCREATE_UBSPLINE_2D_C (x0, x1, num_x, y0, y1, num_y, 
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
x0_code IN INTEGER Left x BC type
x0_val IN COMPLEX*8 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN COMPLEX*8 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN COMPLEX*8 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN COMPLEX*8 Right y BC value
data IN COMPLEX*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision complex

SUBROUTINE FCREATE_UBSPLINE_2D_Z (x0, x1, num_x, y0, y1, num_y, 
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
x0_code IN INTEGER Left x BC type
x0_val IN COMPLEX*16 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN COMPLEX*16 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN COMPLEX*16 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN COMPLEX*16 Right y BC value
data IN COMPLEX*16 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Three-dimensional:

Single-precision real

SUBROUTINE FCREATE_UBSPLINE_3D_S (x0, x1, num_x, y0, y1, num_y, z0, z1, num_z,
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
				  z0_code, z0_val, z1_code, z1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
z0 IN REAL*8 First z grid point
z1 IN REAL*8 Last z grid point
num_z IN INTEGER # of z grid points
x0_code IN INTEGER Left x BC type
x0_val IN REAL*4 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN REAL*4 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN REAL*4 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN REAL*4 Right y BC value
z0_code IN INTEGER Left z BC type
z0_val IN REAL*4 Left z BC value
z1_code IN INTEGER Right z BC type
z1_val IN REAL*4 Right z BC value
data IN REAL*4 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision real

SUBROUTINE FCREATE_UBSPLINE_3D_D (x0, x1, num_x, y0, y1, num_y, z0, z1, num_z,
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
				  z0_code, z0_val, z1_code, z1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
z0 IN REAL*8 First z grid point
z1 IN REAL*8 Last z grid point
num_z IN INTEGER # of z grid points
x0_code IN INTEGER Left x BC type
x0_val IN REAL*8 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN REAL*8 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN REAL*8 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN REAL*8 Right y BC value
z0_code IN INTEGER Left z BC type
z0_val IN REAL*8 Left z BC value
z1_code IN INTEGER Right z BC type
z1_val IN REAL*8 Right z BC value
data IN REAL*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Single-precision complex

SUBROUTINE FCREATE_UBSPLINE_3D_C (x0, x1, num_x, y0, y1, num_y, z0, z1, num_z,
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
				  z0_code, z0_val, z1_code, z1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
z0 IN REAL*8 First z grid point
z1 IN REAL*8 Last z grid point
num_z IN INTEGER # of z grid points
x0_code IN INTEGER Left x BC type
x0_val IN COMPLEX*8 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN COMPLEX*8 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN COMPLEX*8 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN COMPLEX*8 Right y BC value
z0_code IN INTEGER Left z BC type
z0_val IN COMPLEX*8 Left z BC value
z1_code IN INTEGER Right z BC type
z1_val IN COMPLEX*8 Right z BC value
data IN COMPLEX*8 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Double-precision complex

SUBROUTINE FCREATE_UBSPLINE_3D_Z (x0, x1, num_x, y0, y1, num_y, z0, z1, num_z,
                                  x0_code, x0_val, x1_code, x1_val, 
				  y0_code, y0_val, y1_code, y1_val, 
				  z0_code, z0_val, z1_code, z1_val, 
                                  data, spline)
Argument Intent Type Description
x0 IN REAL*8 First x grid point
x1 IN REAL*8 Last x grid point
num_x IN INTEGER # of x grid points
y0 IN REAL*8 First y grid point
y1 IN REAL*8 Last y grid point
num_y IN INTEGER # of y grid points
z0 IN REAL*8 First z grid point
z1 IN REAL*8 Last z grid point
num_z IN INTEGER # of z grid points
x0_code IN INTEGER Left x BC type
x0_val IN COMPLEX*16 Left x BC value
x1_code IN INTEGER Right x BC type
x1_val IN COMPLEX*16 Right x BC value
y0_code IN INTEGER Left y BC type
y0_val IN COMPLEX*16 Left y BC value
y1_code IN INTEGER Right y BC type
y1_val IN COMPLEX*16 Right y BC value
z0_code IN INTEGER Left z BC type
z0_val IN COMPLEX*16 Left z BC value
z1_code IN INTEGER Right z BC type
z1_val IN COMPLEX*16 Right z BC value
data IN COMPLEX*16 Data to interpolate
spline OUT INTEGER*8 Handle for spline object

Spline destruction routine

The following subroutine can be used to deallocate the memory for any Bspline object. Note that in the nonuniform case, the grid objects must be destroyed after the splines that refer to them.

SUBROUTINE FDESTROY_BSPLINE (spline) 
Argument Intent Type Description
spline IN INTEGER*8 Spline object handle

Uniform spline evalulation routines

One-dimensional

SUBROUTINE FEVAL_UBSPLINE_1D_S     (spline, x, val)
SUBROUTINE FEVAL_UBSPLINE_1D_D     (spline, x, val)
SUBROUTINE FEVAL_UBSPLINE_1D_C     (spline, x, val)
SUBROUTINE FEVAL_UBSPLINE_1D_Z     (spline, x, val)

SUBROUTINE FEVAL_UBSPLINE_1D_S_VG  (spline, x, val, grad)
SUBROUTINE FEVAL_UBSPLINE_1D_D_VG  (spline, x, val, grad)
SUBROUTINE FEVAL_UBSPLINE_1D_C_VG  (spline, x, val, grad)
SUBROUTINE FEVAL_UBSPLINE_1D_Z_VG  (spline, x, val, grad)

SUBROUTINE FEVAL_UBSPLINE_1D_S_VGL (spline, x, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_1D_D_VGL (spline, x, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_1D_C_VGL (spline, x, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_1D_Z_VGL (spline, x, val, grad, lapl)

SUBROUTINE FEVAL_UBSPLINE_1D_S_VGH (spline, x, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_1D_D_VGH (spline, x, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_1D_C_VGH (spline, x, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_1D_Z_VGH (spline, x, val, grad, hess)
Argument Intent _S Type _D Type _C Type _Z Type Description
spline IN INTEGER*8 INTEGER*8 INTEGER*8 INTEGER*8 Spline handle
x IN REAL*8 REAL*8 REAL*8 REAL*8 Interpolation position
val OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated value
grad OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated first derivative
lapl OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated second derivative
hess OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated second derivative

Two-dimensional

SUBROUTINE FEVAL_UBSPLINE_2D_S     (spline, x, y, val)
SUBROUTINE FEVAL_UBSPLINE_2D_D     (spline, x, y, val)
SUBROUTINE FEVAL_UBSPLINE_2D_C     (spline, x, y, val)
SUBROUTINE FEVAL_UBSPLINE_2D_Z     (spline, x, y, val)

SUBROUTINE FEVAL_UBSPLINE_2D_S_VG  (spline, x, y, val, grad)
SUBROUTINE FEVAL_UBSPLINE_2D_D_VG  (spline, x, y, val, grad)
SUBROUTINE FEVAL_UBSPLINE_2D_C_VG  (spline, x, y, val, grad)
SUBROUTINE FEVAL_UBSPLINE_2D_Z_VG  (spline, x, y, val, grad)

SUBROUTINE FEVAL_UBSPLINE_2D_S_VGL (spline, x, y, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_2D_D_VGL (spline, x, y, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_2D_C_VGL (spline, x, y, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_2D_Z_VGL (spline, x, y, val, grad, lapl)

SUBROUTINE FEVAL_UBSPLINE_2D_S_VGH (spline, x, y, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_2D_D_VGH (spline, x, y, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_2D_C_VGH (spline, x, y, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_2D_Z_VGH (spline, x, y, val, grad, hess)
Argument Intent _S Type _D Type _C Type _Z Type Description
spline IN INTEGER*8 INTEGER*8 INTEGER*8 INTEGER*8 Spline handle
x IN REAL*8 REAL*8 REAL*8 REAL*8 x coordinate for interpolation
y IN REAL*8 REAL*8 REAL*8 REAL*8 y coordinate for interpolation
val OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated value
grad OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated gradient (2 elements)
lapl OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated Laplacian
hess OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated Hessian (4 elements)

Three-dimensional

SUBROUTINE FEVAL_UBSPLINE_3D_S     (spline, x, y, z, val)
SUBROUTINE FEVAL_UBSPLINE_3D_D     (spline, x, y, z, val)
SUBROUTINE FEVAL_UBSPLINE_3D_C     (spline, x, y, z, val)
SUBROUTINE FEVAL_UBSPLINE_3D_Z     (spline, x, y, z, val)

SUBROUTINE FEVAL_UBSPLINE_3D_S_VG  (spline, x, y, z, val, grad)
SUBROUTINE FEVAL_UBSPLINE_3D_D_VG  (spline, x, y, z, val, grad)
SUBROUTINE FEVAL_UBSPLINE_3D_C_VG  (spline, x, y, z, val, grad)
SUBROUTINE FEVAL_UBSPLINE_3D_Z_VG  (spline, x, y, z, val, grad)

SUBROUTINE FEVAL_UBSPLINE_3D_S_VGL (spline, x, y, z, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_3D_D_VGL (spline, x, y, z, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_3D_C_VGL (spline, x, y, z, val, grad, lapl)
SUBROUTINE FEVAL_UBSPLINE_3D_Z_VGL (spline, x, y, z, val, grad, lapl)

SUBROUTINE FEVAL_UBSPLINE_3D_S_VGH (spline, x, y, z, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_3D_D_VGH (spline, x, y, z, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_3D_C_VGH (spline, x, y, z, val, grad, hess)
SUBROUTINE FEVAL_UBSPLINE_3D_Z_VGH (spline, x, y, z, val, grad, hess)
Argument Intent _S Type _D Type _C Type _Z Type Description
spline IN INTEGER*8 INTEGER*8 INTEGER*8 INTEGER*8 Spline handle
x IN REAL*8 REAL*8 REAL*8 REAL*8 x coordinate for interpolation
y IN REAL*8 REAL*8 REAL*8 REAL*8 y coordinate for interpolation
z IN REAL*8 REAL*8 REAL*8 REAL*8 z coordinate for interpolation
val OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated value
grad OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated gradient (3 elements)
lapl OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated Laplacian
hess OUT REAL*4 REAL*8 COMPLEX*8 COMPLEX*16 Interpolated Hessian (9 elements)


SourceForge.net Logo