1 : C LIEUP2 SOURCE CHAT 05/01/13 01:17:29 5004 2 : SUBROUTINE LIEUP2(NDIM,PT1,PT2,PT3,PT4,XREEL,TEST) 3 : *** 4 : **************************************************************************** 5 : *** SP 'LIEUP2' : permet de determiner la position d'un point par rapport 6 : *** a une face d'un element : 7 : *** 8 : *** APPELES 1 = aucun 9 : *** APPELES 2 = 'EQPL3P' (fonction) 10 : *** 11 : *** E = 'NDIM' dimension de l'espace 12 : *** 'PT1', 'PT2', 'PT3', 'PT4' noeuds de l'element considere 13 : *** 'XREEL' pt considere en coordonnees reelles 14 : *** 15 : *** S = 'TEST' 16 : *** TEST > 0. le point est du cote interieur de l'element 17 : *** TEST = 0. le point est sur la face 18 : *** TEST < 0. le point est à l'exterieur de l'element 19 : *** 20 : *** Auteur Cyril Nou 21 : **************************************************************************** 22 : IMPLICIT INTEGER(I-N) 23 : IMPLICIT REAL*8 (A-H,O-Z) 24 : DIMENSION XREEL(3),PT1(3),PT2(3),PT3(3),PT4(3) 25 : ********** cas 2D ********** 26 : IF (NDIM.EQ.2) THEN 27 : A=(XREEL(1)-PT1(1))*(PT2(2)-PT1(2)) 28 : B=(XREEL(2)-PT1(2))*(PT2(1)-PT1(1)) 29 : C=(PT3(1)-PT1(1))*(PT2(2)-PT1(2)) 30 : D=(PT3(2)-PT1(2))*(PT2(1)-PT1(1)) 31 : TEST=(A-B)/(C-D) 32 : C IF (TEST.GE.(-EPSILO)) ITEST=1 33 : ********** cas 3D ********** 34 : ELSEIF (NDIM.EQ.3) THEN 35 : *** 'EQPL3P' fonction associée a l'equation du plan 36 : TEST1=EQPL3P(PT4,PT1,PT2,PT3) 37 : TEST2=EQPL3P(XREEL,PT1,PT2,PT3) 38 : TEST=TEST2/TEST1 39 : C IF (TEST.GE.(-EPSILO)) ITEST=1 40 : ENDIF 41 : RETURN 42 : END 43 : 44 :
© Cast3M 2003 - All rights reserved.
Disclaimer