1 |
* |
2 |
* $Id$ |
3 |
* |
4 |
* $Log$ |
5 |
* |
6 |
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
7 |
*CMZ : 2.00/00 03/03/2000 15.39.05 by Francesco Cafagna |
8 |
*CMZ : 1.02/00 21/10/99 16.14.45 by Francesco Cafagna |
9 |
*CMZ : 1.00/02 25/03/96 15.18.51 by Francesco Cafagna |
10 |
*-- Author : Paolo Papini 16/02/96 |
11 |
SUBROUTINE FLIN3(V0,V1,V2,V3,F0,F1,F2,F3,V,FF) |
12 |
************************************************************************ |
13 |
* * |
14 |
* * |
15 |
* A bit of housekeeping: delete print statement etc. etc., by F. Cafagna |
16 |
* Called by: GUFLD * |
17 |
* Author: Paolo Papini 16/02/96 * |
18 |
* * |
19 |
************************************************************************ |
20 |
#include "gcunit.inc" |
21 |
* |
22 |
REAL V0(3),V1(3),V2(3),V3(3),V(3),FF |
23 |
REAL F0,F1,F2,F3,DX,DY,DZ,X1,X2,X3,Y1,Y2,Y3,Z1,Z2,Z3,DET, |
24 |
+ S1,S3,S4 |
25 |
* |
26 |
F1=F1-F0 |
27 |
F2=F2-F0 |
28 |
F3=F3-F0 |
29 |
DX=V(1)-V0(1) |
30 |
DY=V(2)-V0(2) |
31 |
DZ=V(3)-V0(3) |
32 |
X1=V1(1)-V0(1) |
33 |
X2=V2(1)-V0(1) |
34 |
X3=V3(1)-V0(1) |
35 |
Y1=V1(2)-V0(2) |
36 |
Y2=V2(2)-V0(2) |
37 |
Y3=V3(2)-V0(2) |
38 |
Z1=V1(3)-V0(3) |
39 |
Z2=V2(3)-V0(3) |
40 |
Z3=V3(3)-V0(3) |
41 |
DET=X1*Y2*Z3+Y1*Z2*X3+Z1*X2*Y3-Z1*Y2*X3-Z2*Y3*X1-Z3*Y1*X2 |
42 |
S1=F1*(Y2*Z3-Z2*Y3)+F2*(Z1*Y3-Z3*Y1)+F3*(Y1*Z2-Z1*Y2) |
43 |
S2=F1*(Z2*X3-Z3*X2)+F2*(X1*Z3-Z1*X3)+F3*(Z1*X2-Z2*X1) |
44 |
S3=F1*(X2*Y3-Y2*X3)+F2*(Y1*X3-Y3*X1)+F3*(X1*Y2-Y1*X2) |
45 |
IF(DET.EQ.0.) THEN |
46 |
* |
47 |
* GMAIL routine used |
48 |
* |
49 |
CHMAIL=' flin3 ERROR: MATRIX DETERMINANT EQUAL ZERO' |
50 |
CALL GMAIL(1,0) |
51 |
FF=F0 |
52 |
RETURN |
53 |
END IF |
54 |
FF=F0+(S1*DX+S2*DY+S3*DZ)/DET |
55 |
RETURN |
56 |
END |