update from fh2

This commit is contained in:
Michael Stumpf 2020-04-03 13:52:05 +02:00
parent 277e5cc037
commit 69ae002e56
2 changed files with 4 additions and 7 deletions

View File

@ -647,8 +647,6 @@ class ibmppp:
fid.write(' </Geometry>\n')
# Write data
for key in self.col:
if key in ('x','y','z'):
continue
fid.write(' <Attribute Name="{}" Center="Node">\n'.format(key))
fid.write(' <DataItem Format="HDF5" Dimensions="{:d}">\n'.format(self.__npartg))
fid.write(' {}:/{}\n'.format(os.path.basename(file_h5),key))
@ -973,7 +971,7 @@ class ibmppp:
sli_y = slice(idx_y[0],idx_y[-1]+1)
sli_z = slice(idx_z[0],idx_z[-1]+1)
# Construct a grid of the subarray
xg,yg,zg = np.meshgrid(self.localGrid[key][0][sli_x],self.localGrid[key][1][sli_y],self.localGrid[key][2][sli_z],indexing='ij')
xg,yg,zg = np.meshgrid(self.localGrid[key][0][sli_x],self.localGrid[key][1][sli_y],self.localGrid[key][2][sli_z],indexing='ij',copy=True)
# Iterate through subarray and mask field
it = np.nditer((self.field[key][sli_x,sli_y,sli_z],xg,yg,zg),
op_flags=[['writeonly'],['readonly'],['readonly'],['readonly']]

View File

@ -613,9 +613,8 @@ def colmap_from_flags(irank,ihybrid,idem,iscal):
col['txc'] = ioffset; ioffset+=1
col['tyc'] = ioffset; ioffset+=1
col['tzc'] = ioffset; ioffset+=1
ioffset = ioffset+6;
if iscal>0:
for ii in range(0,iscal):
col['s'+ii] = ioffset; ioffset+=1
col['q'+ii] = ioffset; ioffset+=1
return col
col['s'+str(ii)] = ioffset; ioffset+=1
col['q'+str(ii)] = ioffset; ioffset+=1
return col