1 SUBROUTINE dqagpe(F,A,B,NPTS2,POINTS,EPSABS,EPSREL,LIMIT,RESULT,
2 * abserr,neval,ier,alist,blist,rlist,elist,pts,iord,level,ndin,
192 DOUBLE PRECISION A,ABSEPS,ABSERR,ALIST,AREA,AREA1,AREA12,AREA2,A1,
193 * a2,b,blist,b1,b2,correc,dabs,defabs,defab1,defab2,dmax1,dmin1,
194 * dres,d1mach,elist,epmach,epsabs,epsrel,erlarg,erlast,errbnd,
195 * errmax,error1,erro12,error2,errsum,ertest,oflow,points,pts,
196 * resa,resabs,reseps,result,res3la,rlist,rlist2,sign,temp,
uflow
197 INTEGER I,ID,IER,IERRO,IND1,IND2,IORD,IP1,IROFF1,IROFF2,IROFF3,J,
198 * jlow,jupbnd,k,ksgn,ktmin,last,levcur,level,levmax,limit,maxerr,
199 * ndin,neval,nint,nintp1,npts,npts2,nres,nrmax,numrl2
203 dimension alist(limit),blist(limit),elist(limit),iord(limit),
204 * level(limit),ndin(npts2),points(npts2),pts(npts2),res3la(3),
205 * rlist(limit),rlist2(52)
278 IF(npts2.LT.2.OR.limit.LE.npts.OR.(epsabs.LE.0.0d+00.AND.
279 * epsrel.LT.dmax1(0.5d+02*epmach,0.5d-28))) ier = 6
280 IF(ier.EQ.6) go to 999
286 IF(a.GT.b) sign = -1.0d+00
288 IF(npts.EQ.0) go to 15
292 15 pts(npts+2) = dmax1(a,b)
295 IF(npts.EQ.0) go to 40
300 IF(pts(i).LE.pts(j)) go to 20
305 IF(pts(1).NE.dmin1(a,b).OR.pts(nintp1).NE.dmax1(a,b)) ier = 6
306 IF(ier.EQ.6) go to 999
314 CALL
dqk21(f,a1,b1,area1,error1,defabs,resa,ier)
315 IF (ier .LT. 0)
RETURN
316 abserr = abserr+error1
317 result = result+area1
319 IF(error1.EQ.resa.AND.error1.NE.0.0d+00) ndin(i) = 1
320 resabs = resabs+defabs
331 IF(ndin(i).EQ.1) elist(i) = abserr
332 errsum = errsum+elist(i)
340 errbnd = dmax1(epsabs,epsrel*dres)
341 IF(abserr.LE.0.1d+03*epmach*resabs.AND.abserr.GT.errbnd) ier = 2
342 IF(nint.EQ.1) go to 80
348 IF(elist(ind1).GT.elist(ind2)) go to 60
352 IF(ind1.EQ.iord(i)) go to 70
356 IF(limit.LT.npts2) ier = 1
357 80
IF(ier.NE.0.OR.abserr.LE.errbnd) go to 210
364 errmax = elist(maxerr)
383 IF(dres.GE.(0.1d+01-0.5d+02*epmach)*resabs) ksgn = 1
388 DO 160 last = npts2,limit
393 levcur = level(maxerr)+1
395 b1 = 0.5d+00*(alist(maxerr)+blist(maxerr))
399 CALL
dqk21(f,a1,b1,area1,error1,resa,defab1,ier)
400 IF (ier .LT. 0)
RETURN
401 CALL
dqk21(f,a2,b2,area2,error2,resa,defab2,ier)
402 IF (ier .LT. 0)
RETURN
409 erro12 = error1+error2
410 errsum = errsum+erro12-errmax
411 area = area+area12-rlist(maxerr)
412 IF(defab1.EQ.error1.OR.defab2.EQ.error2) go to 95
413 IF(dabs(rlist(maxerr)-area12).GT.0.1d-04*dabs(area12)
414 * .OR.erro12.LT.0.99d+00*errmax) go to 90
415 IF(extrap) iroff2 = iroff2+1
416 IF(.NOT.extrap) iroff1 = iroff1+1
417 90
IF(last.GT.10.AND.erro12.GT.errmax) iroff3 = iroff3+1
418 95 level(maxerr) = levcur
420 rlist(maxerr) = area1
422 errbnd = dmax1(epsabs,epsrel*dabs(area))
426 IF(iroff1+iroff2.GE.10.OR.iroff3.GE.20) ier = 2
427 IF(iroff2.GE.5) ierro = 3
432 IF(last.EQ.limit) ier = 1
437 IF(dmax1(dabs(a1),dabs(b2)).LE.(0.1d+01+0.1d+03*epmach)*
438 * (dabs(a2)+0.1d+04*
uflow)) ier = 4
442 IF(error2.GT.error1) go to 100
446 elist(maxerr) = error1
449 100 alist(maxerr) = a2
452 rlist(maxerr) = area2
454 elist(maxerr) = error2
461 110 CALL
dqpsrt(limit,last,maxerr,errmax,elist,iord,nrmax)
463 IF(errsum.LE.errbnd) go to 190
465 IF(ier.NE.0) go to 170
467 erlarg = erlarg-erlast
468 IF(levcur+1.LE.levmax) erlarg = erlarg+erro12
474 IF(level(maxerr)+1.LE.levmax) go to 160
477 120
IF(ierro.EQ.3.OR.erlarg.LE.ertest) go to 140
485 IF(last.GT.(2+limit/2)) jupbnd = limit+3-last
488 errmax = elist(maxerr)
490 IF(level(maxerr)+1.LE.levmax) go to 160
496 140 numrl2 = numrl2+1
497 rlist2(numrl2) = area
498 IF(numrl2.LE.2) go to 155
499 CALL
dqelg(numrl2,rlist2,reseps,abseps,res3la,nres)
501 IF(ktmin.GT.5.AND.abserr.LT.0.1d-02*errsum) ier = 5
502 IF(abseps.GE.abserr) go to 150
507 ertest = dmax1(epsabs,epsrel*dabs(reseps))
509 IF(abserr.LT.ertest) go to 170
513 150
IF(numrl2.EQ.1) noext = .true.
514 IF(ier.GE.5) go to 170
516 errmax = elist(maxerr)
527 170
IF(abserr.EQ.oflow) go to 190
528 IF((ier+ierro).EQ.0) go to 180
529 IF(ierro.EQ.3) abserr = abserr+correc
531 IF(result.NE.0.0d+00.AND.area.NE.0.0d+00)go to 175
532 IF(abserr.GT.errsum)go to 190
533 IF(area.EQ.0.0d+00) go to 210
535 175
IF(abserr/dabs(result).GT.errsum/dabs(area))go to 190
539 180
IF(ksgn.EQ.(-1).AND.dmax1(dabs(result),dabs(area)).LE.
540 * resabs*0.1d-01) go to 210
541 IF(0.1d-01.GT.(result/area).OR.(result/area).GT.0.1d+03.OR.
542 * errsum.GT.dabs(area)) ier = 6
549 result = result+rlist(k)
552 210
IF(ier.GT.2) ier = ier-1
subroutine dqelg(N, EPSTAB, RESULT, ABSERR, RES3LA, NRES)
std::string dimension(void) const
subroutine dqk21(F, A, B, RESULT, ABSERR, RESABS, RESASC, IERR)
subroutine dqpsrt(LIMIT, LAST, MAXERR, ERMAX, ELIST, IORD, NRMAX)
subroutine dqagpe(F, A, B, NPTS2, POINTS, EPSABS, EPSREL, LIMIT, RESULT, ABSERR, NEVAL, IER, ALIST, BLIST, RLIST, ELIST, PTS, IORD, LEVEL, NDIN, LAST)