430 integer nhess,ih,nx,my,myc0,myb0,j,k,l,m,n,ip,np
431 double precision xx(nx),yy(my),ff(np,nx,my),
432 & ff1(nx,my),ff2(nx,my),ff12(nx,my),ff21(nx,my),
433 & yy0(4),yy1(4),yy2(4),yy12(4),z(16),
434 & cl(16),cc(np,0:nhess,nx,my,4,4),iwt(16,16),
435 & polderiv1,polderiv2,polderiv3,d1,d2,d1d2,xxd
437 data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
438 & 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
439 & -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
440 & 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
441 & 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
442 & 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
443 & 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
444 & 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
445 & -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
446 & 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
447 & 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
448 & -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
449 & 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
450 & 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
451 & -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
452 & 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
455 ff1(1,m)=polderiv1(xx(1),xx(2),xx(3),
456 & ff(ip,1,m),ff(ip,2,m),ff(ip,3,m))
457 ff1(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
458 & ff(ip,nx-2,m),ff(ip,nx-1,m),ff(ip,nx,m))
460 ff1(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
461 & ff(ip,n-1,m),ff(ip,n,m),ff(ip,n+1,m))
469 if (myc0.eq.2.and.m.eq.1)
then
470 ff2(n,m)=(ff(ip,n,m+1)-ff(ip,n,m))/(yy(m+1)-yy(m))
471 else if (myc0.eq.2.and.m.eq.2)
then
472 ff2(n,m)=(ff(ip,n,m)-ff(ip,n,m-1))/(yy(m)-yy(m-1))
473 else if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1)
then
474 ff2(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
475 & ff(ip,n,m),ff(ip,n,m+1),ff(ip,n,m+2))
476 else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0)
then
477 ff2(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
478 & ff(ip,n,m-2),ff(ip,n,m-1),ff(ip,n,m))
480 ff2(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
481 & ff(ip,n,m-1),ff(ip,n,m),ff(ip,n,m+1))
488 ff12(1,m)=polderiv1(xx(1),xx(2),xx(3),
489 & ff2(1,m),ff2(2,m),ff2(3,m))
490 ff12(nx,m)=polderiv3(xx(nx-2),xx(nx-1),xx(nx),
491 & ff2(nx-2,m),ff2(nx-1,m),ff2(nx,m))
493 ff12(n,m)=polderiv2(xx(n-1),xx(n),xx(n+1),
494 & ff2(n-1,m),ff2(n,m),ff2(n+1,m))
501 if (myc0.eq.2.and.m.eq.1)
then
502 ff21(n,m)=(ff1(n,m+1)-ff1(n,m))/(yy(m+1)-yy(m))
503 else if (myc0.eq.2.and.m.eq.2)
then
504 ff21(n,m)=(ff1(n,m)-ff1(n,m-1))/(yy(m)-yy(m-1))
505 else if (m.eq.1.or.m.eq.myc0+1.or.m.eq.myb0+1)
then
506 ff21(n,m)=polderiv1(yy(m),yy(m+1),yy(m+2),
507 & ff1(n,m),ff1(n,m+1),ff1(n,m+2))
508 else if (m.eq.my.or.m.eq.myc0.or.m.eq.myb0)
then
509 ff21(n,m)=polderiv3(yy(m-2),yy(m-1),yy(m),
510 & ff1(n,m-2),ff1(n,m-1),ff1(n,m))
512 ff21(n,m)=polderiv2(yy(m-1),yy(m),yy(m+1),
513 & ff1(n,m-1),ff1(n,m),ff1(n,m+1))
521 ff12(n,m)=0.5*(ff12(n,m)+ff21(n,m))
533 yy0(3)=ff(ip,n+1,m+1)
548 yy12(3)=ff12(n+1,m+1)
561 xxd=xxd+iwt(k,l)*z(k)
569 cc(ip,ih,n,m,k,j)=cl(l)