leclis.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\sisyphe\leclis.f
00002 !
00089                      SUBROUTINE LECLIS
00090 !                    *****************
00091 !
00092      &(LIEBOR,LIHBOR,LIQBOR,EBOR,Q2BOR,NPTFR,NBOR,
00093      & STDGEO,NLIM,KENT,ISEG,XSEG,YSEG,
00094      & NACHB,NUMLIQ,NSICLA,AFBOR,BFBOR,BOUNDARY_COLOUR,MESH)
00095 !
00096 !***********************************************************************
00097 ! SISYPHE   V6P2                                   21/07/2011
00098 !***********************************************************************
00099 !
00100 !
00101 !
00102 !
00103 !
00104 !
00105 !
00106 !
00107 !
00108 !
00109 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00110 !| AFBOR          |<->| BOUNDARY CONDITION ON F: NU*DF/DN=AFBOR*F+BFBOR
00111 !| BFBOR          |<->| BOUNDARY CONDITION ON F: NU*DF/DN=AFBOR*F+BFBOR
00112 !| BOUNDARY_COLOUR|<->| COLOUR OF BOUNDARY POINT (DEFAULT: ITS RANK)
00113 !| EBOR           |<->| PRESCRIBED EVOLUTION ON THE BOUNDARY
00114 !| ISEG           |<->| NUMBER OF SEGMENTS ON THE BOUNDARY
00115 !| KENT           |-->| CONVENTION FOR LIQUID INPUT WITH PRESCRIBED VALUE
00116 !| LIEBOR         |<->| TYPE OF BOUNDARY CONDITIONS FOR BED EVOLUTION
00117 !| LIHBOR         |<->| TYPE OF BOUNDARY CONDITIONS FOR DEPTH
00118 !| LIQBOR         |<->| TYPE OF BOUNDARY CONDITIONS FOR SOLID DISCHARGE
00119 !| MESH           |<->| MESH STRUCTURE
00120 !| NACHB          |<->| NUMBER OF NEIGHBOUR POINT ****
00121 !| NBOR           |<->| ADRESSES DES POINTS DE BORD.
00122 !| NLIM           |-->| NUMERO DE CANAL DU FICHIER DES CONDITIONS LIM.
00123 !| NPTFR          |-->| NUMBER OF BOUNDARY POINTS
00124 !| NSICLA         |-->| NUMBER OF SIZE CLASSES FOR BED MATERIALS
00125 !| NUMLIQ         |-->| LIQUID BOUNDARY NUMBER OF BOUNDARY POINTS
00126 !| Q2BOR          |<->| PRESCRIBED SOLID DISCHARGES ON THE BOUNDARY
00127 !| STDGEO         |-->| STANDARD OF GEOMETRY FILE
00128 !| XSEG           |---| A SUPPRIMER
00129 !| YSEG           |---| A SUPPRIMER
00130 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00131 !
00132       USE BIEF
00133 !
00134       IMPLICIT NONE
00135       INTEGER LNG,LU
00136       COMMON/INFO/LNG,LU
00137 !
00138 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00139 !
00140       INTEGER, INTENT(IN)            :: NPTFR
00141       INTEGER, INTENT(INOUT)         :: LIEBOR(NPTFR),LIHBOR(NPTFR)
00142       INTEGER, INTENT(INOUT)         :: LIQBOR(NPTFR)
00143       TYPE(BIEF_OBJ),INTENT(INOUT)   :: EBOR,Q2BOR
00144       INTEGER, INTENT(INOUT)         :: NBOR(NPTFR)
00145       INTEGER, INTENT(INOUT)         :: BOUNDARY_COLOUR(NPTFR)
00146       INTEGER, INTENT(IN)            :: STDGEO,NLIM,KENT,NSICLA
00147       DOUBLE PRECISION, INTENT(INOUT):: XSEG(NPTFR),YSEG(NPTFR)
00148       INTEGER, INTENT(INOUT)         :: ISEG(NPTFR),NACHB(NBMAXNSHARE,*)
00149       INTEGER, INTENT(INOUT)         :: NUMLIQ(*)
00150       DOUBLE PRECISION, INTENT(INOUT):: AFBOR(NPTFR),BFBOR(NPTFR)
00151       TYPE(BIEF_MESH), INTENT(INOUT) :: MESH
00152 !
00153 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00154 !
00155       INTEGER IBID,PTIR,I,K,IF1,IF2,IF3,IF4,IF5,IF6,IF7
00156       DOUBLE PRECISION BID
00157 !
00158 !-----------------------------------------------------------------------
00159 !
00160       REWIND NLIM
00161 !
00162 !-----------------------------------------------------------------------
00163 !
00164 ! READS ALL THE LINES IN THE BOUNDARY CONDITION FILE
00165 !
00166 !
00167         DO K=1,NPTFR
00168 !
00169         IF(STDGEO.EQ.3 .AND. NCSIZE.LE.1) THEN
00170           READ(NLIM,*) LIHBOR(K),LIQBOR(K),IBID,Q2BOR%R(K),
00171      &                 BID,BID,BID,
00172      &                 LIEBOR(K),EBOR%R(K),AFBOR(K),BFBOR(K),
00173      &                 NBOR(K),BOUNDARY_COLOUR(K)
00174         ELSEIF(STDGEO.EQ.3 .AND. NCSIZE.GT.1) THEN
00175           READ(NLIM,*) LIHBOR(K),LIQBOR(K),IBID,Q2BOR%R(K),
00176      &                 BID,BID,BID,
00177      &                 LIEBOR(K),EBOR%R(K),AFBOR(K),BFBOR(K),
00178      &                 NBOR(K),BOUNDARY_COLOUR(K),
00179      &                 ISEG(K),XSEG(K),YSEG(K),NUMLIQ(K)
00180 !
00181         ELSE
00182           IF(LNG.EQ.1) WRITE(LU,21) STDGEO
00183           IF(LNG.EQ.2) WRITE(LU,22) STDGEO
00184           CALL PLANTE(1)
00185           STOP
00186         ENDIF
00187 !
00188         ENDDO
00189 !
00190 21        FORMAT(1X,'LECLIS : STANDARD DU FICHIER DE GEOMETRIE : ',1I6,/
00191      &           1X,'         CETTE VALEUR EST INCONNUE ET       ',    /
00192      &           1X,'         LE FICHIER DES CONDITIONS LIMITES  ',    /
00193      &           1X,'         EN DEPEND |')
00194 22        FORMAT(1X,'LECLIS : GEOMETRY FILE STANDARD : ',I6   ,/
00195      &           1X,'         UNKNOWN PARAMETER AND BOUNDARY ',/
00196      &           1X,'         CONDITIONS FILE DEPENDS ON IT !')
00197 !23        FORMAT(1X,'LECLIS : ERREUR LIGNE ',I5,' DANS LE FICHIER DES',
00198 !     &         /,1X,'         CONDITIONS AUX LIMITES, POINT DE BORD',
00199 !     &         /,1X,'         NUMERO ',I5,' AU LIEU DE ',I5)
00200 !24        FORMAT(1X,'LECLIS : ERROR LINE ',I5,' IN BOUNDARY CONDITIONS',
00201 !     &         /,1X,'         FILE, BOUNDARY POINT NUMBER ',I5,
00202 !     &         /,1X,'         INSTEAD OF ',I5)
00203 !
00204 !-----------------------------------------------------------------------
00205 !
00206 !  CHECKS, CORRECTS AND STORES :
00207 !
00208         DO K=1,NPTFR
00209 !
00210           IF(LIEBOR(K).NE.KENT) EBOR%R(K)=0.D0
00211 !
00212 !         NOW DONE IN CONLIT WITH A COEFFICIENT AVAIL
00213 !
00214 !         COPIES THE SAME EBOR FOR ALL CLASSES
00215 !         IF(NSICLA.GE.2) THEN
00216 !           DO I=2,NSICLA
00217 !             EBOR%ADR(I)%P%R(K)=EBOR%ADR(1)%P%R(K)
00218 !           ENDDO
00219 !         ENDIF
00220 !
00221         ENDDO
00222 !
00223 !-----------------------------------------------------------------------
00224 !
00225 !  IN PARALLEL MODE : READS NPTIR AND NACHB
00226 !
00227       IF(NCSIZE.GT.1) THEN
00228         READ(NLIM,*) PTIR
00229         IF(NPTIR.NE.PTIR) THEN
00230           IF(LNG.EQ.1) WRITE(LU,151) NPTIR,PTIR
00231           IF(LNG.EQ.2) WRITE(LU,152) NPTIR,PTIR
00232 151       FORMAT(1X,'LECLIS : INCOHERENCE ENTRE GEOMETRIE ',/,1X,
00233      &              '         ET CONDITIONS AUX LIMITES'   ,/,1X,I6,
00234      &    ' POINTS INTERFACE DANS LA GEOMETRIE',/,1X,I6,
00235      &    ' POINTS INTERFACE DANS LE FICHIER CONLIM')
00236 152       FORMAT(1X,'LECLIS : DIFFERENCE BETWEEN GEOMETRY ',/,1X,
00237      &              '         AND BOUNDARY CONDITIONS'   ,/,1X,I6,
00238      &    ' INTERFACE POINTS IN GEOMETRY',/,1X,I6,
00239      &    ' INTERFACE POINTS IN CONLIM FILE')
00240         ENDIF
00241         DO K=1,NPTIR
00242           READ(NLIM,*) (NACHB(I,K),I=1,NBMAXNSHARE)
00243         ENDDO
00244 !
00245 !       JAJ //// READ THE NEIGHBOURHOODS FOR HALO CELLS ALONG THE INTERFACES
00246 !       FILLING PATTERN: IFAPAR(1:7,K), K=1:NHALO
00247 !                        -> NHALO: NUMBER OF HALO CELLS IN THIS PARTITION
00248 !
00249 !       IFAPAR(1,K)   : HALO ELEMENT -LOCAL- NUMBER IN THIS PARTITION
00250 !       IFAPAR(2:4,K) : PROCESSOR NUMBERS BEHIND THE 3 ELEMENT EDGES
00251 !       IFAPAR(5:7,K) : -LOCAL- ELEMENT NUMBERS BEHIND THE 3 EDGES
00252 !                       IN THE NUMBERING OF PARTITIONS THEY BELONG TO
00253 !       ACTUALLY, NOT ALL OF THAT IS REQUIRED AND CAN BE OPTIMISED
00254 !       AFTER THE DEVELOPMENT STAGE IS OVER
00255 !
00256         READ(NLIM,*,ERR=901) NHALO
00257         IF(NHALO.GT.2*NPTIR) THEN ! SEE BIEF LIBRARY, SUBROUTINE ALMESH
00258           WRITE(LU,*) ' => NHALO>2*NPTIR DETECTED IN BC FILE'
00259           CALL PLANTE(1)
00260           STOP
00261         ENDIF
00262         DO K=1,NHALO
00263 !         READ(NLIM,*,ERR=901) (MESH%IFAPAR%I(7*(K-1)+I),I=1,7)
00264           READ(NLIM,*,ERR=901) IF1,IF2,IF3,IF4,IF5,IF6,IF7
00265 !
00266 !         CORRECTING A BUG (IN IFAPAR THERE IS A CONFUSION BETWEEN PROCESSOR 0
00267 !                           AND LIQUID BOUNDARY BUT
00268 !                           IN CASE OF LIQUID BOUNDARY, THE ELEMENT BEHIND
00269 !                           IS GIVEN AS 0, SO BOTH CASES MAY BE DISTINGUISHED
00270 !                           HERE ALL BOUNDARIES (LIQUID OR SOLID) ARE PUT AT -1
00271 !
00272           IF(IF5.EQ.0) IF2=-1
00273           IF(IF6.EQ.0) IF3=-1
00274           IF(IF7.EQ.0) IF4=-1
00275           MESH%IFAPAR%I(6*(IF1-1)+1)=IF2
00276           MESH%IFAPAR%I(6*(IF1-1)+2)=IF3
00277           MESH%IFAPAR%I(6*(IF1-1)+3)=IF4
00278           MESH%IFAPAR%I(6*(IF1-1)+4)=IF5
00279           MESH%IFAPAR%I(6*(IF1-1)+5)=IF6
00280           MESH%IFAPAR%I(6*(IF1-1)+6)=IF7
00281         ENDDO
00282       ENDIF
00283 !
00284       GO TO 1000
00285 !
00286 !-----------------------------------------------------------------------
00287 !
00288 !JAJ //// BE PRECISE IN THE CASE OF THE BC FILE APPENDIX
00289 901   CONTINUE
00290       WRITE (LU,*) 'LECLIM: ',
00291      &             'ERROR IN READING IFAPAR IN THE BC CONDITIONS FILE'
00292       CALL PLANTE(1)
00293       STOP
00294 !
00295 !-----------------------------------------------------------------------
00296 !
00297 1000  CONTINUE
00298 !
00299 !-----------------------------------------------------------------------
00300 !
00301       RETURN
00302       END

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