From: Paul RASCLE Date: Thu, 18 May 2017 07:22:30 +0000 (+0200) Subject: correction ecriture champs BOTTOM et FRICTION X-Git-Tag: Salome_8_3_Hydro_1_1rc1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e7e82da43f8a23e87044677139f83b2654da0882;p=modules%2Fhydro.git correction ecriture champs BOTTOM et FRICTION --- diff --git a/src/HYDROTools/interpolS.py b/src/HYDROTools/interpolS.py index aaf31353..587a45d5 100644 --- a/src/HYDROTools/interpolS.py +++ b/src/HYDROTools/interpolS.py @@ -80,11 +80,11 @@ def assignStrickler(case_name, med_file_name, output_file_name, med_field_name=' medfield.MEDfieldCr(fid, med_field_name, medfile.MED_FLOAT64, 1, comp, '', '', mesh_name) - medfield.MEDfieldValueWr(fid, med_field_name, medenum.MED_NO_DT, medenum.MED_NO_IT, 0.0, + medfield.MEDfieldValueWr(fid, med_field_name, 0, medenum.MED_NO_IT, 0.0, medenum.MED_NODE, medenum.MED_NONE, medenum.MED_FULL_INTERLACE, medenum.MED_ALL_CONSTITUENT, len(values), values) print "MED field '%s' on %s nodes has been created." % (med_field_name, nb_nodes) # close MED file - medfile.MEDfileClose(fid) \ No newline at end of file + medfile.MEDfileClose(fid) diff --git a/src/HYDROTools/interpolZ.py b/src/HYDROTools/interpolZ.py old mode 100644 new mode 100755 index bf6a48ee..ec0e96c7 --- a/src/HYDROTools/interpolZ.py +++ b/src/HYDROTools/interpolZ.py @@ -103,7 +103,7 @@ def createZfield1(fichierMaillage): # --- ecriture du champ - medfield.MEDfieldValueWr(fid, nomcha1, medenum.MED_NO_DT, medenum.MED_NO_IT, 0.0, + medfield.MEDfieldValueWr(fid, nomcha1, 0, medenum.MED_NO_IT, 0.0, medenum.MED_NODE, medenum.MED_NONE, medenum.MED_FULL_INTERLACE, medenum.MED_ALL_CONSTITUENT, nnoe, valz) # --- fermeture du fichier @@ -136,6 +136,7 @@ def createZfield2(fichierMaillage): fieldOnNodes.setName("BOTTOM") fieldOnNodes.setMesh(mymesh) fieldOnNodes.setArray(mymesh.getCoords()[:,2]) + fieldOnNodes.setTime(0.0,0,-1) mm=MEDFileMesh.New(fichierZMaillage) mm.write(fichierFMaillage,2) MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fichierFMaillage,fieldOnNodes) @@ -233,7 +234,7 @@ def interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod stdz = np.std(vz) v05z = np.percentile(vz,05) v95z = np.percentile(vz,95) - + statz[grp.GetName()] = (minz, maxz, meanz, stdz, v05z, v95z)