* * $Id$ * * $Log$ * *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola *CMZ : 2.00/00 03/03/2000 15.39.05 by Francesco Cafagna *CMZ : 1.02/00 21/10/99 16.14.45 by Francesco Cafagna *CMZ : 1.00/02 25/03/96 15.18.51 by Francesco Cafagna *-- Author : Paolo Papini 16/02/96 SUBROUTINE FLIN3(V0,V1,V2,V3,F0,F1,F2,F3,V,FF) ************************************************************************ * * * * * A bit of housekeeping: delete print statement etc. etc., by F. Cafagna * Called by: GUFLD * * Author: Paolo Papini 16/02/96 * * * ************************************************************************ #include "gcunit.inc" * REAL V0(3),V1(3),V2(3),V3(3),V(3),FF REAL F0,F1,F2,F3,DX,DY,DZ,X1,X2,X3,Y1,Y2,Y3,Z1,Z2,Z3,DET, + S1,S3,S4 * F1=F1-F0 F2=F2-F0 F3=F3-F0 DX=V(1)-V0(1) DY=V(2)-V0(2) DZ=V(3)-V0(3) X1=V1(1)-V0(1) X2=V2(1)-V0(1) X3=V3(1)-V0(1) Y1=V1(2)-V0(2) Y2=V2(2)-V0(2) Y3=V3(2)-V0(2) Z1=V1(3)-V0(3) Z2=V2(3)-V0(3) Z3=V3(3)-V0(3) DET=X1*Y2*Z3+Y1*Z2*X3+Z1*X2*Y3-Z1*Y2*X3-Z2*Y3*X1-Z3*Y1*X2 S1=F1*(Y2*Z3-Z2*Y3)+F2*(Z1*Y3-Z3*Y1)+F3*(Y1*Z2-Z1*Y2) S2=F1*(Z2*X3-Z3*X2)+F2*(X1*Z3-Z1*X3)+F3*(Z1*X2-Z2*X1) S3=F1*(X2*Y3-Y2*X3)+F2*(Y1*X3-Y3*X1)+F3*(X1*Y2-Y1*X2) IF(DET.EQ.0.) THEN * * GMAIL routine used * CHMAIL=' flin3 ERROR: MATRIX DETERMINANT EQUAL ZERO' CALL GMAIL(1,0) FF=F0 RETURN END IF FF=F0+(S1*DX+S2*DY+S3*DZ)/DET RETURN END