diff --git a/VERSION b/VERSION index c6344d639..114695582 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-341-gaf4307e +v2.0.0-347-gbe02300 diff --git a/lib/damask/__init__.py b/lib/damask/__init__.py index e84cbaa17..fb305cc8c 100644 --- a/lib/damask/__init__.py +++ b/lib/damask/__init__.py @@ -12,7 +12,6 @@ from .config import Material # noqa from .colormaps import Colormap, Color # noqa try: from .corientation import Quaternion, Rodrigues, Symmetry, Orientation # noqa - print("Import Cython version of Orientation module") except: from .orientation import Quaternion, Rodrigues, Symmetry, Orientation # noqa #from .block import Block # only one class diff --git a/processing/misc/calculateAnisotropy.py b/processing/misc/calculateAnisotropy.py old mode 100644 new mode 100755 diff --git a/processing/pre/geom_fromVoronoiTessellation.py b/processing/pre/geom_fromVoronoiTessellation.py index 903124385..71bf9929f 100755 --- a/processing/pre/geom_fromVoronoiTessellation.py +++ b/processing/pre/geom_fromVoronoiTessellation.py @@ -73,18 +73,18 @@ def laguerreTessellation(undeformed, coords, weights, grains, nonperiodic = Fals [ 1, 1, 1 ], ]).astype(float)*info['size'] - squaredweights = np.power(np.tile(weights,len(copies)),2) # Laguerre weights (squared, size N*n) - - for i,vec in enumerate(copies): # periodic copies of seed points (size N*n) - try: seeds = np.append(seeds, coords+vec, axis=0) + repeatweights = np.repeat(weights,len(copies),axis=1).flatten(order='F') # Laguerre weights (1,2,3,1,2,3,...,1,2,3) + + for i,vec in enumerate(copies): # periodic copies of seed points ... + try: seeds = np.append(seeds, coords+vec, axis=0) # ... (1+a,2+a,3+a,...,1+z,2+z,3+z) except NameError: seeds = coords+vec - if all(squaredweights == 0.0): # standard Voronoi (no weights, KD tree) + if (repeatweights == 0.0).all(): # standard Voronoi (no weights, KD tree) myKDTree = spatial.cKDTree(seeds) devNull,closestSeeds = myKDTree.query(undeformed) else: damask.util.croak('...using {} cpu{}'.format(options.cpus, 's' if options.cpus > 1 else '')) - arguments = [[arg] + [seeds,squaredweights] for arg in list(undeformed)] + arguments = [[arg] + [seeds,repeatweights] for arg in list(undeformed)] if cpus > 1: # use multithreading pool = multiprocessing.Pool(processes = cpus) # initialize workers