mt05tt.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\mt05tt.f
00002 !
00076                      SUBROUTINE MT05TT
00077 !                    *****************
00078 !
00079      &( T,XM,XMUL,SU,SV,SW,U,V,W,X,Y,Z,IKLE,NELEM,NELMAX)
00080 !
00081 !***********************************************************************
00082 ! BIEF   V6P2                                   21/08/2010
00083 !***********************************************************************
00084 !
00085 !
00086 !
00087 !
00088 !
00089 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00090 !| IKLE           |-->| CONNECTIVITY TABLE.
00091 !| NELEM          |-->| NUMBER OF ELEMENTS
00092 !| NELMAX         |-->| MAXIMUM NUMBER OF ELEMENTS
00093 !| SU             |-->| STRUCTURE OF FUNCTIONS U
00094 !| SV             |-->| STRUCTURE OF FUNCTIONS V
00095 !| SW             |-->| STRUCTURE OF FUNCTIONS W
00096 !| T              |<->| WORK ARRAY FOR ELEMENT BY ELEMENT DIAGONAL
00097 !| U              |-->| FUNCTION USED IN THE FORMULA
00098 !| V              |-->| FUNCTION USED IN THE FORMULA
00099 !| W              |-->| FUNCTION USED IN THE FORMULA
00100 !| X              |-->| ABSCISSAE OF POINTS
00101 !| Y              |-->| ORDINATES OF POINTS
00102 !| Z              |-->| ELEVATIONS OF POINTS
00103 !| XM             |<->| OFF-DIAGONAL TERMS
00104 !| XMUL           |-->| COEFFICIENT FOR MULTIPLICATION
00105 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00106 !
00107       USE BIEF, EX_MT05TT => MT05TT
00108 !
00109       IMPLICIT NONE
00110       INTEGER LNG,LU
00111       COMMON/INFO/LNG,LU
00112 !
00113 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00114 !
00115       INTEGER, INTENT(IN) :: NELEM,NELMAX
00116       INTEGER, INTENT(IN) :: IKLE(NELMAX,4)
00117 !
00118       DOUBLE PRECISION, INTENT(INOUT) :: T(NELMAX,4),XM(NELMAX,12)
00119 !
00120       DOUBLE PRECISION, INTENT(IN) :: XMUL
00121 !
00122       DOUBLE PRECISION, INTENT(IN) :: X(*),Y(*),Z(*)
00123 !
00124 !     STRUCTURES OF U, V
00125 !
00126       TYPE(BIEF_OBJ),   INTENT(IN) :: SU, SV, SW
00127       DOUBLE PRECISION, INTENT(IN) :: U(*), V(*), W(*)
00128 !
00129 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00130 !
00131 !     SPECIFIC DECLARATIONS
00132 !
00133       DOUBLE PRECISION X2,Y2,Z2,X3,Y3,Z3,X4,Y4,Z4
00134       DOUBLE PRECISION U1,U2,U3,U4,V1,V2,V3,V4,W1,W2,W3,W4
00135       INTEGER I1,I2,I3,I4,IELEM,IELMU
00136 !
00137       DOUBLE PRECISION XSUR120
00138 !
00139 !***********************************************************************
00140 !
00141       XSUR120=XMUL/120.D0
00142 !
00143 !-----------------------------------------------------------------------
00144 !
00145       IELMU = SU%ELM
00146 !      U P1
00147       IF(IELMU.EQ.31.OR.IELMU.EQ.51) THEN
00148 ! AND IELMV=11 AND IELMW=11
00149 !-----------------------------------------------------------------------
00150 !     LOOP ON THE TETRAHEDRONS
00151 !
00152       DO IELEM=1,NELEM
00153 !
00154       I1=IKLE(IELEM,1)
00155       I2=IKLE(IELEM,2)
00156       I3=IKLE(IELEM,3)
00157       I4=IKLE(IELEM,4)
00158 !
00159       U1 = U(I1)
00160       U2 = U(I2)
00161       U3 = U(I3)
00162       U4 = U(I4)
00163       V1 = V(I1)
00164       V2 = V(I2)
00165       V3 = V(I3)
00166       V4 = V(I4)
00167       W1 = W(I1)
00168       W2 = W(I2)
00169       W3 = W(I3)
00170       W4 = W(I4)
00171 !
00172 !-----------------------------------------------------------------------
00173 !
00174       X2=X(I2)-X(I1)
00175       Y2=Y(I2)-Y(I1)
00176       Z2=Z(I2)-Z(I1)
00177       X3=X(I3)-X(I1)
00178       Y3=Y(I3)-Y(I1)
00179       Z3=Z(I3)-Z(I1)
00180       X4=X(I4)-X(I1)
00181       Y4=Y(I4)-Y(I1)
00182       Z4=Z(I4)-Z(I1)
00183 !
00184 !     JACOBIAN : Z2*(X3*Y4-X4*Y3)+Y2*(X4*Z3-X3*Z4)+X2*(Y3*Z4-Y4*Z3)
00185 !
00186 !     VOLUME OF THE TETRAHEDRON:
00187 !
00188 !     (Z2*(X3*Y4-X4*Y3)+Y2*(X4*Z3-X3*Z4)+X2*(Y3*Z4-Y4*Z3))/6
00189 !
00190 !
00191       T(IELEM,1) = (W2*Y2*X3-W2*X2*Y3-V2*Z2*X3-U2*Z2*Y4+V2*
00192      &X2*Z3+U2*Z2*Y3-U4*Z2*Y4+U4*Y4*Z3-U4*Y3*Z4-V4*X
00193      &4*Z3-W4*Y2*X4-W4*X3*Y4-U1*Z2*Y4*2-U1*Y3*Z4*2-W1*Y2*X
00194      &4*2+V1*Z2*X4*2-V1*X2*Z4*2+V1*X3*Z4*2+W1*X2*Y4*2+U3*Y2*Z4+
00195      &U3*Y4*Z3-U3*Y3*Z4-W1*X3*Y4*2-U3*Z2*Y4+V3*Z2*X4+W3
00196      &*X2*Y4+W3*X4*Y3-W3*X3*Y4+U1*Y2*Z4*2+U1*Y4*Z3*2-V1*X4
00197      &*Z3*2+W1*X4*Y3*2-U2*Y2*Z3+W3*Y2*X3+V4*Z2*X4-W3*X2*Y3-W2*Y2*X4
00198      &+W2*X2*Y4+W2*X4*Y3-W2*X3*Y4+V2*X3*Z4+V2*Z2*X4
00199      &-V2*X2*Z4+W4*X2*Y4-V2*X4*Z3+V4*X3*Z4+U2*Y2*Z4
00200      &+U2*Y4*Z3-U2*Y3*Z4-V3*X2*Z4-W3*Y2*X4+U4*Z2*Y3
00201      &-U4*Y2*Z3-V4*Z2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326      &X3*Y4-W2*X4*Y3-W1*X4*Y3+V1*X4*Z3-U1*Y4*Z3+W3*X
00327      &3*Y4-W3*X4*Y3+V3*X4*Z3-V3*X3*Z4+U3*Y3*Z4-U3*Y4
00328      &*Z3-V1*X3*Z4+W1*X3*Y4+U1*Y3*Z4+W4*X3*Y4*2-W4*X4*Y
00329      &3*2+V4*X4*Z3*2-V4*X3*Z4*2+U4*Y3*Z4*2-U4*Y4*Z3*2)*XSUR120 !MAT[2,4]
00330 !
00331       XM(IELEM,12) =
00332      &(W3*Y2*X4+U2*Z2*Y4-U2*Y2*Z4+V2*X2*Z4-V2*
00333      &Z2*X4-W2*X2*Y4+W2*Y2*X4-U1*Y2*Z4-W3*X2*Y4-V3*Z
00334      &2*X4+V3*X2*Z4+U3*Z2*Y4-U3*Y2*Z4-W1*X2*Y4+V1*X2
00335      &*Z4-V1*Z2*X4+W1*Y2*X4+U1*Z2*Y4-W4*X2*Y4*2+W4*Y2*X
00336      &4*2+V4*X2*Z4*2-V4*Z2*X4*2-U4*Y2*Z4*2+U4*Z2*Y4*2)*XSUR120 !MAT[3,4]
00337 !
00338 !-----------------------------------------------------------------------
00339 !
00340       ENDDO ! IELEM
00341 !
00342 !-----------------------------------------------------------------------
00343       ELSEIF (IELMU.EQ.30.OR.IELMU.EQ.50) THEN
00344 ! AND V AND W
00345 !-----------------------------------------------------------------------
00346 !     LOOP ON THE TETRAHEDRONS
00347 !
00348       DO IELEM=1,NELEM
00349 !
00350       I1=IKLE(IELEM,1)
00351       I2=IKLE(IELEM,2)
00352       I3=IKLE(IELEM,3)
00353       I4=IKLE(IELEM,4)
00354 !
00355       U1 = U(IELEM)
00356       U2 = U1
00357       U3 = U1
00358       U4 = U1
00359       V1 = V(IELEM)
00360       V2 = V1
00361       V3 = V1
00362       V4 = V1
00363       W1 = W(IELEM)
00364       W2 = W1
00365       W3 = W1
00366       W4 = W1
00367 !
00368 !-----------------------------------------------------------------------
00369 !
00370       X2=X(I2)-X(I1)
00371       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*Z3-U1*Y4*Z3+W3*X
00522      &3*Y4-W3*X4*Y3+V3*X4*Z3-V3*X3*Z4+U3*Y3*Z4-U3*Y4
00523      &*Z3-V1*X3*Z4+W1*X3*Y4+U1*Y3*Z4+W4*X3*Y4*2-W4*X4*Y
00524      &3*2+V4*X4*Z3*2-V4*X3*Z4*2+U4*Y3*Z4*2-U4*Y4*Z3*2)*XSUR120 !MAT[2,4]
00525 !
00526       XM(IELEM,12) =
00527      &(W3*Y2*X4+U2*Z2*Y4-U2*Y2*Z4+V2*X2*Z4-V2*
00528      &Z2*X4-W2*X2*Y4+W2*Y2*X4-U1*Y2*Z4-W3*X2*Y4-V3*Z
00529      &2*X4+V3*X2*Z4+U3*Z2*Y4-U3*Y2*Z4-W1*X2*Y4+V1*X2
00530      &*Z4-V1*Z2*X4+W1*Y2*X4+U1*Z2*Y4-W4*X2*Y4*2+W4*Y2*X
00531      &4*2+V4*X2*Z4*2-V4*Z2*X4*2-U4*Y2*Z4*2+U4*Z2*Y4*2)*XSUR120 !MAT[3,4]
00532 !
00533       ENDDO ! IELEM
00534 !-----------------------------------------------------------------------
00535       ELSE
00536 !
00537         IF (LNG.EQ.1) WRITE(LU,1000) SU%ELM,SV%ELM,SW%ELM
00538         IF (LNG.EQ.2) WRITE(LU,1001) SU%ELM,SV%ELM,SW%ELM
00539 1000    FORMAT(1X,'MT05TT (BIEF) : MAUVAIS TYPE DE U,V OU W : ',
00540      &  I6,1X,I6,1X,I6)
00541 1001    FORMAT(1X,'MT05TT (BIEF) : WRONG TYPE OF U,V OR W: ',
00542      &  I6,1X,I6,1X,I6)
00543         CALL PLANTE(1)
00544         STOP
00545 !
00546       ENDIF
00547 !-----------------------------------------------------------------------
00548 !
00549       RETURN
00550       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0