V3FIT
ezspline_isgridregular.f90
1 !/////
2 ! R8 !
3 !/////
4  subroutine ezspline_isgridregular1_r8(spline_o, ier)
5  use ezspline_obj
6  implicit none
7  type(EZspline1_r8) :: spline_o
8  ! ier:
9  ! 14=x1 grid is not strictly increasing
10  integer, intent(out) :: ier
11  integer i
12 
13  ier = 0
14  do i=1, spline_o%n1-1
15  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
16  ier = 14
17  return
18  endif
19  enddo
20 
21  end subroutine ezspline_isgridregular1_r8
22 
23  subroutine ezspline_isgridregular2_r8(spline_o, ier)
24  use ezspline_obj
25  implicit none
26  type(EZspline2_r8) :: spline_o
27  ! ier:
28  ! 14=x1 grid is not strictly increasing
29  ! 15=x2 grid is not strictly increasing
30  integer, intent(out) :: ier
31  integer i
32 
33  ier = 0
34  do i=1, spline_o%n1-1
35  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
36  ier = 14
37  return
38  endif
39  enddo
40  do i=1, spline_o%n2-1
41  if(spline_o%x2(i+1) <= spline_o%x2(i)) then
42  ier = 15
43  return
44  endif
45  enddo
46 
47  end subroutine ezspline_isgridregular2_r8
48 
49 
50  subroutine ezspline_isgridregular3_r8(spline_o, ier)
51  use ezspline_obj
52  implicit none
53  type(EZspline3_r8) :: spline_o
54  ! ier:
55  ! 14=x1 grid is not strictly increasing
56  ! 15=x2 grid is not strictly increasing
57  ! 16=x3 grid is not strictly increasing
58  integer, intent(out) :: ier
59  integer i
60 
61  ier = 0
62  do i=1, spline_o%n1-1
63  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
64  ier = 14
65  return
66  endif
67  enddo
68  do i=1, spline_o%n2-1
69  if(spline_o%x2(i+1) <= spline_o%x2(i)) then
70  ier = 15
71  return
72  endif
73  enddo
74  do i=1, spline_o%n3-1
75  if(spline_o%x3(i+1) <= spline_o%x3(i)) then
76  ier = 16
77  return
78  endif
79  enddo
80 
81  end subroutine ezspline_isgridregular3_r8
82 !/////
83 ! R4 !
84 !/////
85  subroutine ezspline_isgridregular1_r4(spline_o, ier)
86  use ezspline_obj
87  implicit none
88  type(EZspline1_r4) :: spline_o
89  ! ier:
90  ! 14=x1 grid is not strictly increasing
91  integer, intent(out) :: ier
92  integer i
93 
94  ier = 0
95  do i=1, spline_o%n1-1
96  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
97  ier = 14
98  return
99  endif
100  enddo
101 
102  end subroutine ezspline_isgridregular1_r4
103 
104  subroutine ezspline_isgridregular2_r4(spline_o, ier)
105  use ezspline_obj
106  implicit none
107  type(EZspline2_r4) :: spline_o
108  ! ier:
109  ! 14=x1 grid is not strictly increasing
110  ! 15=x2 grid is not strictly increasing
111  integer, intent(out) :: ier
112  integer i
113 
114  ier = 0
115  do i=1, spline_o%n1-1
116  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
117  ier = 14
118  return
119  endif
120  enddo
121  do i=1, spline_o%n2-1
122  if(spline_o%x2(i+1) <= spline_o%x2(i)) then
123  ier = 15
124  return
125  endif
126  enddo
127 
128  end subroutine ezspline_isgridregular2_r4
129 
130 
131  subroutine ezspline_isgridregular3_r4(spline_o, ier)
132  use ezspline_obj
133  implicit none
134  type(EZspline3_r4) :: spline_o
135  ! ier:
136  ! 14=x1 grid is not strictly increasing
137  ! 15=x2 grid is not strictly increasing
138  ! 16=x3 grid is not strictly increasing
139  integer, intent(out) :: ier
140  integer i
141 
142  ier = 0
143  do i=1, spline_o%n1-1
144  if(spline_o%x1(i+1) <= spline_o%x1(i)) then
145  ier = 14
146  return
147  endif
148  enddo
149  do i=1, spline_o%n2-1
150  if(spline_o%x2(i+1) <= spline_o%x2(i)) then
151  ier = 15
152  return
153  endif
154  enddo
155  do i=1, spline_o%n3-1
156  if(spline_o%x3(i+1) <= spline_o%x3(i)) then
157  ier = 16
158  return
159  endif
160  enddo
161 
162  end subroutine ezspline_isgridregular3_r4