The TELEMAC-MASCARET system  trunk
mt13aa.f
Go to the documentation of this file.
1 ! *****************
2  SUBROUTINE mt13aa
3 ! *****************
4 !
5  &( a11 , a12 , a13 ,
6  & a21 , a22 , a23 ,
7  & a31 , a32 , a33 ,
8  & xmul,xel,yel,nelem,nelmax,icoord)
9 !
10 !***********************************************************************
11 ! BIEF V6P1 21/08/2010
12 !***********************************************************************
13 !
14 !brief COMPUTES THE COEFFICIENTS OF THE FOLLOWING MATRIX:
15 !code
16 !+ / D
17 !+ A(I,J)= XMUL / PSI2(I) * --( PSI1(J) ) D(OMEGA)
18 !+ /OMEGA DX
19 !+
20 !+ ICOORD=2 WOULD GIVE A DERIVATIVE WRT Y
21 !+ ICOORD=3 WOULD GIVE A DERIVATIVE WRT Z
22 !+
23 !+ PSI1: LINEAR
24 !+ PSI2: LINEAR
25 !
26 !warning THE JACOBIAN MUST BE POSITIVE
27 !warning SIGN CHANGED COMPARED TO 3.0
28 !warning TRANSPOSITION COMPARED TO 3.0
29 !
30 !history J-M HERVOUET (LNH) ; C MOULIN (LNH)
31 !+ 09/12/94
32 !+ V5P1
33 !+
34 !
35 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
36 !+ 13/07/2010
37 !+ V6P0
38 !+ Translation of French comments within the FORTRAN sources into
39 !+ English comments
40 !
41 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
42 !+ 21/08/2010
43 !+ V6P0
44 !+ Creation of DOXYGEN tags for automated documentation and
45 !+ cross-referencing of the FORTRAN sources
46 !
47 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 !| A11 |<--| ELEMENTS OF MATRIX
49 !| A12 |<--| ELEMENTS OF MATRIX
50 !| A13 |<--| ELEMENTS OF MATRIX
51 !| A21 |<--| ELEMENTS OF MATRIX
52 !| A22 |<--| ELEMENTS OF MATRIX
53 !| A23 |<--| ELEMENTS OF MATRIX
54 !| A31 |<--| ELEMENTS OF MATRIX
55 !| A32 |<--| ELEMENTS OF MATRIX
56 !| A33 |<--| ELEMENTS OF MATRIX
57 !| ICOORD |-->| 1: DERIVATIVE ALONG X, 2: ALONG Y
58 !| NELEM |-->| NUMBER OF ELEMENTS
59 !| NELMAX |-->| MAXIMUM NUMBER OF ELEMENTS
60 !| XEL |-->| ABSCISSAE OF POINTS IN THE MESH, PER ELEMENT
61 !| YEL |-->| ORDINATES OF POINTS IN THE MESH, PER ELEMENT
62 !| XMUL |-->| MULTIPLICATION FACTOR
63 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64 !
65  USE bief, ex_mt13aa => mt13aa
66 !
68  IMPLICIT NONE
69 !
70 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71 !
72  INTEGER, INTENT(IN) :: NELEM,NELMAX,ICOORD
73 !
74  DOUBLE PRECISION, INTENT(INOUT) :: A11(*),A12(*),A13(*)
75  DOUBLE PRECISION, INTENT(INOUT) :: A21(*),A22(*),A23(*)
76  DOUBLE PRECISION, INTENT(INOUT) :: A31(*),A32(*),A33(*)
77 !
78  DOUBLE PRECISION, INTENT(IN) :: XMUL
79 !
80  DOUBLE PRECISION, INTENT(IN) :: XEL(nelmax,3),YEL(nelmax,3)
81 !
82 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
83 !
84  INTEGER IELEM
85  DOUBLE PRECISION XSUR6
86 !
87 !-----------------------------------------------------------------------
88 !
89  xsur6 = xmul/6.d0
90 !
91 !================================
92 ! DERIVATIVE WRT X =
93 !================================
94 !
95  IF(icoord.EQ.1) THEN
96 !
97 ! LOOP ON THE ELEMENTS
98 !
99  DO ielem = 1 , nelem
100 !
101 ! DIAGONAL TERMS
102 !
103  a22(ielem) = yel(ielem,3) * xsur6
104  a33(ielem) = - yel(ielem,2) * xsur6
105  a11(ielem) = - a22(ielem) - a33(ielem)
106 !
107 ! EXTRADIAGONAL TERMS
108 !
109  a21(ielem) = a11(ielem)
110  a31(ielem) = a11(ielem)
111  a32(ielem) = a22(ielem)
112  a12(ielem) = a22(ielem)
113  a13(ielem) = a33(ielem)
114  a23(ielem) = a33(ielem)
115 !
116  ENDDO ! IELEM
117 !
118  ELSEIF(icoord.EQ.2) THEN
119 !
120 !================================
121 ! DERIVATIVE WRT Y =
122 !================================
123 !
124  DO ielem = 1 , nelem
125 !
126 ! DIAGONAL TERMS
127 !
128  a22(ielem) = - xel(ielem,3) * xsur6
129  a33(ielem) = xel(ielem,2) * xsur6
130  a11(ielem) = - a22(ielem) - a33(ielem)
131 !
132 ! EXTRADIAGONAL TERMS
133 !
134  a21(ielem) = a11(ielem)
135  a31(ielem) = a11(ielem)
136  a32(ielem) = a22(ielem)
137  a12(ielem) = a22(ielem)
138  a13(ielem) = a33(ielem)
139  a23(ielem) = a33(ielem)
140 !
141  ENDDO ! IELEM
142 !
143  ELSE
144 !
145  WRITE(lu,201) icoord
146 201 FORMAT(1x,'MT13AA (BIEF) : IMPOSSIBLE COMPONENT ',
147  & 1i6,' CHECK ICOORD')
148  CALL plante(0)
149  stop
150 !
151  ENDIF
152 !
153 !-----------------------------------------------------------------------
154 !
155  RETURN
156  END
subroutine mt13aa(A11, A12, A13, A21, A22, A23, A31, A32, A33, XMUL, XEL, YEL, NELEM, NELMAX, ICOORD)
Definition: mt13aa.f:10
Definition: bief.f:3