cltrac.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\cltrac.f
00002 !
00077                      SUBROUTINE CLTRAC
00078 !                    *****************
00079 !
00080      &(NWEIRS,NPSING,NDGA1,NDGB1,ZF,ZDIG,H,T,NBOR,LITBOR,TBOR,NTRAC)
00081 !
00082 !***********************************************************************
00083 ! TELEMAC2D   V6P3                                   21/08/2010
00084 !***********************************************************************
00085 !
00086 !
00087 !
00088 !
00089 !
00090 !
00091 !
00092 !
00093 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00094 !| H              |-->| WATER DEPTH
00095 !| LITBOR         |-->| TYPE OF BOUNDARY CONDITIONS ON TRACERS
00096 !| NBOR           |-->| GLOBAL NUMBER OF BOUNDARY POINTS
00097 !| NTRAC          |-->| NUMBER OF TRACERS
00098 !| NPSING         |-->| NUMBER OF POINTS FOR EVERY SINGULARITY.
00099 !| NDGA1          |-->| NDGA1%ADR(I)%I(NP) : BOUNDARY NUMBER OF POINT NP
00100 !|                |   | OF WEIR I (side1)
00101 !| NDGB1          |-->| NDGB1%ADR(I)%I(NP) : BOUNDARY NUMBER OF POINT NP
00102 !|                |   | OF WEIR I (side2)
00103 !| NWEIRS         |-->| NUMBER OF SINGULARITIES
00104 !| T              |-->| BLOCK OF TRACERS
00105 !| TBOR           |<--| PRESCRIBED BOUNDARY CONDITION ON TRACER
00106 !| ZDIG           |-->| ELEVATIONS OF POINTS OF WEIRS
00107 !| ZF             |-->| BOTTOM TOPOGRAPHY
00108 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00109 !
00110       USE BIEF
00111 !
00112       IMPLICIT NONE
00113       INTEGER LNG,LU
00114       COMMON/INFO/LNG,LU
00115 !
00116 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00117 !
00118       INTEGER, INTENT(IN)           :: NWEIRS,NTRAC
00119       INTEGER, INTENT(IN)           :: NBOR(*)
00120       DOUBLE PRECISION, INTENT(IN)  :: ZF(*),H(*)
00121 !
00122       TYPE(BIEF_OBJ)  , INTENT(IN)  :: NPSING,NDGA1,NDGB1
00123       TYPE(BIEF_OBJ)  , INTENT(IN)  :: ZDIG
00124       TYPE(BIEF_OBJ), INTENT(INOUT) :: LITBOR,TBOR
00125       TYPE(BIEF_OBJ), INTENT(IN)    :: T
00126 !
00127 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00128 !
00129       INTEGER I,I1,I2,N,N1,N2,ITRAC
00130 !
00131       DOUBLE PRECISION Z1,Z2,T1,T2
00132 !
00133       DOUBLE PRECISION P_DMAX,P_DMIN
00134       EXTERNAL         P_DMAX,P_DMIN
00135 !
00136 !-----------------------------------------------------------------------
00137 !
00138       DO ITRAC=1,NTRAC
00139 !
00140         DO N=1,NWEIRS
00141         DO I=1,NPSING%I(N)
00142 !
00143           I1 = NDGA1%ADR(N)%P%I(I)
00144           I2 = NDGB1%ADR(N)%P%I(I)
00145           IF(I1.GT.0) THEN
00146             N1=NBOR(I1)
00147             Z1=H(N1)+ZF(N1)
00148             T1=T%ADR(ITRAC)%P%R(N1)
00149           ELSE
00150             Z1=0.D0
00151             T1=0.D0
00152           ENDIF
00153           IF(I2.GT.0) THEN
00154             N2=NBOR(I2)
00155             Z2=H(N2)+ZF(N2)
00156             T2=T%ADR(ITRAC)%P%R(N2)
00157           ELSE
00158             Z2=0.D0
00159             T2=0.D0
00160           ENDIF
00161 !
00162           IF(NCSIZE.GT.1) THEN
00163             Z1=P_DMAX(MAX(Z1,0.D0))-P_DMIN(MAX(-Z1,0.D0))
00164             Z2=P_DMAX(MAX(Z2,0.D0))-P_DMIN(MAX(-Z2,0.D0))
00165             T1=P_DMAX(MAX(T1,0.D0))-P_DMIN(MAX(-T1,0.D0))
00166             T2=P_DMAX(MAX(T2,0.D0))-P_DMIN(MAX(-T2,0.D0))
00167           ENDIF
00168 !
00169 !         POINT 1
00170 !
00171           IF(I1.GT.0) THEN
00172             IF(Z1.GT.Z2.AND.Z1.GT.ZDIG%ADR(N)%P%R(I)) THEN
00173               TBOR%ADR(ITRAC)%P%R(I1)=T1
00174               LITBOR%ADR(ITRAC)%P%I(I1)=4
00175             ELSEIF(Z2.GE.Z1.AND.Z2.GT.ZDIG%ADR(N)%P%R(I)) THEN
00176               TBOR%ADR(ITRAC)%P%R(I1)=T2
00177               LITBOR%ADR(ITRAC)%P%I(I1)=5
00178             ELSE
00179               LITBOR%ADR(ITRAC)%P%I(I1)=2
00180             ENDIF
00181           ENDIF
00182 !
00183 !         POINT 2
00184 !
00185           IF(I2.GT.0) THEN
00186             IF(Z1.GT.Z2.AND.Z1.GT.ZDIG%ADR(N)%P%R(I)) THEN
00187               TBOR%ADR(ITRAC)%P%R(I2)=T1
00188               LITBOR%ADR(ITRAC)%P%I(I2)=5
00189             ELSEIF(Z2.GE.Z1.AND.Z2.GT.ZDIG%ADR(N)%P%R(I)) THEN
00190               TBOR%ADR(ITRAC)%P%R(I2)=T2
00191               LITBOR%ADR(ITRAC)%P%I(I2)=4
00192             ELSE
00193               LITBOR%ADR(ITRAC)%P%I(I2)=2
00194             ENDIF
00195           ENDIF
00196 !
00197         ENDDO ! I
00198         ENDDO ! N
00199 !
00200       ENDDO
00201 !
00202 !-----------------------------------------------------------------------
00203 !
00204       RETURN
00205       END

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