Mathematical Physics - Volume II - Numerical Methods

3.6 Program for solving of elliptical problems

99

400 CONTINUE c print ’(9f8.4)’,((ek(i,j),j=1,n),i=1,n) RETURN 500 WRITE (6,99001) detj , x STOP 99001 FORMAT (’ bad jacobian ’,E10.3/9E10.3/9E10.3) END

SUBROUTINE shape2(ski,eta,n,psi,dpsi) DIMENSION psi(9) , dpsi(9,2) IF ( n.EQ.6 ) THEN zet = 1. - ski - eta

psi(1) = 2.*zet*(zet-0.5) psi(2) = 2.*ski*(ski-0.5) psi(3) = 2.*eta*(eta-0.5)

psi(4) = 4.*zet*ski psi(5) = 4.*ski*eta psi(6) = 4.*eta*zet

dpsi(1,1) = 1. - 4.*zet dpsi(1,2) = 1. - 4.*zet dpsi(2,1) = 4.*ski - 1.

dpsi(2,2) = 0. dpsi(3,1) = 0.

dpsi(3,2) = 4.*eta - 1. dpsi(4,1) = 4.*(zet-ski) dpsi(4,2) = -4.*ski dpsi(5,1) = 4.*eta dpsi(5,2) = 4.*ski dpsi(6,1) = -4.*eta dpsi(6,2) = 4.*(zet-eta) RETURN

ENDIF ski2 = ski*ski eta2 = eta*eta

ski2m = ski2 - ski eta2m = eta2 - eta ski2p = ski2 + ski eta2p = eta2 + eta

psi(1) = ski2m*eta2m/4. psi(2) = ski2p*eta2m/4. psi(3) = ski2p*eta2p/4. psi(4) = ski2m*eta2p/4.

psi(5) = (1.-ski2)*eta2m/2. psi(6) = ski2p*(1.-eta2)/2. psi(7) = (1.-ski2)*eta2p/2. psi(8) = ski2m*(1.-eta2)/2. psi(9) = (1.-ski2)*(1.-eta2) dpsi(1,1) = (2.*ski-1.)*eta2m/4. dpsi(1,2) = ski2m*(2.*eta-1.)/4.

Made with FlippingBook flipbook maker