]>
Commit | Line | Data |
---|---|---|
0caf84a5 | 1 | ! -*- F90 -*- |
2 | ||
3 | ||
4 | subroutine MRSTevolve(x,Q,pdf) | |
5 | implicit real*8(a-h,o-z) | |
6 | include 'parmsetup.inc' | |
7 | character*16 name(nmxset) | |
8 | character*80 line | |
9 | character*512 setpath | |
10 | integer nmem(nmxset),ndef(nmxset),mmem | |
11 | ! integer member(nmxset) | |
12 | integer nset,iset | |
13 | common/NAME/name,nmem,ndef,mmem | |
14 | parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26, & | |
15 | &nhess=0) | |
16 | real*8 pdf(-6:6) | |
17 | real*8 f1(nx,nq) & | |
18 | &,f2(nx,nq) & | |
19 | &,f3(nx,nq) & | |
20 | &,f4(nx,nq) & | |
21 | &,f5(nx,nq) & | |
22 | &,f6(nx,nq) & | |
23 | &,f7(nx,nq) & | |
24 | &,f8(nx,nq) & | |
25 | &,fc(nx,nqc),fb(nx,nqb) | |
26 | real*8 qq(nq),xx(nx), & | |
27 | &cc1(0:nhess,nx,nq,4,4,nmxset),cc2(0:nhess,nx,nq,4,4,nmxset), & | |
28 | &cc3(0:nhess,nx,nq,4,4,nmxset),cc4(0:nhess,nx,nq,4,4,nmxset), & | |
29 | &cc6(0:nhess,nx,nq,4,4,nmxset),cc8(0:nhess,nx,nq,4,4,nmxset), & | |
30 | &ccc(0:nhess,nx,nqc,4,4,nmxset),ccb(0:nhess,nx,nqb,4,4,nmxset) | |
31 | real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb) | |
32 | data xx/1d-5,2d-5,4d-5,6d-5,8d-5, & | |
33 | & 1d-4,2d-4,4d-4,6d-4,8d-4, & | |
34 | & 1d-3,2d-3,4d-3,6d-3,8d-3, & | |
35 | & 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2, & | |
36 | & .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0, & | |
37 | & .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0, & | |
38 | & .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0, & | |
39 | & .8d0,.9d0,1d0/ | |
40 | data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1, & | |
41 | & 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2, & | |
42 | & 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4, & | |
43 | & 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6, & | |
44 | & 1.8d6,3.2d6,5.6d6,1d7/ | |
45 | data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/ | |
46 | save | |
47 | ||
48 | xsave=x | |
49 | qsq = q*q | |
50 | q2save=qsq | |
51 | ||
52 | xlog=dlog(x) | |
53 | qsqlog=dlog(qsq) | |
54 | ||
55 | call getnset(iset) | |
56 | ! imem=member(iset) | |
57 | call getnmem(iset,imem) | |
58 | ||
59 | ! G.W. 24/04/2008 | |
60 | if (qsq.lt.qsqmin) then | |
61 | qsqlog=dlog(1.01D0*qsqmin) | |
62 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
63 | & cc1(0,1,1,1,1,iset),upv1) | |
64 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
65 | & cc2(0,1,1,1,1,iset),dnv1) | |
66 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
67 | & cc3(0,1,1,1,1,iset),glu1) | |
68 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
69 | & cc4(0,1,1,1,1,iset),usea1) | |
70 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
71 | & cc6(0,1,1,1,1,iset),str1) | |
72 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
73 | & cc8(0,1,1,1,1,iset),dsea1) | |
74 | qsqlog=dlog(qsqmin) | |
75 | end if | |
76 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
77 | &cc1(0,1,1,1,1,iset),upv) | |
78 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
79 | &cc2(0,1,1,1,1,iset),dnv) | |
80 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
81 | &cc3(0,1,1,1,1,iset),glu) | |
82 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
83 | &cc4(0,1,1,1,1,iset),usea) | |
84 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
85 | &cc6(0,1,1,1,1,iset),str) | |
86 | call jeppe2(0,xlog,qsqlog,nx,nq,xxl,qql, & | |
87 | &cc8(0,1,1,1,1,iset),dsea) | |
88 | ! G.W. 24/04/2008 | |
89 | if (qsq.lt.qsqmin) then | |
90 | !-- Calculate the anomalous dimension, dlog(xf)/dlog(qsq), | |
91 | !-- evaluated at qsqmin. Then extrapolate the PDFs to low | |
92 | !-- qsq < qsqmin by interpolating the anomalous dimenion between | |
93 | !-- the value at qsqmin and a value of 1 for qsq << qsqmin. | |
94 | !-- If value of PDF at qsqmin is very small, just set | |
95 | !-- anomalous dimension to 1 to prevent rounding errors. | |
96 | anom = (upv1-upv)/upv/0.01D0 | |
97 | if (abs(upv).lt.1.D-4) anom = 1.D0 | |
98 | upv = upv*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
99 | anom = (dnv1-dnv)/dnv/0.01D0 | |
100 | if (abs(dnv).lt.1.D-4) anom = 1.D0 | |
101 | dnv = dnv*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
102 | anom = (glu1-glu)/glu/0.01D0 | |
103 | if (abs(glu).lt.1.D-4) anom = 1.D0 | |
104 | glu = glu*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
105 | anom = (usea1-usea)/usea/0.01D0 | |
106 | if (abs(usea).lt.1.D-4) anom = 1.D0 | |
107 | usea = usea*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
108 | anom = (str1-str)/str/0.01D0 | |
109 | if (abs(str).lt.1.D-4) anom = 1.D0 | |
110 | str = str*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
111 | anom = (dsea1-dsea)/dsea/0.01D0 | |
112 | if (abs(dsea).lt.1.D-4) anom = 1.D0 | |
113 | dsea = dsea*(qsq/qsqmin)**(anom*qsq/qsqmin+1.D0-qsq/qsqmin) | |
114 | end if | |
115 | ||
116 | ||
117 | ||
118 | chm=0.d0 | |
119 | if(qsq.gt.emc2) then | |
120 | call jeppe2(0,xlog,qsqlog,nx,nqc,xxl,qqlc, & | |
121 | &ccc(0,1,1,1,1,iset),chm) | |
122 | endif | |
123 | ||
124 | bot=0.d0 | |
125 | if(qsq.gt.emb2) then | |
126 | call jeppe2(0,xlog,qsqlog,nx,nqb,xxl,qqlb, & | |
127 | &ccb(0,1,1,1,1,iset),bot) | |
128 | endif | |
129 | ||
130 | pdf(0) = glu | |
131 | pdf(1) = dnv+dsea | |
132 | pdf(-1) = dsea | |
133 | pdf(2) = upv+usea | |
134 | pdf(-2) = usea | |
135 | pdf(3) = str | |
136 | pdf(-3) = str | |
137 | pdf(4) = chm | |
138 | pdf(-4) = chm | |
139 | pdf(5) = bot | |
140 | pdf(-5) = bot | |
141 | pdf(6) = 0.0d0 | |
142 | pdf(-6) = 0.0d0 | |
143 | ||
144 | x=xsave | |
145 | qsq=q2save | |
146 | return | |
147 | ! | |
148 | entry MRSTread(nset) | |
149 | ! - dummy read in to get to End: (stream 1 is still open) | |
150 | read(1,*)nmem(nset),ndef(nset) | |
151 | ||
152 | do i=0,nmem(nset) | |
153 | do n=1,nx-1 | |
154 | do m=1,nq | |
155 | read(1,'(a)'),line | |
156 | enddo | |
157 | enddo | |
158 | enddo | |
159 | ||
160 | do n=1,nx | |
161 | xxl(n)=dlog(xx(n)) | |
162 | enddo | |
163 | do m=1,nq | |
164 | qql(m)=dlog(qq(m)) | |
165 | enddo | |
166 | return | |
167 | ! | |
168 | ||
169 | entry MRSTalfa(nflav,alfas,Qalfa) | |
170 | call getnset(iset) | |
171 | ! mem = member(iset) | |
172 | ! call setnmem(member(iset)) | |
173 | call alphamrs(nflav,alfas,Qalfa) | |
174 | return | |
175 | ! | |
176 | entry MRSTinit(Eorder,Q2fit) | |
177 | return | |
178 | ! | |
179 | entry MRSTpdf(mem) | |
180 | ! if(mem.eq.0) mem=ndef | |
181 | ! imem = mem | |
182 | call getnset(iset) | |
183 | ! member(iset)=mem | |
184 | call setnmem(iset,mem) | |
185 | ||
186 | ! have to reopen stream 1 | |
187 | call getsetpath(setpath) | |
188 | open(1,file=setpath(1:len_trim(setpath))) | |
189 | line = '' | |
190 | do while (line(2:11).ne.'Evolution:') | |
191 | read(1,'(a)'),line | |
192 | enddo | |
193 | read(1,'(a)'),line | |
194 | read(1,'(a)'),line | |
195 | ||
196 | read(1,*)nmem(iset),ndef(iset) | |
197 | ||
198 | ! - dummy read up to the member requested | |
199 | do i=0,mem-1 | |
200 | do n=1,nx-1 | |
201 | do m=1,nq | |
202 | read(1,'(a)')line | |
203 | enddo | |
204 | enddo | |
205 | enddo | |
206 | ||
207 | ||
208 | !- read in the data of the requested member | |
209 | do 20 n=1,nx-1 | |
210 | do 20 m=1,nq | |
211 | read(1,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m), & | |
212 | & f5(n,m),f7(n,m),f6(n,m),f8(n,m) | |
213 | ! notation: 1=uval 2=val 3=glue 4=usea 5=chm 6=str 7=btm 8=dsea | |
214 | 20 continue | |
215 | ! write(*,*)'PDF set ',nm,' first element ',f1(1,1) | |
216 | ||
217 | do 40 m=1,nq | |
218 | f1(nx,m)=0.d0 | |
219 | f2(nx,m)=0.d0 | |
220 | f3(nx,m)=0.d0 | |
221 | f4(nx,m)=0.d0 | |
222 | f5(nx,m)=0.d0 | |
223 | f6(nx,m)=0.d0 | |
224 | f7(nx,m)=0.d0 | |
225 | f8(nx,m)=0.d0 | |
226 | 40 continue | |
227 | ||
228 | call jeppe1(0,nx,nq,xxl,qql,f1,cc1(0,1,1,1,1,iset)) | |
229 | call jeppe1(0,nx,nq,xxl,qql,f2,cc2(0,1,1,1,1,iset)) | |
230 | call jeppe1(0,nx,nq,xxl,qql,f3,cc3(0,1,1,1,1,iset)) | |
231 | call jeppe1(0,nx,nq,xxl,qql,f4,cc4(0,1,1,1,1,iset)) | |
232 | call jeppe1(0,nx,nq,xxl,qql,f6,cc6(0,1,1,1,1,iset)) | |
233 | call jeppe1(0,nx,nq,xxl,qql,f8,cc8(0,1,1,1,1,iset)) | |
234 | ||
235 | emc2=2.045 | |
236 | emb2=18.5 | |
237 | ||
238 | do 44 m=1,nqc | |
239 | qqlc(m)=qql(m+nqc0) | |
240 | do 44 n=1,nx | |
241 | fc(n,m)=f5(n,m+nqc0) | |
242 | 44 continue | |
243 | qqlc(1)=dlog(emc2) | |
244 | call jeppe1(0,nx,nqc,xxl,qqlc,fc,ccc(0,1,1,1,1,iset)) | |
245 | ||
246 | do 45 m=1,nqb | |
247 | qqlb(m)=qql(m+nqb0) | |
248 | do 45 n=1,nx | |
249 | fb(n,m)=f7(n,m+nqb0) | |
250 | 45 continue | |
251 | qqlb(1)=dlog(emb2) | |
252 | call jeppe1(0,nx,nqb,xxl,qqlb,fb,ccb(0,1,1,1,1,iset)) | |
253 | ||
254 | close(1) | |
255 | 50 format(8f10.5) | |
256 | ||
257 | ||
258 | return | |
259 | ! | |
260 | END | |
261 | ||
262 | subroutine jeppe1(imem,nx,my,xx,yy,ff,cc) | |
263 | implicit real*8(a-h,o-z) | |
264 | parameter(nnx=49,mmy=37,nhess=0) | |
265 | dimension xx(nx),yy(my),ff(nnx,mmy), & | |
266 | &ff1(nnx,mmy),ff2(nnx,mmy), & | |
267 | &ff12(nnx,mmy),yy0(4),yy1(4),yy2(4),yy12(4),z(16),wt(16,16), & | |
268 | &cl(16),cc(0:nhess,nx,my,4,4),iwt(16,16) | |
269 | ||
270 | data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, & | |
271 | & 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, & | |
272 | & -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0, & | |
273 | & 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0, & | |
274 | & 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, & | |
275 | & 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, & | |
276 | & 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1, & | |
277 | & 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1, & | |
278 | & -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0, & | |
279 | & 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0, & | |
280 | & 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2, & | |
281 | & -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2, & | |
282 | & 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0, & | |
283 | & 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0, & | |
284 | & -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1, & | |
285 | & 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/ | |
286 | ||
287 | ||
288 | do 42 m=1,my | |
289 | dx=xx(2)-xx(1) | |
290 | ff1(1,m)=(ff(2,m)-ff(1,m))/dx | |
291 | dx=xx(nx)-xx(nx-1) | |
292 | ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx | |
293 | do 41 n=2,nx-1 | |
294 | ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m), & | |
295 | &ff(n+1,m)) | |
296 | 41 continue | |
297 | 42 continue | |
298 | ||
299 | do 44 n=1,nx | |
300 | dy=yy(2)-yy(1) | |
301 | ff2(n,1)=(ff(n,2)-ff(n,1))/dy | |
302 | dy=yy(my)-yy(my-1) | |
303 | ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy | |
304 | do 43 m=2,my-1 | |
305 | ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m), & | |
306 | &ff(n,m+1)) | |
307 | 43 continue | |
308 | 44 continue | |
309 | ||
310 | do 46 m=1,my | |
311 | dx=xx(2)-xx(1) | |
312 | ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx | |
313 | dx=xx(nx)-xx(nx-1) | |
314 | ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx | |
315 | do 45 n=2,nx-1 | |
316 | ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m), & | |
317 | &ff2(n+1,m)) | |
318 | 45 continue | |
319 | 46 continue | |
320 | ||
321 | do 53 n=1,nx-1 | |
322 | do 52 m=1,my-1 | |
323 | d1=xx(n+1)-xx(n) | |
324 | d2=yy(m+1)-yy(m) | |
325 | d1d2=d1*d2 | |
326 | ||
327 | yy0(1)=ff(n,m) | |
328 | yy0(2)=ff(n+1,m) | |
329 | yy0(3)=ff(n+1,m+1) | |
330 | yy0(4)=ff(n,m+1) | |
331 | ||
332 | yy1(1)=ff1(n,m) | |
333 | yy1(2)=ff1(n+1,m) | |
334 | yy1(3)=ff1(n+1,m+1) | |
335 | yy1(4)=ff1(n,m+1) | |
336 | ||
337 | yy2(1)=ff2(n,m) | |
338 | yy2(2)=ff2(n+1,m) | |
339 | yy2(3)=ff2(n+1,m+1) | |
340 | yy2(4)=ff2(n,m+1) | |
341 | ||
342 | yy12(1)=ff12(n,m) | |
343 | yy12(2)=ff12(n+1,m) | |
344 | yy12(3)=ff12(n+1,m+1) | |
345 | yy12(4)=ff12(n,m+1) | |
346 | ||
347 | do 47 k=1,4 | |
348 | z(k)=yy0(k) | |
349 | z(k+4)=yy1(k)*d1 | |
350 | z(k+8)=yy2(k)*d2 | |
351 | z(k+12)=yy12(k)*d1d2 | |
352 | 47 continue | |
353 | ||
354 | do 49 l=1,16 | |
355 | xxd=0. | |
356 | do 48 k=1,16 | |
357 | xxd=xxd+iwt(k,l)*z(k) | |
358 | 48 continue | |
359 | cl(l)=xxd | |
360 | 49 continue | |
361 | l=0 | |
362 | do 51 k=1,4 | |
363 | do 50 j=1,4 | |
364 | l=l+1 | |
365 | cc(imem,n,m,k,j)=cl(l) | |
366 | 50 continue | |
367 | 51 continue | |
368 | 52 continue | |
369 | 53 continue | |
370 | return | |
371 | END | |
372 | ||
373 | subroutine jeppe2(i,x,y,nx,my,xx,yy,cc,z) | |
374 | !-- G.W. 02/07/2007 Allow extrapolation to small x and large q. | |
375 | implicit real*8(a-h,o-z) | |
376 | parameter(nhess=0) | |
377 | dimension xx(nx),yy(my),cc(0:nhess,nx,my,4,4) | |
378 | ||
379 | n=locx(xx,nx,x) | |
380 | m=locx(yy,my,y) | |
381 | ||
382 | if (n.gt.0.and.n.lt.nx.and.m.gt.0.and.m.lt.my) then | |
383 | !-- Do usual interpolation. | |
384 | t=(x-xx(n))/(xx(n+1)-xx(n)) | |
385 | u=(y-yy(m))/(yy(m+1)-yy(m)) | |
386 | z=0.d0 | |
387 | do l=4,1,-1 | |
388 | z=t*z+((cc(i,n,m,l,4)*u+cc(i,n,m,l,3))*u & | |
389 | & +cc(i,n,m,l,2))*u+cc(i,n,m,l,1) | |
390 | enddo | |
391 | ||
392 | else if (n.eq.0.and.m.gt.0.and.m.lt.my) then | |
393 | !-- Extrapolate to small x. | |
394 | call jeppe3(i,xx(1),y,nx,my,xx,yy,cc,f0) | |
395 | call jeppe3(i,xx(2),y,nx,my,xx,yy,cc,f1) | |
396 | if (f0.gt.0.d0.and.f1.gt.0.d0) then | |
397 | z = exp(log(f0)+(log(f1)-log(f0))/(xx(2)-xx(1))*(x-xx(1))) | |
398 | else | |
399 | z = f0+(f1-f0)/(xx(2)-xx(1))*(x-xx(1)) | |
400 | end if | |
401 | ||
402 | else if (n.gt.0.and.m.eq.my) then | |
403 | !-- Extrapolate to large q. | |
404 | call jeppe3(i,x,yy(my),nx,my,xx,yy,cc,f0) | |
405 | call jeppe3(i,x,yy(my-1),nx,my,xx,yy,cc,f1) | |
406 | if (f0.gt.0.d0.and.f1.gt.0.d0) then | |
407 | z = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))* & | |
408 | & (y-yy(my))) | |
409 | else | |
410 | z = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my)) | |
411 | end if | |
412 | ||
413 | else if (n.eq.0.and.m.eq.my) then | |
414 | !-- Extrapolate to small x AND large q. | |
415 | call jeppe3(i,xx(1),yy(my),nx,my,xx,yy,cc,f0) | |
416 | call jeppe3(i,xx(1),yy(my-1),nx,my,xx,yy,cc,f1) | |
417 | if (f0.gt.0.d0.and.f1.gt.0.d0) then | |
418 | z0 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))* & | |
419 | & (y-yy(my))) | |
420 | else | |
421 | z0 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my)) | |
422 | end if | |
423 | call jeppe3(i,xx(2),yy(my),nx,my,xx,yy,cc,f0) | |
424 | call jeppe3(i,xx(2),yy(my-1),nx,my,xx,yy,cc,f1) | |
425 | if (f0.gt.0.d0.and.f1.gt.0.d0) then | |
426 | z1 = exp(log(f0)+(log(f0)-log(f1))/(yy(my)-yy(my-1))* & | |
427 | & (y-yy(my))) | |
428 | else | |
429 | z1 = f0+(f0-f1)/(yy(my)-yy(my-1))*(y-yy(my)) | |
430 | end if | |
431 | if (z0.gt.0.d0.and.z1.gt.0.d0) then | |
432 | z = exp(log(z0)+(log(z1)-log(z0))/(xx(2)-xx(1))*(x-xx(1))) | |
433 | else | |
434 | z = z0+(z1-z0)/(xx(2)-xx(1))*(x-xx(1)) | |
435 | end if | |
436 | ||
437 | else | |
438 | !-- Set parton distribution to zero otherwise. | |
439 | z = 0.d0 | |
440 | ||
441 | end if | |
442 | ||
443 | return | |
444 | END | |
445 | ||
446 | !-- G.W. 02/07/2007 Copy of the original jeppe2, | |
447 | !-- only used for extrapolation. | |
448 | subroutine jeppe3(i,x,y,nx,my,xx,yy,cc,z) | |
449 | implicit real*8(a-h,o-z) | |
450 | parameter(nhess=0) | |
451 | dimension xx(nx),yy(my),cc(0:nhess,nx,my,4,4) | |
452 | n=locx(xx,nx,x) | |
453 | m=locx(yy,my,y) | |
454 | t=(x-xx(n))/(xx(n+1)-xx(n)) | |
455 | u=(y-yy(m))/(yy(m+1)-yy(m)) | |
456 | z=0.d0 | |
457 | do l=4,1,-1 | |
458 | z=t*z+((cc(i,n,m,l,4)*u+cc(i,n,m,l,3))*u & | |
459 | & +cc(i,n,m,l,2))*u+cc(i,n,m,l,1) | |
460 | enddo | |
461 | return | |
462 | END | |
463 | ||
464 | integer function locx(xx,nx,x) | |
465 | implicit real*8(a-h,o-z) | |
466 | dimension xx(nx) | |
467 | !$$$ if(x.le.xx(1)) then | |
468 | ! G.W. 02/07/2007 | |
469 | if(x.eq.xx(1)) then | |
470 | locx=1 | |
471 | return | |
472 | endif | |
473 | !$$$ if(x.ge.xx(nx)) then | |
474 | ! G.W. 02/07/2007 | |
475 | if(x.eq.xx(nx)) then | |
476 | locx=nx-1 | |
477 | return | |
478 | endif | |
479 | ju=nx+1 | |
480 | jl=0 | |
481 | 1 if((ju-jl).le.1) go to 2 | |
482 | jm=(ju+jl)/2 | |
483 | if(x.ge.xx(jm)) then | |
484 | jl=jm | |
485 | else | |
486 | ju=jm | |
487 | endif | |
488 | go to 1 | |
489 | 2 locx=jl | |
490 | return | |
491 | END | |
492 | ||
493 | real*8 function polderiv(x1,x2,x3,y1,y2,y3) | |
494 | implicit real*8(a-h,o-z) | |
495 | polderiv=(x3*x3*(y1-y2)-2.0*x2*(x3*(y1-y2)+x1* & | |
496 | &(y2-y3))+x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3)) | |
497 | return | |
498 | END |