Skip to content

Commit 0f9ff2c

Browse files
committed
initial commit
0 parents  commit 0f9ff2c

File tree

174 files changed

+94998
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+94998
-0
lines changed

.DS_Store

14 KB
Binary file not shown.
Binary file not shown.

Hours/.DS_Store

6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Hours/printreceiptPDF.pdf

726 KB
Binary file not shown.

NUCIPL.for

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
2+
subroutine interp(nsize,x,y,xval,yval)
3+
4+
5+
!-------linkages.
6+
7+
! called by - []
8+
! calls - [subroutine] polint
9+
! [function] indpolint
10+
11+
!-------remarks.
12+
13+
! Subroutine to interpolate on input arrays
14+
15+
16+
implicit none
17+
18+
19+
!-------throughput variables.
20+
21+
integer, parameter nsize !size of input arrays
22+
real, dimension(nsize) x !input x values
23+
real, dimension(nsize) y !input y values
24+
real xval !input x value
25+
real yval !interpolated y value
26+
27+
28+
!-------local variables.
29+
30+
integer, parameter ordpolint = 5
31+
integer j, nintpl
32+
real errory !error used in evaluating polint
33+
34+
35+
!-------procedure.
36+
37+
38+
!-------interpolated values.
39+
40+
41+
j = indpolint(nsize,x,xval,ordpolint)
42+
nintpl = ordpolint + 1
43+
call polint(nintpl,x(j:j+ordpolint),y(j:j+ordpolint),
44+
a xval,yval,errory)
45+
46+
47+
return
48+
49+
50+
end subroutine interp
51+
52+
53+
!-----------------------------------------------------------
54+
55+
subroutine polint(nintpl,xa,ya,x,y,dy)
56+
57+
!-------linkages.
58+
59+
! called by - [subroutine] interp
60+
! calls - none
61+
62+
63+
!-------remarks.
64+
65+
! Performs polynomial interpolation using input points.
66+
! Maximum order: 9
67+
68+
69+
implicit none
70+
71+
72+
!-------throughput variables.
73+
74+
integer, parameter nintpl !size of input arrays
75+
real xa(nsize) !input x array
76+
real ya(nsize) !input y array
77+
real x !input x value
78+
real y !output y value
79+
real dy !error in y
80+
81+
82+
!-------local variables.
83+
84+
integer i,m,ns,n !indicies
85+
real dif, dift !differences between x and xa(i)
86+
real ho, hp, w, den !quantities for c and d
87+
88+
real c(10) !coefficients for interp
89+
real d(10) !coefficients for interp
90+
91+
92+
!-------procedure.
93+
94+
n = nintpl
95+
96+
ns = 1
97+
dif = abs(x - xa(1))
98+
do i=1,n
99+
dift = abs(x - xa(i))
100+
if (dift.lt.dif) then
101+
ns = i
102+
dif = dift
103+
end if
104+
c(i) = ya(i)
105+
d(i) = ya(i)
106+
end do
107+
108+
y = ya(ns)
109+
ns = ns - 1
110+
do m=1,n-1
111+
do i=1,n-m
112+
ho = xa(i) - x
113+
hp = xa(i+m) - x
114+
w = c(i+1) - d(i)
115+
den = ho - hp
116+
den = w/den
117+
c(i) = ho*den
118+
d(i) = hp*den
119+
end do
120+
if ((2*ns).lt.(n-m)) then
121+
dy = c(ns + 1)
122+
else
123+
dy = d(ns)
124+
ns = ns - 1
125+
end if
126+
y = y + dy
127+
end do
128+
129+
130+
return
131+
132+
133+
end subroutine polint
134+
135+
136+
!-----------------------------------------------------------
137+
138+
integer function indpolint(nsize,xa,x,ord)
139+
140+
141+
!-------linkages.
142+
143+
! called by - [subroutine] interp
144+
! calls - [none]
145+
146+
147+
!-------remarks.
148+
149+
! Finds the index needed for the interpolating arrays of polint.
150+
! Uses bisection method.
151+
152+
153+
implicit none
154+
155+
156+
!-------throughput variables.
157+
158+
integer, parameter nsize !size of input array
159+
real xa(nsize) !abscissas
160+
real x !input x value
161+
integer ord !order of interpolating polynomial
162+
163+
164+
!-------local variables.
165+
166+
integer i, n !indices
167+
integer jl, jm, ju !indicies
168+
169+
170+
!-------procedure
171+
172+
n = nsize
173+
174+
jl = 0
175+
ju = n + 1
176+
177+
do i=1,n
178+
if ((ju-jl).eq.1) exit
179+
jm = (ju + jl)/2
180+
if ((xa(n).ge.xa(1)).eqv.(x.ge.xa(jm))) then
181+
jl = jm
182+
else
183+
ju = jm
184+
end if
185+
end do !i
186+
187+
if (jl.lt.(1 + ord/2)) then
188+
indpolint = 1
189+
else if (jl.gt.(n - 1 - ord/2)) then
190+
indpolint = n - ord
191+
else
192+
indpolint = jl - ord/2
193+
end if
194+
195+
196+
return
197+
198+
199+
end function indpolint

NUC_codes/.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

NUC_codes/.idea/NUC_codes.iml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

NUC_codes/.idea/misc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

NUC_codes/.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

NUC_codes/.idea/runConfigurations.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)