Skip to content

Commit 7d77475

Browse files
committed
Added new error codes, and printing of all error messages to the error_unit. Fixes #1.
1 parent b8db4a7 commit 7d77475

File tree

2 files changed

+436
-209
lines changed

2 files changed

+436
-209
lines changed

src/bspline_module.f90

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,72 @@
66
!
77
! Multidimensional (2D-6D) B-Spline interpolation of data on a regular grid.
88
! This module uses both the subroutine and object-oriented modules.
9+
!
10+
!# iflag Codes
11+
!
12+
! The following are the `iflag` codes that can be issued by the various
13+
! routines. They are divided into the initialize routines
14+
! (e.g., [[db1ink]], [[db2ink]], etc.)
15+
! and the evaluate routines (e.g., [[db1val]], [[db2val]], etc.).
16+
!
17+
!## Initialize Routines
18+
!```
19+
!db*ink 1: successful execution.
20+
! 2: iflag out of range
21+
! 3: nx out of range
22+
! 4: kx out of range
23+
! 5: x not strictly increasing
24+
! 6: tx not non-decreasing
25+
! 7: ny out of range
26+
! 8: ky out of range
27+
! 9: y not strictly increasing
28+
! 10: ty not non-decreasing
29+
! 11: nz out of range
30+
! 12: kz out of range
31+
! 13: z not strictly increasing
32+
! 14: tz not non-decreasing
33+
! 15: nq out of range
34+
! 16: kq out of range
35+
! 17: q not strictly increasing
36+
! 18: tq not non-decreasing
37+
! 19: nr out of range
38+
! 20: kr out of range
39+
! 21: r not strictly increasing
40+
! 22: tr not non-decreasing
41+
!
42+
!dbintk 100: k does not satisfy k>=1
43+
! 101: n does not satisfy n>=k
44+
! 102: x(i) does not satisfy x(i)<x(i+1) for some i
45+
! 103: some abscissa was not in the support of the
46+
! corresponding basis function and the system is singular
47+
! 104: the system of solver detects a singular system
48+
! although the theoretical conditions for a solution were satisfied
49+
!
50+
!dbspvn 201: k does not satisfy k>=1
51+
! 202: jhigh does not satisfy 1<=jhigh<=k
52+
! 203: index is not 1 or 2
53+
! 204: x does not satisfy t(ileft)<=x<=t(ileft+1)
54+
!
55+
!dbtpcf 301: n should be >0
56+
!```
57+
!
58+
!## Evaluate Routines
59+
!```
60+
!db*val 0: successful execution
61+
! 1: x value out of bounds
62+
! 2: y value out of bounds
63+
! 3: z value out of bounds
64+
! 4: q value out of bounds
65+
! 5: r value out of bounds
66+
! 6: s value out of bounds
67+
!
68+
!dbvalu 401: k does not satisfy k>=1
69+
! 402: n does not satisfy n>=k
70+
! 403: ideriv does not satisfy 0<=ideriv<k
71+
! 404: x is not greater than or equal to t(k)
72+
! 405: x is not less than or equal to t(n+1)
73+
! 406: a left limiting value cannot be obtained at t(k)
74+
!```
975

1076
module bspline_module
1177

0 commit comments

Comments
 (0)