2016-05-11 14:31:39 +05:30
|
|
|
#!/usr/bin/env python2
|
2014-04-02 00:59:14 +05:30
|
|
|
# -*- coding: UTF-8 no BOM -*-
|
2013-04-12 15:57:05 +05:30
|
|
|
|
2016-03-02 15:59:07 +05:30
|
|
|
import os,sys,math
|
2014-08-25 18:09:12 +05:30
|
|
|
import numpy as np
|
2015-08-08 00:33:26 +05:30
|
|
|
import multiprocessing
|
2016-04-09 03:17:02 +05:30
|
|
|
from optparse import OptionParser,OptionGroup
|
2015-10-06 23:33:06 +05:30
|
|
|
from scipy import spatial
|
2014-08-25 18:09:12 +05:30
|
|
|
import damask
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2016-01-27 22:36:00 +05:30
|
|
|
scriptName = os.path.splitext(os.path.basename(__file__))[0]
|
|
|
|
scriptID = ' '.join([scriptName,damask.version])
|
2013-07-10 14:42:00 +05:30
|
|
|
|
2014-10-09 22:33:06 +05:30
|
|
|
|
2013-06-30 06:00:06 +05:30
|
|
|
def meshgrid2(*arrs):
|
2016-03-02 15:59:07 +05:30
|
|
|
"""code inspired by http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d"""
|
2013-06-30 06:00:06 +05:30
|
|
|
arrs = tuple(reversed(arrs))
|
|
|
|
arrs = tuple(arrs)
|
2014-08-25 18:09:12 +05:30
|
|
|
lens = np.array(map(len, arrs))
|
2013-06-30 06:00:06 +05:30
|
|
|
dim = len(arrs)
|
|
|
|
ans = []
|
|
|
|
for i, arr in enumerate(arrs):
|
2014-10-10 14:24:48 +05:30
|
|
|
slc = np.ones(dim,'i')
|
|
|
|
slc[i] = lens[i]
|
|
|
|
arr2 = np.asarray(arr).reshape(slc)
|
|
|
|
for j, sz in enumerate(lens):
|
|
|
|
if j != i:
|
|
|
|
arr2 = arr2.repeat(sz, axis=j)
|
2013-06-30 06:00:06 +05:30
|
|
|
|
2014-10-10 14:24:48 +05:30
|
|
|
ans.insert(0,arr2)
|
2013-06-30 06:00:06 +05:30
|
|
|
return tuple(ans)
|
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
def findClosestSeed(fargs):
|
2016-07-15 19:18:53 +05:30
|
|
|
point, seeds, myWeights = fargs
|
2015-08-08 00:33:26 +05:30
|
|
|
tmp = np.repeat(point.reshape(3,1), len(seeds), axis=1).T
|
2016-07-15 19:18:53 +05:30
|
|
|
dist = np.sum((tmp - seeds)**2,axis=1) -myWeights
|
2015-08-08 00:33:26 +05:30
|
|
|
return np.argmin(dist) # seed point closest to point
|
|
|
|
|
|
|
|
|
|
|
|
def laguerreTessellation(undeformed, coords, weights, grains, nonperiodic = False, cpus = 2):
|
|
|
|
|
|
|
|
copies = \
|
|
|
|
np.array([
|
|
|
|
[ 0, 0, 0 ],
|
|
|
|
]).astype(float) if nonperiodic else \
|
2016-03-02 15:59:07 +05:30
|
|
|
np.array([
|
2015-08-08 00:33:26 +05:30
|
|
|
[ -1,-1,-1 ],
|
|
|
|
[ 0,-1,-1 ],
|
|
|
|
[ 1,-1,-1 ],
|
|
|
|
[ -1, 0,-1 ],
|
|
|
|
[ 0, 0,-1 ],
|
|
|
|
[ 1, 0,-1 ],
|
|
|
|
[ -1, 1,-1 ],
|
|
|
|
[ 0, 1,-1 ],
|
|
|
|
[ 1, 1,-1 ],
|
|
|
|
[ -1,-1, 0 ],
|
|
|
|
[ 0,-1, 0 ],
|
|
|
|
[ 1,-1, 0 ],
|
|
|
|
[ -1, 0, 0 ],
|
|
|
|
[ 0, 0, 0 ],
|
|
|
|
[ 1, 0, 0 ],
|
|
|
|
[ -1, 1, 0 ],
|
|
|
|
[ 0, 1, 0 ],
|
|
|
|
[ 1, 1, 0 ],
|
|
|
|
[ -1,-1, 1 ],
|
|
|
|
[ 0,-1, 1 ],
|
|
|
|
[ 1,-1, 1 ],
|
|
|
|
[ -1, 0, 1 ],
|
|
|
|
[ 0, 0, 1 ],
|
|
|
|
[ 1, 0, 1 ],
|
|
|
|
[ -1, 1, 1 ],
|
|
|
|
[ 0, 1, 1 ],
|
|
|
|
[ 1, 1, 1 ],
|
2015-10-12 23:40:26 +05:30
|
|
|
]).astype(float)*info['size']
|
|
|
|
|
2016-07-15 14:04:17 +05:30
|
|
|
repeatweights = np.tile(weights,len(copies)).flatten(order='F') # Laguerre weights (1,2,3,1,2,3,...,1,2,3)
|
2016-07-08 00:52:06 +05:30
|
|
|
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)
|
2015-10-06 23:33:06 +05:30
|
|
|
except NameError: seeds = coords+vec
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2016-07-08 00:52:06 +05:30
|
|
|
if (repeatweights == 0.0).all(): # standard Voronoi (no weights, KD tree)
|
2015-10-06 23:33:06 +05:30
|
|
|
myKDTree = spatial.cKDTree(seeds)
|
|
|
|
devNull,closestSeeds = myKDTree.query(undeformed)
|
2015-08-09 03:13:21 +05:30
|
|
|
else:
|
2015-10-06 23:33:06 +05:30
|
|
|
damask.util.croak('...using {} cpu{}'.format(options.cpus, 's' if options.cpus > 1 else ''))
|
2016-07-15 18:22:48 +05:30
|
|
|
arguments = [[arg,seeds,repeatweights] for arg in list(undeformed)]
|
2015-10-06 23:33:06 +05:30
|
|
|
|
|
|
|
if cpus > 1: # use multithreading
|
|
|
|
pool = multiprocessing.Pool(processes = cpus) # initialize workers
|
|
|
|
result = pool.map_async(findClosestSeed, arguments) # evaluate function in parallel
|
|
|
|
pool.close()
|
|
|
|
pool.join()
|
|
|
|
closestSeeds = np.array(result.get()).flatten()
|
|
|
|
else:
|
|
|
|
closestSeeds = np.zeros(len(arguments),dtype='i')
|
|
|
|
for i,arg in enumerate(arguments):
|
|
|
|
closestSeeds[i] = findClosestSeed(arg)
|
|
|
|
|
2016-03-02 15:59:07 +05:30
|
|
|
# closestSeed is modulo number of original seed points (i.e. excluding periodic copies)
|
|
|
|
return grains[closestSeeds%coords.shape[0]]
|
2013-06-30 06:00:06 +05:30
|
|
|
|
2014-08-25 18:09:12 +05:30
|
|
|
# --------------------------------------------------------------------
|
2012-11-06 02:49:12 +05:30
|
|
|
# MAIN
|
2014-08-25 18:09:12 +05:30
|
|
|
# --------------------------------------------------------------------
|
2014-10-09 22:33:06 +05:30
|
|
|
|
2016-05-12 12:24:34 +05:30
|
|
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog option(s) [seedfile(s)]', description = """
|
|
|
|
Generate geometry description and material configuration by tessellation of given seeds file.
|
2014-10-10 14:24:48 +05:30
|
|
|
|
2014-08-25 18:09:12 +05:30
|
|
|
""", version = scriptID)
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2016-04-09 03:17:02 +05:30
|
|
|
|
|
|
|
group = OptionGroup(parser, "Tessellation","")
|
|
|
|
|
2016-04-24 20:39:28 +05:30
|
|
|
group.add_option('-l',
|
|
|
|
'--laguerre',
|
|
|
|
dest = 'laguerre',
|
|
|
|
action = 'store_true',
|
|
|
|
help = 'use Laguerre (weighted Voronoi) tessellation')
|
2016-04-09 03:17:02 +05:30
|
|
|
group.add_option('--cpus',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'cpus',
|
|
|
|
type = 'int', metavar = 'int',
|
|
|
|
help = 'number of parallel processes to use for Laguerre tessellation [%default]')
|
2016-04-09 03:17:02 +05:30
|
|
|
group.add_option('--nonperiodic',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'nonperiodic',
|
|
|
|
action = 'store_true',
|
|
|
|
help = 'nonperiodic tessellation')
|
2016-04-09 03:17:02 +05:30
|
|
|
|
|
|
|
parser.add_option_group(group)
|
|
|
|
|
|
|
|
group = OptionGroup(parser, "Geometry","")
|
|
|
|
|
2016-04-24 20:39:28 +05:30
|
|
|
group.add_option('-g',
|
|
|
|
'--grid',
|
|
|
|
dest = 'grid',
|
|
|
|
type = 'int', nargs = 3, metavar = ' '.join(['int']*3),
|
2016-07-15 14:04:17 +05:30
|
|
|
help = 'a,b,c grid of hexahedral box')
|
2016-04-24 20:39:28 +05:30
|
|
|
group.add_option('-s',
|
|
|
|
'--size',
|
|
|
|
dest = 'size',
|
|
|
|
type = 'float', nargs = 3, metavar=' '.join(['float']*3),
|
2016-07-15 14:04:17 +05:30
|
|
|
help = 'x,y,z size of hexahedral box')
|
2016-04-24 20:39:28 +05:30
|
|
|
group.add_option('-o',
|
|
|
|
'--origin',
|
|
|
|
dest = 'origin',
|
|
|
|
type = 'float', nargs = 3, metavar=' '.join(['float']*3),
|
|
|
|
help = 'origin of grid')
|
2016-04-09 03:17:02 +05:30
|
|
|
|
|
|
|
parser.add_option_group(group)
|
|
|
|
|
|
|
|
group = OptionGroup(parser, "Seeds","")
|
|
|
|
|
2016-04-24 20:39:28 +05:30
|
|
|
group.add_option('-p',
|
|
|
|
'--pos', '--seedposition',
|
|
|
|
dest = 'pos',
|
2015-08-08 00:33:26 +05:30
|
|
|
type = 'string', metavar = 'string',
|
2016-04-24 20:39:28 +05:30
|
|
|
help = 'label of coordinates [%default]')
|
|
|
|
group.add_option('-w',
|
|
|
|
'--weight',
|
|
|
|
dest = 'weight',
|
|
|
|
type = 'string', metavar = 'string',
|
|
|
|
help = 'label of weights [%default]')
|
|
|
|
group.add_option('-m',
|
|
|
|
'--microstructure',
|
|
|
|
dest = 'microstructure',
|
|
|
|
type = 'string', metavar = 'string',
|
|
|
|
help = 'label of microstructures [%default]')
|
|
|
|
group.add_option('-e',
|
|
|
|
'--eulers',
|
|
|
|
dest = 'eulers',
|
|
|
|
type = 'string', metavar = 'string',
|
|
|
|
help = 'label of Euler angles [%default]')
|
2016-04-09 03:17:02 +05:30
|
|
|
group.add_option('--axes',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'axes',
|
|
|
|
type = 'string', nargs = 3, metavar = ' '.join(['string']*3),
|
|
|
|
help = 'orientation coordinate frame in terms of position coordinate frame')
|
2016-04-09 03:17:02 +05:30
|
|
|
|
|
|
|
parser.add_option_group(group)
|
|
|
|
|
|
|
|
group = OptionGroup(parser, "Configuration","")
|
|
|
|
|
|
|
|
group.add_option('--homogenization',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'homogenization',
|
|
|
|
type = 'int', metavar = 'int',
|
|
|
|
help = 'homogenization index to be used [%default]')
|
2016-04-09 03:17:02 +05:30
|
|
|
group.add_option('--crystallite',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'crystallite',
|
|
|
|
type = 'int', metavar = 'int',
|
|
|
|
help = 'crystallite index to be used [%default]')
|
2016-04-09 03:17:02 +05:30
|
|
|
group.add_option('--phase',
|
2016-04-24 20:39:28 +05:30
|
|
|
dest = 'phase',
|
|
|
|
type = 'int', metavar = 'int',
|
|
|
|
help = 'phase index to be used [%default]')
|
2016-04-09 03:17:02 +05:30
|
|
|
|
|
|
|
parser.add_option_group(group)
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2016-04-24 20:39:28 +05:30
|
|
|
parser.set_defaults(pos = 'pos',
|
2015-08-08 00:33:26 +05:30
|
|
|
weight = 'weight',
|
|
|
|
microstructure = 'microstructure',
|
2016-04-24 20:39:28 +05:30
|
|
|
eulers = 'euler',
|
2015-06-27 14:11:08 +05:30
|
|
|
homogenization = 1,
|
|
|
|
crystallite = 1,
|
2015-08-08 00:33:26 +05:30
|
|
|
phase = 1,
|
|
|
|
cpus = 2,
|
|
|
|
laguerre = False,
|
|
|
|
nonperiodic = False,
|
2015-06-27 14:11:08 +05:30
|
|
|
)
|
2012-11-06 02:49:12 +05:30
|
|
|
(options,filenames) = parser.parse_args()
|
|
|
|
|
2015-06-27 14:11:08 +05:30
|
|
|
# --- loop over input files -------------------------------------------------------------------------
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2015-08-13 02:25:53 +05:30
|
|
|
if filenames == []: filenames = [None]
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2015-06-27 14:11:08 +05:30
|
|
|
for name in filenames:
|
2016-04-09 03:17:02 +05:30
|
|
|
try: table = damask.ASCIItable(name = name,
|
2016-04-24 20:39:28 +05:30
|
|
|
outname = os.path.splitext(name)[0]+'.geom' if name else name,
|
2016-04-09 03:17:02 +05:30
|
|
|
buffered = False)
|
2015-08-13 02:25:53 +05:30
|
|
|
except: continue
|
2015-09-24 21:04:27 +05:30
|
|
|
damask.util.report(scriptName,name)
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
# --- read header ----------------------------------------------------------------------------
|
2014-01-01 02:36:32 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
table.head_read()
|
|
|
|
info,extra_header = table.head_getGeom()
|
|
|
|
|
2016-03-02 15:59:07 +05:30
|
|
|
if options.grid is not None: info['grid'] = options.grid
|
|
|
|
if options.size is not None: info['size'] = options.size
|
|
|
|
if options.origin is not None: info['origin'] = options.origin
|
2015-08-08 00:33:26 +05:30
|
|
|
|
|
|
|
# ------------------------------------------ sanity checks ---------------------------------------
|
|
|
|
|
|
|
|
remarks = []
|
|
|
|
errors = []
|
2015-05-02 13:11:14 +05:30
|
|
|
labels = []
|
2015-08-08 00:33:26 +05:30
|
|
|
|
|
|
|
hasGrains = table.label_dimension(options.microstructure) == 1
|
|
|
|
hasEulers = table.label_dimension(options.eulers) == 3
|
2015-08-13 02:25:53 +05:30
|
|
|
hasWeights = table.label_dimension(options.weight) == 1 and options.laguerre
|
2015-08-08 00:33:26 +05:30
|
|
|
|
|
|
|
if np.any(info['grid'] < 1): errors.append('invalid grid a b c.')
|
|
|
|
if np.any(info['size'] <= 0.0) \
|
|
|
|
and np.all(info['grid'] < 1): errors.append('invalid size x y z.')
|
|
|
|
else:
|
|
|
|
for i in xrange(3):
|
|
|
|
if info['size'][i] <= 0.0: # any invalid size?
|
|
|
|
info['size'][i] = float(info['grid'][i])/max(info['grid']) # normalize to grid
|
|
|
|
remarks.append('rescaling size {} to {}...'.format({0:'x',1:'y',2:'z'}[i],info['size'][i]))
|
|
|
|
|
2016-04-24 20:39:28 +05:30
|
|
|
if table.label_dimension(options.pos) != 3:
|
|
|
|
errors.append('seed positions "{}" have dimension {}.'.format(options.pos,
|
|
|
|
table.label_dimension(options.pos)))
|
2015-05-08 10:32:44 +05:30
|
|
|
else:
|
2016-04-24 20:39:28 +05:30
|
|
|
labels += [options.pos]
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2015-08-08 03:45:24 +05:30
|
|
|
if not hasEulers: remarks.append('missing seed orientations...')
|
2015-08-08 00:33:26 +05:30
|
|
|
else: labels += [options.eulers]
|
2015-08-08 03:45:24 +05:30
|
|
|
if not hasGrains: remarks.append('missing seed microstructure indices...')
|
2015-08-08 00:33:26 +05:30
|
|
|
else: labels += [options.microstructure]
|
2015-08-08 03:45:24 +05:30
|
|
|
if options.laguerre and not hasWeights: remarks.append('missing seed weights...')
|
2015-08-08 00:33:26 +05:30
|
|
|
else: labels += [options.weight]
|
|
|
|
|
2015-09-24 21:04:27 +05:30
|
|
|
if remarks != []: damask.util.croak(remarks)
|
2015-08-08 00:33:26 +05:30
|
|
|
if errors != []:
|
2015-09-24 21:04:27 +05:30
|
|
|
damask.util.croak(errors)
|
2015-08-08 00:33:26 +05:30
|
|
|
table.close(dismiss=True)
|
2015-05-08 10:32:44 +05:30
|
|
|
continue
|
2014-02-04 05:14:29 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
# ------------------------------------------ read seeds ---------------------------------------
|
2015-05-02 13:11:14 +05:30
|
|
|
|
|
|
|
table.data_readArray(labels)
|
2016-04-24 20:39:28 +05:30
|
|
|
coords = table.data[:,table.label_indexrange(options.pos)] * info['size']
|
|
|
|
eulers = table.data[:,table.label_indexrange(options.eulers)] if hasEulers \
|
|
|
|
else np.zeros(3*len(coords))
|
|
|
|
grains = table.data[:,table.label_indexrange(options.microstructure)].astype('i') if hasGrains \
|
|
|
|
else 1+np.arange(len(coords))
|
|
|
|
weights = table.data[:,table.label_indexrange(options.weight)] if hasWeights \
|
|
|
|
else np.zeros(len(coords))
|
|
|
|
grainIDs = np.unique(grains).astype('i')
|
2015-08-08 00:33:26 +05:30
|
|
|
NgrainIDs = len(grainIDs)
|
|
|
|
|
|
|
|
# --- tessellate microstructure ------------------------------------------------------------
|
|
|
|
|
|
|
|
x = (np.arange(info['grid'][0])+0.5)*info['size'][0]/info['grid'][0]
|
|
|
|
y = (np.arange(info['grid'][1])+0.5)*info['size'][1]/info['grid'][1]
|
|
|
|
z = (np.arange(info['grid'][2])+0.5)*info['size'][2]/info['grid'][2]
|
2013-05-15 21:32:38 +05:30
|
|
|
|
2015-09-24 21:04:27 +05:30
|
|
|
damask.util.croak('tessellating...')
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2015-08-13 02:25:53 +05:30
|
|
|
grid = np.vstack(meshgrid2(x, y, z)).reshape(3,-1).T
|
|
|
|
indices = laguerreTessellation(grid, coords, weights, grains, options.nonperiodic, options.cpus)
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2016-03-08 08:42:02 +05:30
|
|
|
# --- write header ------------------------------------------------------------------------
|
2015-08-08 00:33:26 +05:30
|
|
|
|
2016-03-08 08:42:02 +05:30
|
|
|
usedGrainIDs = np.intersect1d(grainIDs,indices)
|
|
|
|
info['microstructures'] = len(usedGrainIDs)
|
2015-08-08 00:33:26 +05:30
|
|
|
|
|
|
|
if info['homogenization'] == 0: info['homogenization'] = options.homogenization
|
2013-05-15 21:32:38 +05:30
|
|
|
|
2016-04-24 21:54:00 +05:30
|
|
|
damask.util.report_geom(info,['grid','size','origin','homogenization',])
|
|
|
|
damask.util.croak(['microstructures: {}{}'.format(info['microstructures'],
|
2016-04-24 20:39:28 +05:30
|
|
|
(' out of {}'.format(NgrainIDs) if NgrainIDs != info['microstructures'] else '')),
|
2016-04-24 21:54:00 +05:30
|
|
|
])
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
config_header = []
|
2016-03-08 08:42:02 +05:30
|
|
|
formatwidth = 1+int(math.log10(NgrainIDs))
|
2012-11-06 02:49:12 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
config_header += ['<microstructure>']
|
|
|
|
for i,ID in enumerate(grainIDs):
|
2016-04-24 20:39:28 +05:30
|
|
|
config_header += ['[Grain{}]'.format(str(ID).zfill(formatwidth)),
|
|
|
|
'crystallite {}'.format(options.crystallite),
|
|
|
|
'(constituent)\tphase {}\ttexture {}\tfraction 1.0'.format(options.phase,str(ID).rjust(formatwidth)),
|
2015-08-08 00:33:26 +05:30
|
|
|
]
|
|
|
|
if hasEulers:
|
|
|
|
config_header += ['<texture>']
|
2014-12-03 03:52:11 +05:30
|
|
|
for ID in grainIDs:
|
2016-03-08 08:42:02 +05:30
|
|
|
eulerID = np.nonzero(grains == ID)[0][0] # find first occurrence of this grain id
|
2016-04-24 20:39:28 +05:30
|
|
|
config_header += ['[Grain{}]'.format(str(ID).zfill(formatwidth)),
|
|
|
|
'(gauss)\tphi1 {:g}\tPhi {:g}\tphi2 {:g}\tscatter 0.0\tfraction 1.0'.format(*eulers[eulerID])
|
2015-08-08 00:33:26 +05:30
|
|
|
]
|
2016-04-24 20:39:28 +05:30
|
|
|
if options.axes is not None: config_header.append('axes\t{} {} {}'.format(*options.axes))
|
2015-05-02 13:11:14 +05:30
|
|
|
|
2015-08-08 00:33:26 +05:30
|
|
|
table.labels_clear()
|
|
|
|
table.info_clear()
|
|
|
|
table.info_append([
|
|
|
|
scriptID + ' ' + ' '.join(sys.argv[1:]),
|
2016-04-24 20:39:28 +05:30
|
|
|
"grid\ta {}\tb {}\tc {}".format(*info['grid']),
|
|
|
|
"size\tx {}\ty {}\tz {}".format(*info['size']),
|
|
|
|
"origin\tx {}\ty {}\tz {}".format(*info['origin']),
|
|
|
|
"homogenization\t{}".format(info['homogenization']),
|
|
|
|
"microstructures\t{}".format(info['microstructures']),
|
2015-08-08 00:33:26 +05:30
|
|
|
config_header,
|
|
|
|
])
|
|
|
|
table.head_write()
|
2015-07-30 10:12:00 +05:30
|
|
|
|
2013-05-17 22:14:03 +05:30
|
|
|
# --- write microstructure information ------------------------------------------------------------
|
2015-08-08 00:33:26 +05:30
|
|
|
|
|
|
|
table.data = indices.reshape(info['grid'][1]*info['grid'][2],info['grid'][0])
|
|
|
|
table.data_writeArray('%%%ii'%(formatwidth),delimiter=' ')
|
2013-06-30 06:00:06 +05:30
|
|
|
|
2013-05-15 21:32:38 +05:30
|
|
|
#--- output finalization --------------------------------------------------------------------------
|
2013-06-30 06:00:06 +05:30
|
|
|
|
2015-06-27 14:11:08 +05:30
|
|
|
table.close()
|