Skip to content

Commit

Permalink
Merge pull request #144 from antjost/devTestCaseMPI
Browse files Browse the repository at this point in the history
[IBM] Temporary bug fix for IBM mesh generation (MPI) to yield exactly the same t and tc. Test cases added also.
  • Loading branch information
benoit128 authored Aug 29, 2024
2 parents 3e33978 + afaa224 commit 61f7817
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cassiopee/Connector/Connector/IBM.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ def _computeMeshInfo(t):
return None

def prepareIBMData(t_case, t_out, tc_out, t_in=None, to=None, tbox=None, tinit=None, tbCurvi=None,
snears=0.01, snearsf=None, dfars=10., dfarDir=0, vmin=21, depth=2, frontType=1, octreeMode=0,
IBCType=1, verbose=True, expand=3,
check=False, balancing=False, distribute=False, twoFronts=False, cartesian=False,
yplus=100., Lref=1., correctionMultiCorpsF42=False, blankingF42=False, wallAdaptF42=None, heightMaxF42=-1.):
snears=0.01, snearsf=None, dfars=10., dfarDir=0, vmin=21, depth=2, frontType=1, octreeMode=0,
IBCType=1, verbose=True, expand=3,
check=False, balancing=False, distribute=False, twoFronts=False, cartesian=False,
yplus=100., Lref=1., correctionMultiCorpsF42=False, blankingF42=False, wallAdaptF42=None, heightMaxF42=-1.,
skipRedispatchNonRegression=False):

import Generator.IBM as G_IBM
import time as python_time
Expand Down Expand Up @@ -288,9 +289,9 @@ def prepareIBMData(t_case, t_out, tc_out, t_in=None, to=None, tbox=None, tinit=N
filamentBases=filamentBases, isFilamentOnly=isFilamentOnly, tbFilament=tbFilament,
isWireModel=isWireModel)
Cmpi.barrier()
_redispatch__(t=t)
if not skipRedispatchNonRegression: _redispatch__(t=t)
if verbose: printTimeAndMemory__('blank by IBC bodies', time=python_time.time()-pt0)

#===================
# STEP 4 : INTERP DATA CHIM
#===================
Expand Down
18 changes: 18 additions & 0 deletions Cassiopee/Connector/test/prepareIBMData_m1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# - prepareIBMData MPI (pyTree) -
import Converter.PyTree as C
import Converter.Mpi as Cmpi
import Connector.IBM as X_IBM
import KCore.test as test

tb = C.convertFile2PyTree('../../Apps/test/naca1DNS.cgns')

# Prepare
vmin = 42
dfars = 5
snears = 1
t, tc = X_IBM.prepareIBMData('naca1DNS.cgns', None , None ,
snears=snears , dfars=dfars , vmin=vmin,
check=False , frontType=1 , skipRedispatchNonRegression=True)
if Cmpi.rank==0:
test.testT(t , 1)
test.testT(tc, 2)
17 changes: 17 additions & 0 deletions Cassiopee/Connector/test/prepareIBMData_t1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# - prepareIBMData Serial (pyTree) -
import Converter.PyTree as C
import Connector.IBM as X_IBM
import KCore.test as test

tb = C.convertFile2PyTree('../../Apps/test/naca1DNS.cgns')

# Prepare
vmin = 42
dfars = 5
snears = 1
t, tc = X_IBM.prepareIBMData('naca1DNS.cgns', None , None ,
snears=snears , dfars=dfars , vmin=vmin,
check=False , frontType=1)
test.testT(t , 1)
test.testT(tc, 2)
#C.convertPyTree2File(t,'t_check.cgns')

0 comments on commit 61f7817

Please sign in to comment.