flupri.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\flupri.f
00002 !
00061                      SUBROUTINE FLUPRI
00062 !                    *****************
00063 !
00064      &( VEC,XMUL,U,V,W,X,Y,Z,IKLE,
00065      &  NELEM,NELMAX,NELEM2D,NPOIN2,NPOIN3,T1,T2,T3)
00066 !
00067 !***********************************************************************
00068 ! TELEMAC3D   V6P1                                   21/08/2010
00069 !***********************************************************************
00070 !
00071 !
00072 !
00073 !
00074 !
00075 !
00076 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00077 !| IKLE           |-->| CONNECTIVITY TABLE (LOCAL TO GLOBAL)
00078 !| NELEM          |-->| NUMBER OF ELEMENTS
00079 !| NELEM2D        |-->| NUMBER OF ELEMENTS IN 2D
00080 !| NELMAX         |-->| MAXIMUM NUMBER OF ELEMENTS
00081 !|                |   | (ADAPTATIVE MESH CASE)
00082 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D
00083 !| NPOIN3         |-->| NUMBER OF 3D POINTS
00084 !| T1             |<->| WORKING ARRAY (METRIC)
00085 !| T2             |<->| WORKING ARRAY (METRIC)
00086 !| T3             |<->| WORKING ARRAY (METRIC)
00087 !| U              |-->| VECTOR COMPONENT PRESENT IN THE FORMULA
00088 !| V              |-->| VECTOR COMPONENT PRESENT IN THE FORMULA
00089 !| VEC            |<->| RESULT VECTOR
00090 !| W              |-->| VECTOR COMPONENT PRESENT IN THE FORMULA
00091 !| X              |-->| COORDINATE
00092 !| XMUL           |-->| MULTIPLYING COEFFICIENT
00093 !| Y              |-->| COORDINATE
00094 !| Z              |-->| COORDINATE
00095 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00096 !
00097       USE BIEF
00098 !
00099       IMPLICIT NONE
00100       INTEGER LNG,LU
00101       COMMON/INFO/LNG,LU
00102 !
00103 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00104 !
00105       INTEGER, INTENT(IN) :: NELEM,NELMAX,NELEM2D,NPOIN2,NPOIN3
00106       DOUBLE PRECISION, INTENT(INOUT) :: VEC(NPOIN3)
00107       INTEGER, INTENT(IN) :: IKLE(NELMAX,6)
00108 !
00109       DOUBLE PRECISION, INTENT(IN)    :: X(NPOIN3),Y(NPOIN3),Z(NPOIN3)
00110       DOUBLE PRECISION, INTENT(IN)    :: XMUL
00111       DOUBLE PRECISION, INTENT(INOUT) :: T1(NELEM2D)
00112       DOUBLE PRECISION, INTENT(INOUT) :: T2(NELEM2D)
00113       DOUBLE PRECISION, INTENT(INOUT) :: T3(NELEM2D)
00114 !
00115       DOUBLE PRECISION, INTENT(IN) :: U(*),V(*),W(*)
00116 !
00117 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00118 !
00119       DOUBLE PRECISION X2,X3,Y2,Y3,NX,NY,NZ,Z2,Z3,F1,F2,F3,XSUR24,F123
00120 !
00121       INTEGER I1,I2,I3,IELEM
00122 !
00123 !**********************************************************************
00124 !
00125       XSUR24 = XMUL/24.D0
00126 !
00127 !     LOOP ON THE 2D ELEMENTS
00128 !
00129       DO IELEM = 1,NELEM2D
00130 !
00131 !       BOTTOM
00132 !
00133         I1 = IKLE(IELEM,1)
00134         I2 = IKLE(IELEM,2)
00135         I3 = IKLE(IELEM,3)
00136 !
00137         X2 = X(I2) - X(I1)
00138         X3 = X(I3) - X(I1)
00139         Y2 = Y(I2) - Y(I1)
00140         Y3 = Y(I3) - Y(I1)
00141         Z2 = Z(I2) - Z(I1)
00142         Z3 = Z(I3) - Z(I1)
00143 !       OUTGOING NORMAL (NOT NORMALISED)
00144         NX =  (Z2*Y3-Z3*Y2)
00145         NY =  (X2*Z3-X3*Z2)
00146         NZ = -(X2*Y3-X3*Y2)
00147 !
00148         F1 = U(I1)*NX+V(I1)*NY+W(I1)*NZ
00149         F2 = U(I2)*NX+V(I2)*NY+W(I2)*NZ
00150         F3 = U(I3)*NX+V(I3)*NY+W(I3)*NZ
00151 !
00152         F123 = F1 + F2 + F3
00153 !
00154         T1(IELEM) = XSUR24 * ( F123 + F1 )
00155         T2(IELEM) = XSUR24 * ( F123 + F2 )
00156         T3(IELEM) = XSUR24 * ( F123 + F3 )
00157 !
00158 !       ASSEMBLY
00159 !
00160         VEC(I1) = VEC(I1) + T1(IELEM)
00161         VEC(I2) = VEC(I2) + T2(IELEM)
00162         VEC(I3) = VEC(I3) + T3(IELEM)
00163 !
00164 !       FREE SURFACE (IDEM EXCEPT FOR POINTS NUMBERS AND REVERSED NORMAL)
00165 !
00166         I1 = I1 + NPOIN3-NPOIN2
00167         I2 = I2 + NPOIN3-NPOIN2
00168         I3 = I3 + NPOIN3-NPOIN2
00169 !
00170 !       X2 = X(I2) - X(I1)
00171 !       X3 = X(I3) - X(I1)
00172 !       Y2 = Y(I2) - Y(I1)
00173 !       Y3 = Y(I3) - Y(I1)
00174         Z2 = Z(I2) - Z(I1)
00175         Z3 = Z(I3) - Z(I1)
00176 !       OUTGOING NORMAL (NOT NORMALISED)
00177         NX = -(Z2*Y3-Z3*Y2)
00178         NY = -(X2*Z3-X3*Z2)
00179         NZ = +(X2*Y3-X3*Y2)
00180 !
00181         F1 = U(I1)*NX+V(I1)*NY+W(I1)*NZ
00182         F2 = U(I2)*NX+V(I2)*NY+W(I2)*NZ
00183         F3 = U(I3)*NX+V(I3)*NY+W(I3)*NZ
00184 !
00185         F123 = F1 + F2 + F3
00186 !
00187         T1(IELEM) = XSUR24 * ( F123 + F1 )
00188         T2(IELEM) = XSUR24 * ( F123 + F2 )
00189         T3(IELEM) = XSUR24 * ( F123 + F3 )
00190 !
00191 !       ASSEMBLY
00192 !
00193         VEC(I1) = VEC(I1) + T1(IELEM)
00194         VEC(I2) = VEC(I2) + T2(IELEM)
00195         VEC(I3) = VEC(I3) + T3(IELEM)
00196 !
00197       ENDDO
00198 !
00199 !-----------------------------------------------------------------------
00200 !
00201       RETURN
00202       END

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