hmc1o2
C HMC1O2 SOURCE CHAT 05/01/13 00:24:50 5004 SUBROUTINE HESSMAC1O2 (X,NDIMX,AMAT,NDIMA,NMODEL,DELTAX,TYPX) IMPLICIT INTEGER(I-N) integer ndimx,ndima,nmodel,i,j real*8 x(ndimx),Amat(ndima,ndima),deltax real*8 auxx(8),auxvecm(8),dx,typx(ndimx) do i=1,8 auxx(i)=0.D0 auxvecm(i)=0.D0 enddo do i=1,ndimx auxx(i)=x(i) enddo do i=1,ndimx dx=deltax*max(abs(x(i)),typx(i)) auxx(i)=x(i)+dx call vecflMAC(auxx,ndimx,Amat(1,i),nmodel) auxx(i)=x(i)-dx call vecflMAC(auxx,ndimx,auxvecm,nmodel) auxx(i)=x(i) do j=1,ndimx Amat(j,i)=(Amat(j,i)-auxvecm(j))/(2.D0*dx) enddo enddo return end
© Cast3M 2003 - Tous droits réservés.
Mentions légales