some polishing to laguerre tessellation

This commit is contained in:
Tias Maiti 2015-05-28 20:57:03 +00:00
parent 3947b3fe31
commit 147cc91496
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ def meshgrid2(*arrs):
ans.insert(0,arr2)
return tuple(ans)
def laguerreTessellation(undeformed, coords):
def laguerreTessellation(undeformed, coords, weights):
bestdist = np.ones(len(undeformed)) * np.finfo('d').max
bestseed = np.zeros(len(undeformed))
@ -282,7 +282,7 @@ for file in files:
indices = grain[indices-1]
else :
undeformed = np.vstack(np.meshgrid(x, y, z)).reshape(3,-1).T
indices = laguerreTessellation(undeformed, coords)
indices = laguerreTessellation(undeformed, coords, weights)
newInfo['microstructures'] = info['microstructures']
for i in grainIDs:

View File

@ -34,7 +34,7 @@ parser.add_option('-m', '--microstructure', dest='microstructure', type='int',
parser.add_option('-s','--selective', dest='selective', action='store_true',
help = 'selective picking of seed points from random seed points [%default]')
group = OptionGroup(parser, "Laguerre Tesselation Options",
group = OptionGroup(parser, "Laguerre Tessellation Options",
"Parameters determining shape of weight distribution of seed points "
)
group.add_option('--mean', dest='mean', type='float', metavar='float', \