findksce.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\findksce.f
00002 !
00052                      SUBROUTINE FINDKSCE
00053 !                    *******************
00054 !
00055      &(NPOIN2,NPLAN,Z,NSCE,ISCE,ZSCE,KSCE,INFO)
00056 !
00057 !***********************************************************************
00058 ! TELEMAC3D   V6P1                                   21/08/2010
00059 !***********************************************************************
00060 !
00061 !
00062 !
00063 !
00064 !
00065 !
00066 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00067 !| INFO           |-->| IF YES, LISTING PRINTOUT
00068 !| ISCE           |-->| NODE ADRESSES IN 2D MESH FOR SOURCES
00069 !| KSCE           |<->| NUMBER OF PLANE FOR SOURCES
00070 !| NPLAN          |-->| NUMBER OF PLANES IN THE 3D MESH OF PRISMS
00071 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D
00072 !| NSCE           |-->| NUMBER OF GIVEN POINTS FOR SOURCES
00073 !| Z              |-->| Z COORDINATES
00074 !| ZSCE           |-->| COORDINATES OF GIVEN POINTS
00075 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00076 !
00077       IMPLICIT NONE
00078       INTEGER LNG,LU
00079       COMMON/INFO/LNG,LU
00080 !
00081 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00082 !
00083       INTEGER, INTENT(IN)    :: NPOIN2,NPLAN,NSCE
00084       INTEGER, INTENT(IN)    :: ISCE(NSCE)
00085       INTEGER, INTENT(INOUT) :: KSCE(NSCE)
00086 !
00087       DOUBLE PRECISION, INTENT(IN) :: Z(NPOIN2,NPLAN)
00088       DOUBLE PRECISION, INTENT(IN) :: ZSCE(NSCE)
00089 !
00090       LOGICAL, INTENT(IN) :: INFO
00091 !
00092 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00093 !
00094       INTEGER K,I
00095 !
00096       DOUBLE PRECISION DISTANCE,TEMPO
00097 !
00098       INTRINSIC ABS
00099 !
00100 !-----------------------------------------------------------------------
00101 !
00102       DO I=1,NSCE
00103 !
00104         DISTANCE=1.D10
00105         KSCE(I)=0
00106 !
00107         IF(ISCE(I).GT.0) THEN
00108 !
00109           DO K=1,NPLAN
00110             TEMPO=ABS(ZSCE(I)-Z(ISCE(I),K))
00111             IF(TEMPO.LT.DISTANCE) THEN
00112               DISTANCE=TEMPO
00113               KSCE(I)=K
00114             ENDIF
00115           ENDDO
00116 !
00117 !-----------------------------------------------------------------------
00118 !
00119           IF(INFO.AND.LNG.EQ.1) THEN
00120             WRITE(LU,*) 'POINT SOURCE ',I,' ASSIMILE AU PLAN ',KSCE(I)
00121             WRITE(LU,*) 'SITUE A ',DISTANCE,' METRES'
00122           ENDIF
00123           IF(INFO.AND.LNG.EQ.2) THEN
00124             WRITE(LU,*) 'SOURCE POINT ',I,' PUT ON PLANE ',KSCE(I)
00125             WRITE(LU,*) 'LOCATED AT ',DISTANCE,' METRES'
00126           ENDIF
00127 !
00128         ENDIF
00129 !
00130       ENDDO
00131 !
00132 !-----------------------------------------------------------------------
00133 !
00134       RETURN
00135       END

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