diff --git a/NEWS.txt b/NEWS.txt index ff007917b507150a9abd00f502401b773fbaedda..84d80f33567a7831f9875bd578894760b8cfa50b 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,9 @@ Latest changes ============== +HERMES: read boundary information in MED files regardless of the presence or +not of a boundary conditions file + TELEMAC-2D: Fix mass balance issue with finite volumes and tracer Initialization of MASSOU for finite volumes kernel Correction of mass balance computation for parellel runs diff --git a/sources/utils/hermes/utils_med.F b/sources/utils/hermes/utils_med.F index fa5c1f21db72dda625105a32ecc31aa35087151b..af38a228e70a0f2eebebb4b5b9803046a5f6a473 100644 --- a/sources/utils/hermes/utils_med.F +++ b/sources/utils/hermes/utils_med.F @@ -2250,7 +2250,6 @@ ! #if defined (HAVE_MED) INTEGER :: MY_ID - INTEGER(KIND=KMED_INT) :: TYPE_ELEM_MED ! !----------------------------------------------------------------------- ! @@ -2262,15 +2261,6 @@ RETURN ENDIF ! -! CONVERTS TYPE OF ELEMENTS - CALL CONVERT_ELEM_TYPE(TYPE_ELEM, TYPE_ELEM_MED, IERR) - IF(IERR.NE.0) THEN - ERROR_MESSAGE = 'ERROR IN '// - & TRIM(MY_OBJ_TAB(MY_ID)%FILE_NAME)//': '// - & 'GET_BND_NELEM_MED:CONVERT_ELEM_TYPE' - RETURN - ENDIF -! ! Identify bnd element if necessary CALL IDENTIFY_BND_ELMT(FILE_ID,TYPE_ELEM,IERR) IF(IERR.NE.0) THEN @@ -5319,7 +5309,7 @@ & 'ALLOCATING IDENTIFY_BND_ELMT:IS_BND' RETURN ENDIF - +! IF(NELEM.NE.0) THEN ! ! READ THE FAMILY NUMBER FOR EACH ELEMENT @@ -5438,20 +5428,27 @@ ENDDO DEALLOCATE(GRP_NAME) ENDDO +! IF(NELEM.NE.0) THEN - ! Looping on all element and checking if their family is in - ! bnd_fam - DO I=1,NELEM - MY_OBJ_TAB(MY_ID)%IS_BND(I) = .FALSE. - DO IFAM=1,NB_FAMILY - IF(NUM_FAMILY(I).EQ. - & MY_OBJ_TAB(MY_ID)%BND_FAM(INT(IFAM),1)) THEN - MY_OBJ_TAB(MY_ID)%IS_BND(I) = - & MY_OBJ_TAB(MY_ID)%BND_FAM(INT(IFAM),2).NE.0 - EXIT - ENDIF + IF(MY_OBJ_TAB(MY_ID)%NBND_GRP.NE.0) THEN + ! Looping on all element and checking if their family is in + ! bnd_fam + MY_OBJ_TAB(MY_ID)%IS_BND(:) = .FALSE. + DO I=1,NELEM + DO IFAM=1,NB_FAMILY + IF(NUM_FAMILY(I).EQ. + & MY_OBJ_TAB(MY_ID)%BND_FAM(INT(IFAM),1)) THEN + MY_OBJ_TAB(MY_ID)%IS_BND(I) = + & MY_OBJ_TAB(MY_ID)%BND_FAM(INT(IFAM),2).NE.0 + EXIT + ENDIF + ENDDO ENDDO - ENDDO + ELSE + ! No boundary conditions file has been provided, all + ! boundary elements are presumed valid + MY_OBJ_TAB(MY_ID)%IS_BND(:) = .TRUE. + ENDIF DEALLOCATE(NUM_FAMILY) ENDIF ENDIF