From 0d20be4d2ad3bbd9b61f92c29b60f14d0b752e8d Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 8 Nov 2019 11:35:39 +0100 Subject: [PATCH] fix Lot19, interpolation on a new bathymetry for a mesh group --- src/HYDROTools/interpolZ.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/HYDROTools/interpolZ.py b/src/HYDROTools/interpolZ.py index 4d7d93da..e5ef8fd1 100644 --- a/src/HYDROTools/interpolZ.py +++ b/src/HYDROTools/interpolZ.py @@ -424,7 +424,7 @@ def interpolZ_B(bathyName, fichierMaillage, gr_face_name, zUndef=90., interp_met print (ligne) # coords = meshMEDFileRead.getCoords() - #print coords + #print(coords[:,2]) if verbose: nb_comp = coords.getNumberOfComponents() l_info = coords.getInfoOnComponents() @@ -445,8 +445,9 @@ def interpolZ_B(bathyName, fichierMaillage, gr_face_name, zUndef=90., interp_met # tb_aux = np.zeros(nbnodes, dtype=np.bool) # - bathy = np.zeros(nbnodes, dtype=np.float) - bathy.fill(zUndef) + #bathy = np.zeros(nbnodes, dtype=np.float) + #bathy.fill(zUndef) + bathy = coords[:,2].toNumPyArray() # # 4.1. Mesh of the group @@ -477,7 +478,8 @@ def interpolZ_B(bathyName, fichierMaillage, gr_face_name, zUndef=90., interp_met # vx = list() vy = list() - for nodeId in np_aux[0]: + for nid in np_aux[0]: + nodeId = nid.item() vx.append(coords[nodeId, 0]) vy.append(coords[nodeId, 1]) #print ("vx:\n", vx) -- 2.39.2