The TELEMAC-MASCARET system  trunk
vc01tt0.f
Go to the documentation of this file.
1 ! ******************
2  SUBROUTINE vc01tt0
3 ! ******************
4 !
5  &( xmul,sf,f,x,y,z,
6  & ikle1,ikle2,ikle3,ikle4,nelem,nelmax,w)
7 !
8 !***********************************************************************
9 ! BIEF V6P1 21/08/2010
10 !***********************************************************************
11 !
12 !brief COMPUTES THE FOLLOWING VECTOR IN FINITE ELEMENTS:
13 !code
14 !+ /
15 !+ VEC(I) = XMUL / PSI(I) * F D(OMEGA)
16 !+ /OMEGA
17 !+
18 !+ PSI(I) IS A BASE OF TYPE P1 TETRAHEDRON
19 !+
20 !+ F IS A VECTOR OF TYPE IELMF
21 !
22 !warning THE JACOBIAN MUST BE POSITIVE
23 !warning THE RESULT IS IN W IN NOT ASSEMBLED FORM - REAL MESH
24 !
25 !history J-M HERVOUET (LNH)
26 !+ 22/03/02
27 !+ V5P3
28 !+
29 !
30 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
31 !+ 13/07/2010
32 !+ V6P0
33 !+ Translation of French comments within the FORTRAN sources into
34 !+ English comments
35 !
36 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
37 !+ 21/08/2010
38 !+ V6P0
39 !+ Creation of DOXYGEN tags for automated documentation and
40 !+ cross-referencing of the FORTRAN sources
41 !
42 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43 !| F |-->| FUNCTION USED IN THE VECTOR FORMULA
44 !| IKLE1 |-->| FIRST POINT OF TETRAHEDRA
45 !| IKLE2 |-->| SECOND POINT OF TETRAHEDRA
46 !| IKLE3 |-->| THIRD POINT OF TETRAHEDRA
47 !| IKLE4 |-->| FOURTH POINT OF TETRAHEDRA
48 !| NELEM |-->| NUMBER OF ELEMENTS
49 !| NELMAX |-->| MAXIMUM NUMBER OF ELEMENTS
50 !| SF |-->| BIEF_OBJ STRUCTURE OF F
51 !| SURFAC |-->| AREA OF TRIANGLES
52 !| W |<--| RESULT IN NON ASSEMBLED FORM
53 !| X |-->| ABSCISSAE OF POINTS IN THE MESH
54 !| XMUL |-->| MULTIPLICATION COEFFICIENT
55 !| Y |-->| ORDINATES OF POINTS IN THE MESH
56 !| Z |-->| ELEVATIONS OF POINTS IN THE MESH
57 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 !
59  USE bief, ex_vc01tt0 => vc01tt0
60 !
62  IMPLICIT NONE
63 !
64 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
65 !
66  INTEGER, INTENT(IN) :: NELEM,NELMAX
67  INTEGER, INTENT(IN) :: IKLE1(nelmax),IKLE2(nelmax)
68  INTEGER, INTENT(IN) :: IKLE3(nelmax),IKLE4(nelmax)
69 !
70  DOUBLE PRECISION, INTENT(IN) :: X(*),Y(*),Z(*)
71  DOUBLE PRECISION, INTENT(INOUT) :: W(nelmax)
72  DOUBLE PRECISION, INTENT(IN) :: XMUL
73 !
74 ! STRUCTURE OF F AND REAL DATA
75 !
76  TYPE(bief_obj), INTENT(IN) :: SF
77  DOUBLE PRECISION, INTENT(IN) :: F(*)
78 !
79 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
80 !
81  INTEGER IELEM,IELMF
82  DOUBLE PRECISION XSUR24,COEF,X2,X3,X4,Y2,Y3,Y4,Z2,Z3,Z4
83  INTEGER I1,I2,I3,I4
84 !
85 !***********************************************************************
86 !
87  ielmf=sf%ELM
88 !
89 !-----------------------------------------------------------------------
90 !
91 ! F IS LINEAR
92 !
93  IF(ielmf.EQ.30) THEN
94 !
95  xsur24 = xmul / 24.d0
96 !
97  DO ielem = 1 , nelem
98 !
99  i1 = ikle1(ielem)
100  i2 = ikle2(ielem)
101  i3 = ikle3(ielem)
102  i4 = ikle4(ielem)
103 !
104  x2 = x(i2)-x(i1)
105  x3 = x(i3)-x(i1)
106  x4 = x(i4)-x(i1)
107 !
108  y2 = y(i2)-y(i1)
109  y3 = y(i3)-y(i1)
110  y4 = y(i4)-y(i1)
111 !
112  z2 = z(i2)-z(i1)
113  z3 = z(i3)-z(i1)
114  z4 = z(i4)-z(i1)
115 !
116  coef = xsur24*
117  & (x2*y3*z4-x2*y4*z3-y2*x3*z4+y2*x4*z3+z2*x3*y4-z2*x4*y3)
118 !
119  w(ielem) = coef * f(ielem)
120 !
121  ENDDO ! IELEM
122 !
123 !-----------------------------------------------------------------------
124 !
125  ELSE
126 !
127  WRITE(lu,102) ielmf,sf%NAME
128 102 FORMAT(1x,'VC01TT0 (BIEF):',/,
129  & 1x,'DISCRETISATION OF F : ',1i6,' NOT IMPLEMENTED',/,
130  & 1x,'REAL NAME OF F: ',a6)
131  CALL plante(1)
132  stop
133 !
134  ENDIF
135 !
136 !-----------------------------------------------------------------------
137 !
138  RETURN
139  END
subroutine vc01tt0(XMUL, SF, F, X, Y, Z, IKLE1, IKLE2, IKLE3, IKLE4, NELEM, NELMAX, W)
Definition: vc01tt0.f:8
Definition: bief.f:3