ffface
C FFFACE SOURCE CHAT 05/01/12 23:58:45 5004 IMPLICIT INTEGER(I-N) IMPLICIT REAL*8 (A-H,O-Z) C************************************************************************ C C C C************************************************************************ DIMENSION FN(20),XA(3,21),COOR(3,7) C IF(NPF.EQ.8)THEN X=0.5D0 Y=0.5D0 FN(1)=-2.D0*(1.D0-X)*(1.D0-Y)*(X+Y-0.5D0) FN(2)= 4.D0*X*(1.D0-X)*(1.D0-Y) FN(3)=-2.D0*X*(1.D0-Y)*(Y-X+0.5D0) FN(4)= 4.D0*X*Y*(1.D0-Y) FN(5)=-2.D0*X*Y*(1.5D0-X-Y) FN(6)= 4.D0*X*Y*(1.D0-X) FN(7)=-2.D0*Y*(1.D0-X)*(X-Y+0.5D0) FN(8)= 4.D0*Y*(1.D0-Y)*(1.D0-X) DO 2 N=1,3 XA(N,NPF+1)= & FN(1)*XA(N,1)+FN(2)*XA(N,2)+FN(3)*XA(N,3)+FN(4)*XA(N,4) &+ FN(5)*XA(N,5)+FN(6)*XA(N,6)+FN(7)*XA(N,7)+FN(8)*XA(N,8) 2 CONTINUE ELSEIF(NPF.EQ.6)THEN A=SQRT(2.D0) AS2=A/2.D0 X=AS2 Y=AS2 FN(1)=(X+Y-AS2)*(X+Y-A) FN(2)=-2.D0*X*(X+Y-A) FN(3)=-X*(X-AS2) FN(4)=2.D0*X*Y FN(5)=Y*(Y-AS2) FN(6)=-2.D0*Y*(X+Y-A) DO 4 N=1,3 XA(N,NPF+1)=(XA(N,1)+XA(N,3)+XA(N,5))/3.D0 C? XA(N,NPF+1)= C? & FN(1)*XA(N,1)+FN(2)*XA(N,2)+FN(3)*XA(N,3)+FN(4)*XA(N,4) C? &+ FN(5)*XA(N,5)+FN(6)*XA(N,6) 4 CONTINUE ELSEIF(NPF.EQ.20)THEN X=0.5D0 Y=0.5D0 Z=0.5D0 FN(1)=-2.D0*(1.D0-X)*(1.D0-Y)*(1.D0-Z)*(X+Y+Z-0.5D0) FN(2)= 4.D0*X*(1.D0-X)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