diff --git a/processing/pre/geom_fromVoronoiTessellation.py b/processing/pre/geom_fromVoronoiTessellation.py index edcbe83dc..31e8caa7b 100755 --- a/processing/pre/geom_fromVoronoiTessellation.py +++ b/processing/pre/geom_fromVoronoiTessellation.py @@ -44,8 +44,8 @@ def Laguerre_tessellation(grid, size, seeds, weights, origin = np.zeros(3), peri closest_seed= np.array([findClosestSeed(seeds_p,weights_p,coord) for coord in coords]) if periodic: - closest_seed = closest_seed.reshape(grid[2]*3,grid[1]*3,grid[0]*3) - return closest_seed[grid[2]:grid[2]*2,grid[1]:grid[1]*2,grid[0]:grid[0]*2]%seeds.shape[0] + closest_seed = closest_seed.reshape(grid*3) + return closest_seed[grid[0]:grid[0]*2,grid[1]:grid[1]*2,grid[2]:grid[2]*2]%seeds.shape[0] else: return closest_seed diff --git a/python/damask/_geom.py b/python/damask/_geom.py index 797b9dc81..7288be6cb 100644 --- a/python/damask/_geom.py +++ b/python/damask/_geom.py @@ -370,7 +370,7 @@ class Geom: microstructure = np.array(result.get()) if periodic: - microstructure = microstructure.reshape(grid[0]*3,grid[1]*3,grid[2]*3) + microstructure = microstructure.reshape(grid*3) microstructure = microstructure[grid[0]:grid[0]*2,grid[1]:grid[1]*2,grid[2]:grid[2]*2]%seeds.shape[0] else: microstructure = microstructure.reshape(grid)