The TELEMAC-MASCARET system  trunk
mt09oo.f
Go to the documentation of this file.
1 ! *****************
2  SUBROUTINE mt09oo
3 ! *****************
4 !
5  &(a11,a12,a21,a22,xmul,sf,f,g,su,u,v,
6  & ikle1,ikle2,nbor,nelem,nelmax)
7 !
8 !***********************************************************************
9 ! BIEF V6P3 21/08/2010
10 !***********************************************************************
11 !
12 !brief COMPUTES THE COEFFICIENTS OF THE FOLLOWING MATRIX:
13 !code
14 !+ / --> --> ->->
15 !+ A = XMUL / PSI1(I)* U . GRAD(PSI2(J)) U.N DX
16 !+ I J /L
17 !+
18 !+ BY ELEMENTARY CELL; THE ELEMENT IS THE P1 SEGMENT
19 !+
20 !+
21 !+ WARNING : F AND G MUST BE X AND Y VECTOR OF THE EL. SEGMENT
22 !+
23 !+ J(X,Y): JACOBIAN OF THE ISOPARAMETRIC TRANSFORMATION
24 !
25 !warning THE JACOBIAN MUST BE POSITIVE
26 !
27 !history F LEPEINTRE (LNH)
28 !+ 04/09/92
29 !+
30 !+
31 !
32 !history J. PARISI & C. PEYRARD (EDF R&D, LNHE)
33 !+ 28/06/2013
34 !+ V5P9
35 !+ First version.
36 !
37 !
38 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 !| A11 |<--| ELEMENTS OF MATRIX
40 !| A12 |<--| ELEMENTS OF MATRIX
41 !| A13 |<--| ELEMENTS OF MATRIX
42 !| A22 |<--| ELEMENTS OF MATRIX
43 !| A23 |<--| ELEMENTS OF MATRIX
44 !| A33 |<--| ELEMENTS OF MATRIX
45 !| F |-->| FUNCTION F USED IN THE FORMULA
46 !| IKLE1 |-->| FIRST POINTS OF SEGMENTS
47 !| IKLE2 |-->| SECOND POINTS OF SEGMENTS
48 !| NBOR |-->| GLOBAL NUMBER OF BOUNDARY POINTS
49 !| NELEM |-->| NUMBER OF ELEMENTS
50 !| NELMAX |-->| MAXIMUM NUMBER OF ELEMENTS
51 !| SF |-->| BIEF_OBJ STRUCTURE OF F
52 !| SURFAC |-->| AREA OF TRIANGLES
53 !| XMUL |-->| MULTIPLICATION FACTOR
54 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 !
56  USE bief
57 ! EX_MT09OO => MT09OO
58 !
60  IMPLICIT NONE
61 !
62 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63 !
64  INTEGER, INTENT(IN) :: NELEM,NELMAX
65  INTEGER, INTENT(IN) :: IKLE1(*),IKLE2(*),NBOR(*)
66 !
67  DOUBLE PRECISION, INTENT(IN) :: XMUL,U(*),V(*)
68 !
69  DOUBLE PRECISION, INTENT(IN) :: F(*),G(*)
70 !
71 ! STRUCTURE OF F
72  TYPE(bief_obj), INTENT(IN) :: SF,SU
73 !
74  DOUBLE PRECISION, INTENT(INOUT) :: A11(nelmax)
75  DOUBLE PRECISION, INTENT(INOUT) :: A12(nelmax)
76  DOUBLE PRECISION, INTENT(INOUT) :: A21(nelmax)
77  DOUBLE PRECISION, INTENT(INOUT) :: A22(nelmax)
78 !
79 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
80 !
81  INTEGER IELEM,IELMF
82  DOUBLE PRECISION SUR24,U1N,U2N,U1,U2,V1,V2
83  DOUBLE PRECISION TETA1,TETA2
84 !
85 !-----------------------------------------------------------------------
86 !
87  sur24 = xmul/24.d0
88 !
89 !-----------------------------------------------------------------------
90 !
91  ielmf = su%ELM
92 !
93 ! F LINEAR BY SEGMENT, IN A BOUNDARY ARRAY
94 ! NOTE: IKLE IS HERE A BOUNDARY IKLE
95 !
96  IF (ielmf.EQ.11) THEN
97 !
98  DO ielem = 1 , nelem
99 !
100  u1 = u(nbor(ikle1(ielem)))
101  u2 = u(nbor(ikle2(ielem)))
102 !
103  v1 = v(nbor(ikle1(ielem)))
104  v2 = v(nbor(ikle2(ielem)))
105 !
106  u1n=sqrt(u1**2+v1**2)
107  u2n=sqrt(u2**2+v2**2)
108 !
109  IF(u1n.GT.1.d-5.AND.u2n.GT.1.d-5) THEN
110 !
111 !
112  teta1= asin((u1*f(ielem)+v1*g(ielem))/u1n)
113  teta2= asin((u2*f(ielem)+v2*g(ielem))/u2n)
114 !
115 !
116  a11(ielem) = sur24*(3.d0*sin(2*teta1)*(u1n**2)
117  & + sin(2*teta2)*(u2n**2)
118  & + 2.d0*u1n*u2n*sin(teta1+teta2))
119  a12(ielem) = -a11(ielem)
120  a21(ielem) = sur24*(sin(2*teta1)*(u1n**2)
121  & + 3.d0*sin(2*teta2)*(u2n**2)
122  & + 2.d0*u1n*u2n*sin(teta1+teta2))
123  a22(ielem) = -a21(ielem)
124 !
125 ! SI COURANT NUL
126 !
127  ELSE
128  a11(ielem) = 0.d0
129  a12(ielem) = 0.d0
130  a21(ielem) = 0.d0
131  a22(ielem) = 0.d0
132  ENDIF
133 !
134  ENDDO
135 !
136 ! OTHER TYPES OF DISCRETISATION OF F
137 !
138  ELSE
139 !
140  WRITE(lu,101) ielmf,sf%NAME
141 101 FORMAT(1x,'MT0900 (BIEF) :',/,
142  & 1x,'DISCRETIZATION OF F NOT AVAILABLE:',1i6,
143  & 1x,'REAL NAME: ',a6)
144  CALL plante(1)
145  stop
146 !
147  ENDIF
148 !
149 !-----------------------------------------------------------------------
150 !
151  RETURN
152  END
subroutine mt09oo(A11, A12, A21, A22, XMUL, SF, F, G, SU, U, V, IKLE1, IKLE2, NBOR, NELEM, NELMAX)
Definition: mt09oo.f:8
Definition: bief.f:3