diff --git a/NEWS.txt b/NEWS.txt index b446a1b2ae293fda2910a729fecd52144b572793..5a4f247d10d2738ac846259c04bc1818508eca20 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -18,6 +18,10 @@ TELEMAC-3D: New keywords SIGMA DISTRIBUTION OF PLANES and PRESCRIBED ELEVATION OF PLANES to set vertical planes directly in the steering file +PYTHON: TelemacFile.print_info now correctly displays the number of interface +points if any, as well as the number of boundary points and elements regardless +of the presence or not of a boundary conditions file. + TOMAWAC: fix time series for wave directions MASCARET: Reference Documentation has been added diff --git a/scripts/python3/data_manip/extraction/telemac_file.py b/scripts/python3/data_manip/extraction/telemac_file.py index b8eaca277455e6cf9d7dbb20c196517ffdfde592..f1a0f83b03063b7beb7cc1f34888ed90c05f96bb 100644 --- a/scripts/python3/data_manip/extraction/telemac_file.py +++ b/scripts/python3/data_manip/extraction/telemac_file.py @@ -426,11 +426,7 @@ class TelemacFile(HermesFile if HERMES_AVAIL else SerafinFile): Returns the number of boundary elements """ if self._nelebd is None: - if self.boundary_file is not None: - self._nelebd = self.get_bnd_npoin() - else: - raise TelemacException( - "Can not read nelebd no boundary file was given") + self._nelebd = self.get_bnd_nelem() return self._nelebd @@ -2084,22 +2080,17 @@ class TelemacFile(HermesFile if HERMES_AVAIL else SerafinFile): if self.nptir == 0: print(" - No parallel information") else: - print(" - Number of interface points: {}".format(self.nptfr)) + print(" - Number of interface points: {}".format(self.nptir)) print(" - Local ot Global numbering {}".format(self.knolg)) print() print("~> Boundary info") print() - if self.boundary_file is None: - print(" - No boundary file given") - else: - print(" - Boundary element type: {}" - .format(elem2str(self.typ_bnd_elem))) - - print(" - Number of bnd points: {}".format(self.nptfr)) - print(" - Number of bnd elements: {}".format(self.nelebd)) - - # TODO: display stuff on boundary values ? + print(" - Number of boundary points: {}".format(self.nptfr)) + print( + " - Boundary element type: {}".format(elem2str(self.typ_bnd_elem)) + ) + print(" - Number of boundary elements: {}".format(self.nelebd)) print() print("~> Data info")