From 22d1588c94732d2d9a6dda2bfaf9b8613d1b6b17 Mon Sep 17 00:00:00 2001 From: vincentcasseau Date: Wed, 18 Sep 2024 10:35:04 +0200 Subject: [PATCH 1/2] Apps: test: setting tolerance for IBMOutletControlPressure_t1 --- Cassiopee/Apps/test/IBMOutletControlPressure_t1.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cassiopee/Apps/test/IBMOutletControlPressure_t1.py b/Cassiopee/Apps/test/IBMOutletControlPressure_t1.py index 228821c7e..ea526bc51 100644 --- a/Cassiopee/Apps/test/IBMOutletControlPressure_t1.py +++ b/Cassiopee/Apps/test/IBMOutletControlPressure_t1.py @@ -13,6 +13,7 @@ import Connector.IBM as X_IBM import os +test.TOLERANCE = 5.e-7 LOCAL = test.getLocal() FastC.MX_SYNCHRO= 1761 From 8878c3cb03d1c2c08cab81b519d8aed08af4de0f Mon Sep 17 00:00:00 2001 From: vincentcasseau Date: Wed, 18 Sep 2024 14:18:08 +0200 Subject: [PATCH 2/2] Connector: fixes in i8 --- Cassiopee/Connector/Connector/OversetDataElsA.py | 16 ++++++++-------- .../test/computeFrictionVelocityPT_t1.py | 2 +- .../Connector/test/extractIBMWallFieldsPT_t1.py | 2 +- Cassiopee/Connector/test/setIBCDataPT_t1.py | 7 ++++--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cassiopee/Connector/Connector/OversetDataElsA.py b/Cassiopee/Connector/Connector/OversetDataElsA.py index b45a5b2f3..d8d28a717 100644 --- a/Cassiopee/Connector/Connector/OversetDataElsA.py +++ b/Cassiopee/Connector/Connector/OversetDataElsA.py @@ -367,10 +367,10 @@ def _setSeqInterpolations(a, depth=2, double_wall=0, storage='inverse', prefixFi isperiodic = periodicZones[nozd] if isperiodic == 2: print('Periodic interpolation from +theta: %d.'%interpType.shape[0]) - interpType = 102*numpy.ones((interpType.shape[0]),numpy.int32) + interpType = 102*numpy.ones((interpType.shape[0]), Internal.E_NpyInt) elif isperiodic == 3: print('Periodic interpolation from -theta: %d.'%interpType.shape[0]) - interpType = 103*numpy.ones((interpType.shape[0]),numpy.int32) + interpType = 103*numpy.ones((interpType.shape[0]), Internal.E_NpyInt) resInterp[5][nozd] = interpType zdonor = Internal.getNodesFromName(a,zdonorname)[0] # ---------------------------------------- @@ -411,8 +411,8 @@ def _setSeqInterpolations(a, depth=2, double_wall=0, storage='inverse', prefixFi else: listEXdir[donorId]=[EXdir] else: # no interpolation domain found - if depth == 2: indicesOrphan = numpy.array(interpCells[1][3],dtype='int32') - elif depth == 1: indicesOrphan = numpy.array(EXPts[1][3],dtype='int32') + if depth == 2: indicesOrphan = numpy.array(interpCells[1][3], dtype=Internal.E_NpyInt) + elif depth == 1: indicesOrphan = numpy.array(EXPts[1][3], dtype=Internal.E_NpyInt) # on cree une zone subregion avec les pts orphelins nameSubRegion='Orphan_'+z[0] z[2].append([nameSubRegion, None, [],'ZoneSubRegion_t']) @@ -451,7 +451,7 @@ def _interpInverseStorage(zname, zdonor, nozd, resInterp, depth): indRcv = resInterp[0][nozd]; interpCoef=resInterp[3][nozd]; interpVol=resInterp[4][nozd]; interpType=resInterp[5][nozd] indicesExtrap = resInterp[6][nozd]; - if depth == 2: EXdir=numpy.array([],numpy.int32) + if depth == 2: EXdir=numpy.array([], Internal.E_NpyInt) elif depth == 1: EXdir = resInterp[8][nozd] cellIndExtrap = indicesExtrap; cellIndOrphan = indicesOrphan coef=interpCoef; vol=interpVol; interptype=interpType @@ -477,7 +477,7 @@ def _interpDirectStorage(z, zdonorname, nozd, resInterp, depth): indRcv = resInterp[0][nozd]; interpCoef=resInterp[3][nozd] interpVol=resInterp[4][nozd]; interpType=resInterp[5][nozd] indicesExtrap = resInterp[6][nozd]; - if depth == 2: EXdir=numpy.array([],numpy.int32) + if depth == 2: EXdir=numpy.array([], Internal.E_NpyInt) elif depth == 1: EXdir = resInterp[8][nozd] cellIndExtrap = indicesExtrap; cellIndOrphan = indicesOrphan coef = interpCoef; vol = interpVol; interptype = interpType @@ -722,7 +722,7 @@ def inverseChimeraTransfer__(t, variables, locinterp='centers', mesh='extended') v2 = v.split(':',1)[1] if variables.index(v) == len(variables)-1: vars2=vars2+v2 else: vars2=vars2+v2+',' - cellRcvPara = numpy.arange(cellRcv.shape[0],dtype=numpy.int32) + cellRcvPara = numpy.arange(cellRcv.shape[0], dtype=Internal.E_NpyInt) rcvField = numpy.empty((donorArray[1].shape[0],cellRcv.shape[0]), order='F') rcvArray = [vars2,rcvField,cellRcv.shape[0],1,1] # tableau monodimensionnel else: # zone receveuse sur le processeur locale @@ -762,7 +762,7 @@ def inverseChimeraTransfer__(t, variables, locinterp='centers', mesh='extended') cellDonorEX = cellDonorListEX[1] if cellDonorEX.size != 0: cellRcvEX = Internal.getNodeFromName1(s,'FaceListDonor')[1] - cellRcvEXdummy=numpy.arange(cellRcvEX.shape[0], dtype=numpy.int32) + cellRcvEXdummy=numpy.arange(cellRcvEX.shape[0], dtype=Internal.E_NpyInt) EXdir = Internal.getNodeFromName1(s,'FaceDirection')[1] interpDonorEX = idEX[1] cellVolEX = Internal.getNodeFromName1(s,'FaceInterpolantsVol')[1] diff --git a/Cassiopee/Connector/test/computeFrictionVelocityPT_t1.py b/Cassiopee/Connector/test/computeFrictionVelocityPT_t1.py index c8a09c0f9..1f968c1d5 100644 --- a/Cassiopee/Connector/test/computeFrictionVelocityPT_t1.py +++ b/Cassiopee/Connector/test/computeFrictionVelocityPT_t1.py @@ -7,7 +7,7 @@ nb_node = 3 -zsize = numpy.empty((1,3), numpy.int32, order='F') +zsize = numpy.empty((1,3), Internal.E_NpyInt, order='F') zsize[0,0] = nb_node; zsize[0,1] = 0; zsize[0,2] = 0 z = Internal.newZone(name='IBW_Wall',zsize=zsize,ztype='Unstructured') coord_node = Internal.newGridCoordinates(parent = z) diff --git a/Cassiopee/Connector/test/extractIBMWallFieldsPT_t1.py b/Cassiopee/Connector/test/extractIBMWallFieldsPT_t1.py index f4702c3f6..25fae8506 100644 --- a/Cassiopee/Connector/test/extractIBMWallFieldsPT_t1.py +++ b/Cassiopee/Connector/test/extractIBMWallFieldsPT_t1.py @@ -22,7 +22,7 @@ # Blanking bodies = [[s]] -BM = numpy.array([[1]],numpy.int32) +BM = numpy.array([[1]],Internal.E_NpyInt) t = X.blankCells(t,bodies,BM,blankingType='center_in') X._setHoleInterpolatedPoints(t,depth=-2) # Dist2Walls diff --git a/Cassiopee/Connector/test/setIBCDataPT_t1.py b/Cassiopee/Connector/test/setIBCDataPT_t1.py index f3565efbe..716a51bf7 100644 --- a/Cassiopee/Connector/test/setIBCDataPT_t1.py +++ b/Cassiopee/Connector/test/setIBCDataPT_t1.py @@ -1,5 +1,6 @@ # - setIBCData (pyTree) - import Converter.PyTree as C +import Converter.Internal as Internal import Generator.PyTree as G import Connector.PyTree as X import Post.PyTree as P @@ -16,7 +17,7 @@ # Blanking bodies = [[s]] -BM = N.array([[1]], N.int32) +BM = N.array([[1]], Internal.E_NpyInt) t = X.blankCells(t, bodies, BM, blankingType='center_in') t = X.setHoleInterpolatedPoints(t, depth=-1) # Dist2Walls @@ -33,7 +34,7 @@ t = C.newPyTree(['Base', a]) # Blanking bodies = [[s]] -BM = N.array([[1]],N.int32) +BM = N.array([[1]], Internal.E_NpyInt) t = X.blankCells(t,bodies,BM,blankingType='node_in') t = X.setHoleInterpolatedPoints(t,depth=-1) # Dist2Walls @@ -51,7 +52,7 @@ # Blanking bodies = [[s]] -BM = N.array([[1]],N.int32) +BM = N.array([[1]], Internal.E_NpyInt) t = X.blankCells(t,bodies,BM,blankingType='center_in') t = X.setHoleInterpolatedPoints(t,depth=-1) t = X.setHoleInterpolatedPoints(t,depth= 2)