polishing

This commit is contained in:
Martin Diehl 2019-12-03 11:27:14 +01:00
parent f2e722ed2e
commit 62ca2952fc
3 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ for name in filenames:
for label in options.labels: for label in options.labels:
field = table.get_array(label) field = table.get_array(label)
shape = (3,) if np.prod(field.shape)//np.prod(grid) == 3 else (3,3) # vector or tensor shape = (3,) if np.prod(field.shape)//np.prod(grid) == 3 else (3,3) # vector or tensor
field = table.get_array(label).reshape(np.append(grid[::-1],shape)) field = field.reshape(np.append(grid[::-1],shape))
table.add_array('curlFFT({})'.format(label), table.add_array('curlFFT({})'.format(label),
damask.grid_filters.curl(size[::-1],field).reshape((-1,np.prod(shape))), damask.grid_filters.curl(size[::-1],field).reshape((-1,np.prod(shape))),
scriptID+' '+' '.join(sys.argv[1:])) scriptID+' '+' '.join(sys.argv[1:]))

View File

@ -49,7 +49,7 @@ for name in filenames:
for label in options.labels: for label in options.labels:
field = table.get_array(label) field = table.get_array(label)
shape = (3,) if np.prod(field.shape)//np.prod(grid) == 3 else (3,3) # vector or tensor shape = (3,) if np.prod(field.shape)//np.prod(grid) == 3 else (3,3) # vector or tensor
field = table.get_array(label).reshape(np.append(grid[::-1],shape)) field = field.reshape(np.append(grid[::-1],shape))
table.add_array('divFFT({})'.format(label), table.add_array('divFFT({})'.format(label),
damask.grid_filters.divergence(size[::-1],field).reshape((-1,np.prod(shape)//3)), damask.grid_filters.divergence(size[::-1],field).reshape((-1,np.prod(shape)//3)),
scriptID+' '+' '.join(sys.argv[1:])) scriptID+' '+' '.join(sys.argv[1:]))

View File

@ -49,7 +49,7 @@ for name in filenames:
for label in options.labels: for label in options.labels:
field = table.get_array(label) field = table.get_array(label)
shape = (1,) if np.prod(field.shape)//np.prod(grid) == 1 else (3,) # scalar or vector shape = (1,) if np.prod(field.shape)//np.prod(grid) == 1 else (3,) # scalar or vector
field = table.get_array(label).reshape(np.append(grid[::-1],shape)) field = field.reshape(np.append(grid[::-1],shape))
table.add_array('gradFFT({})'.format(label), table.add_array('gradFFT({})'.format(label),
damask.grid_filters.gradient(size[::-1],field).reshape((-1,np.prod(shape)*3)), damask.grid_filters.gradient(size[::-1],field).reshape((-1,np.prod(shape)*3)),
scriptID+' '+' '.join(sys.argv[1:])) scriptID+' '+' '.join(sys.argv[1:]))