Compare commits
3 Commits
4449f4edf5
...
a0643f951b
| Author | SHA1 | Date |
|---|---|---|
|
|
a0643f951b | |
|
|
c75092dfc7 | |
|
|
1602ff1443 |
|
|
@ -0,0 +1 @@
|
|||
*__pycache__
|
||||
|
|
@ -106,7 +106,8 @@ if [ ! -s ${din}/${fproc} ]; then
|
|||
fi
|
||||
if [ ! -s ${din}/${fpart} ]; then
|
||||
(>&2 echo "[Error] File not found or empty: ${din}/${fpart}")
|
||||
exit 1
|
||||
# exit 1
|
||||
fpart=
|
||||
fi
|
||||
|
||||
# Check if all velocity fields exist and are not empty
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
from .ibmppp import *
|
||||
|
|
@ -291,19 +291,19 @@ class ibmppp:
|
|||
# Also determine file which contains the desired field as well as the
|
||||
# dataset ID
|
||||
if key[0]=='u':
|
||||
filebase = self.__dir_base+'uvwp.'
|
||||
filebase = self.__dir_base+'/uvwp.'
|
||||
dset = 1
|
||||
elif key[0]=='v':
|
||||
filebase = self.__dir_base+'uvwp.'
|
||||
filebase = self.__dir_base+'/uvwp.'
|
||||
dset = 2
|
||||
elif key[0]=='w':
|
||||
filebase = self.__dir_base+'uvwp.'
|
||||
filebase = self.__dir_base+'/uvwp.'
|
||||
dset = 3
|
||||
elif key[0]=='p':
|
||||
filebase = self.__dir_base+'uvwp.'
|
||||
filebase = self.__dir_base+'/uvwp.'
|
||||
dset = 4
|
||||
elif key[0]=='s':
|
||||
filebase = self.__dir_base+'scal.'
|
||||
filebase = self.__dir_base+'/scal.'
|
||||
dset = int(key[1])
|
||||
if dset!=1:
|
||||
self.fields[key] = None
|
||||
|
|
@ -348,10 +348,14 @@ class ibmppp:
|
|||
if kb1!=chunk['kbeg'] or ke1!=chunk['kbeg']+chunk['nzl']-1:
|
||||
raise ValueError('Loaded chunk does not correspond to processor grid (kbeg={}, nzl={} vs kbeg={},nzl={}'.format(kb1,ke1-kb1+1,chunk['kbeg'],chunk['nzl']))
|
||||
ngh1 = chunk['ighost']
|
||||
ibeg = [i + ngh1 for i in [0,0,0]]
|
||||
iend = [i-ngh1 for i in chunk['data'].shape]
|
||||
# No need to care about ghost cells here, we communicate them later
|
||||
self.field[key][ib1-ib+self.__nghx:ie1-ib+self.__nghx+1,
|
||||
jb1-jb+self.__nghy:je1-jb+self.__nghy+1,
|
||||
kb1-kb+self.__nghz:ke1-kb+self.__nghz+1] = chunk['data'][ngh1:-ngh1,ngh1:-ngh1,ngh1:-ngh1]
|
||||
kb1-kb+self.__nghz:ke1-kb+self.__nghz+1] = chunk['data'][ibeg[0]:iend[0],\
|
||||
ibeg[1]:iend[1],\
|
||||
ibeg[2]:iend[2]]
|
||||
# Exchange ghost cells and set boundary conditions
|
||||
self.exchangeGhostCells(key)
|
||||
self.imposeBoundaryConditions(key)
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
from .ucf import *
|
||||
Loading…
Reference in New Issue