Compare commits

..

No commits in common. "a0643f951bf9427ee01fbe3131416448bd87bc50" and "4449f4edf5ebaafdf8f48ff124fec5d5c58e6c51" have entirely different histories.

5 changed files with 36 additions and 44 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
*__pycache__

View File

@ -106,8 +106,7 @@ if [ ! -s ${din}/${fproc} ]; then
fi fi
if [ ! -s ${din}/${fpart} ]; then if [ ! -s ${din}/${fpart} ]; then
(>&2 echo "[Error] File not found or empty: ${din}/${fpart}") (>&2 echo "[Error] File not found or empty: ${din}/${fpart}")
# exit 1 exit 1
fpart=
fi fi
# Check if all velocity fields exist and are not empty # Check if all velocity fields exist and are not empty

View File

@ -1 +0,0 @@
from .ibmppp import *

View File

@ -291,19 +291,19 @@ class ibmppp:
# Also determine file which contains the desired field as well as the # Also determine file which contains the desired field as well as the
# dataset ID # dataset ID
if key[0]=='u': if key[0]=='u':
filebase = self.__dir_base+'/uvwp.' filebase = self.__dir_base+'uvwp.'
dset = 1 dset = 1
elif key[0]=='v': elif key[0]=='v':
filebase = self.__dir_base+'/uvwp.' filebase = self.__dir_base+'uvwp.'
dset = 2 dset = 2
elif key[0]=='w': elif key[0]=='w':
filebase = self.__dir_base+'/uvwp.' filebase = self.__dir_base+'uvwp.'
dset = 3 dset = 3
elif key[0]=='p': elif key[0]=='p':
filebase = self.__dir_base+'/uvwp.' filebase = self.__dir_base+'uvwp.'
dset = 4 dset = 4
elif key[0]=='s': elif key[0]=='s':
filebase = self.__dir_base+'/scal.' filebase = self.__dir_base+'scal.'
dset = int(key[1]) dset = int(key[1])
if dset!=1: if dset!=1:
self.fields[key] = None self.fields[key] = None
@ -348,14 +348,10 @@ class ibmppp:
if kb1!=chunk['kbeg'] or ke1!=chunk['kbeg']+chunk['nzl']-1: 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'])) 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'] 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 # No need to care about ghost cells here, we communicate them later
self.field[key][ib1-ib+self.__nghx:ie1-ib+self.__nghx+1, self.field[key][ib1-ib+self.__nghx:ie1-ib+self.__nghx+1,
jb1-jb+self.__nghy:je1-jb+self.__nghy+1, jb1-jb+self.__nghy:je1-jb+self.__nghy+1,
kb1-kb+self.__nghz:ke1-kb+self.__nghz+1] = chunk['data'][ibeg[0]:iend[0],\ kb1-kb+self.__nghz:ke1-kb+self.__nghz+1] = chunk['data'][ngh1:-ngh1,ngh1:-ngh1,ngh1:-ngh1]
ibeg[1]:iend[1],\
ibeg[2]:iend[2]]
# Exchange ghost cells and set boundary conditions # Exchange ghost cells and set boundary conditions
self.exchangeGhostCells(key) self.exchangeGhostCells(key)
self.imposeBoundaryConditions(key) self.imposeBoundaryConditions(key)

View File

@ -1 +0,0 @@
from .ucf import *