wrong positions for point visualization

- now the cell centers are at the centers of the cells for cell
visualization
This commit is contained in:
Martin Diehl 2019-04-13 00:42:05 +02:00
parent 0335207956
commit 0c6fde97f9
1 changed files with 4 additions and 3 deletions

View File

@ -40,9 +40,10 @@ def displacementAvgFFT(F,grid,size,nodal=False,transformed=False):
np.linspace(0,size[0],1+grid[0]), np.linspace(0,size[0],1+grid[0]),
indexing = 'ij') indexing = 'ij')
else: else:
x, y, z = np.meshgrid(np.linspace(0,size[2],grid[2],endpoint=False), delta = size/grid*0.5
np.linspace(0,size[1],grid[1],endpoint=False), x, y, z = np.meshgrid(np.linspace(delta[2],size[2]-delta[2],grid[2]),
np.linspace(0,size[0],grid[0],endpoint=False), np.linspace(delta[1],size[1]-delta[1],grid[1]),
np.linspace(delta[0],size[0]-delta[0],grid[0]),
indexing = 'ij') indexing = 'ij')
origCoords = np.concatenate((z[:,:,:,None],y[:,:,:,None],x[:,:,:,None]),axis = 3) origCoords = np.concatenate((z[:,:,:,None],y[:,:,:,None],x[:,:,:,None]),axis = 3)