fixed buggy behavior in case of non unit-sized geometry
This commit is contained in:
parent
d455c5acd8
commit
f1482a2af4
|
@ -73,7 +73,7 @@ def laguerreTessellation(undeformed, coords, weights, grains, nonperiodic = Fals
|
||||||
[ -1, 1, 1 ],
|
[ -1, 1, 1 ],
|
||||||
[ 0, 1, 1 ],
|
[ 0, 1, 1 ],
|
||||||
[ 1, 1, 1 ],
|
[ 1, 1, 1 ],
|
||||||
]).astype(float)
|
]).astype(float)*info['size']
|
||||||
|
|
||||||
squaredweights = np.power(np.tile(weights,len(copies)),2) # Laguerre weights (squared, size N*n)
|
squaredweights = np.power(np.tile(weights,len(copies)),2) # Laguerre weights (squared, size N*n)
|
||||||
|
|
||||||
|
@ -258,10 +258,14 @@ for name in filenames:
|
||||||
# ------------------------------------------ read seeds ---------------------------------------
|
# ------------------------------------------ read seeds ---------------------------------------
|
||||||
|
|
||||||
table.data_readArray(labels)
|
table.data_readArray(labels)
|
||||||
coords = table.data[:,table.label_index(options.position):table.label_index(options.position)+3] * info['size']
|
coords = table.data[:,table.label_index(options.position):table.label_index(options.position)+3]\
|
||||||
eulers = table.data[:,table.label_index(options.eulers ):table.label_index(options.eulers )+3] if hasEulers else np.zeros(3*len(coords))
|
* info['size']
|
||||||
grains = table.data[:,table.label_index(options.microstructure)].astype('i') if hasGrains else 1+np.arange(len(coords))
|
eulers = table.data[:,table.label_index(options.eulers ):table.label_index(options.eulers )+3]\
|
||||||
weights = table.data[:,table.label_index(options.weight)] if hasWeights else np.zeros(len(coords))
|
if hasEulers else np.zeros(3*len(coords))
|
||||||
|
grains = table.data[:,table.label_index(options.microstructure)].astype('i')\
|
||||||
|
if hasGrains else 1+np.arange(len(coords))
|
||||||
|
weights = table.data[:,table.label_index(options.weight)]\
|
||||||
|
if hasWeights else np.zeros(len(coords))
|
||||||
grainIDs = np.unique(grains).astype('i')
|
grainIDs = np.unique(grains).astype('i')
|
||||||
NgrainIDs = len(grainIDs)
|
NgrainIDs = len(grainIDs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue