fixed all affected shell scripts

This commit is contained in:
Philip Eisenlohr 2020-09-03 11:19:19 -04:00
parent a4785ba562
commit be0668dc27
25 changed files with 31 additions and 29 deletions

View File

@ -49,4 +49,4 @@ for name in filenames:
table.add('coord',rot_to_TSL.broadcast_to(coord.shape[0]) @ coord,scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -45,4 +45,4 @@ for name in filenames:
np.cumprod(table.get(label),0) if options.product else np.cumsum(table.get(label),0),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -60,4 +60,4 @@ for filename in options.filenames:
os.mkdir(dirname,0o755)
file_out = '{}_inc{}.txt'.format(os.path.splitext(os.path.split(filename)[-1])[0],
inc[3:].zfill(N_digits))
table.to_ASCII(os.path.join(dirname,file_out))
table.to_file(os.path.join(dirname,file_out))

View File

@ -191,4 +191,4 @@ for name in filenames:
volumeMismatch.reshape(-1,1,order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -55,4 +55,4 @@ for name in filenames:
curl.reshape(tuple(grid)+(-1,)).reshape(-1,np.prod(shape),order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -71,4 +71,4 @@ for name in filenames:
derivative(table.get(options.coordinates),table.get(label)),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -60,7 +60,7 @@ for name in filenames:
table.add('fluct({}).{}'.format(options.f,options.pos),
damask.grid_filters.node_displacement_fluct(size,F).reshape(-1,3,order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else os.path.splitext(name)[0]+'_nodal.txt')
table.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'_nodal.txt')
else:
table.add('avg({}).{}'.format(options.f,options.pos),
damask.grid_filters.cell_displacement_avg(size,F).reshape(-1,3,order='F'),
@ -68,4 +68,4 @@ for name in filenames:
table.add('fluct({}).{}'.format(options.f,options.pos),
damask.grid_filters.cell_displacement_fluct(size,F).reshape(-1,3,order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -55,4 +55,4 @@ for name in filenames:
div.reshape(tuple(grid)+(-1,)).reshape(-1,np.prod(shape)//3,order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -184,4 +184,4 @@ for name in filenames:
distance[i,:],
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -73,4 +73,4 @@ for name in filenames:
mode = 'wrap' if options.periodic else 'nearest'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -55,4 +55,4 @@ for name in filenames:
grad.reshape(tuple(grid)+(-1,)).reshape(-1,np.prod(shape)*3,order='F'),
scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -57,8 +57,8 @@ for name in filenames:
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
indexedTable = damask.Table.from_ASCII(options.asciitable)
idx = np.reshape(table.get(options.index).astype(int) + options.offset,(-1))-1
for data in options.label:
table.add(data+'_addIndexed',indexedTable.get(data)[idx],scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -147,4 +147,4 @@ for name in filenames:
if 'axisangle' in options.output:
table.add('om({})'.format(label),o.as_axisangle(options.degrees), scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -189,4 +189,4 @@ for name in filenames:
for i,label in enumerate(labels):
table.add(label,S[:,i],scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -58,4 +58,4 @@ for name in filenames:
rng.shuffle(uniques)
table.set(label,uniques[inverse], scriptID+' '+' '.join(sys.argv[1:]))
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)

View File

@ -154,4 +154,4 @@ for name in filenames:
homogenization=options.homogenization,comments=header)
damask.util.croak(geom)
geom.to_file(os.path.splitext(name)[0]+'.geom',pack=False)
geom.to_file(os.path.splitext(name)[0]+'.geom',format='ASCII',pack=False)

View File

@ -89,4 +89,4 @@ geom=damask.Geom(microstructure,options.size,
comments=[scriptID + ' ' + ' '.join(sys.argv[1:])])
damask.util.croak(geom)
geom.to_file(sys.stdout if name is None else name,pack=False)
geom.to_file(sys.stdout if name is None else name,format='ASCII',pack=False)

View File

@ -142,4 +142,4 @@ geom = damask.Geom(microstructure.reshape(grid),
homogenization=options.homogenization,comments=header)
damask.util.croak(geom)
geom.to_file(sys.stdout if name is None else name,pack=False)
geom.to_file(sys.stdout if name is None else name,format='ASCII',pack=False)

View File

@ -105,4 +105,5 @@ for name in filenames:
homogenization=options.homogenization,comments=header)
damask.util.croak(geom)
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False)
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',
format='ASCII',pack=False)

View File

@ -228,4 +228,5 @@ for name in filenames:
homogenization=options.homogenization,comments=header)
damask.util.croak(geom)
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False)
geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',
format='ASCII',pack=False)

View File

@ -172,4 +172,4 @@ for name in filenames:
geom=geom.duplicate(microstructure[0:grid_original[0],0:grid_original[1],0:grid_original[2]])
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
geom.to_file(sys.stdout if name is None else name,pack=False)
geom.to_file(sys.stdout if name is None else name,format='ASCII',pack=False)

View File

@ -90,7 +90,7 @@ class myThread (threading.Thread):
direction[i]*=2.
i+= 1
perturbedSeedsTable.set('pos',coords)
perturbedSeedsTable.to_ASCII(perturbedSeedsVFile)
perturbedSeedsTable.to_file(perturbedSeedsVFile)
#--- do tesselation with perturbed seed file ------------------------------------------------------
perturbedGeomVFile.close()

View File

@ -65,5 +65,5 @@ for name in filenames:
table = damask.Table(seeds[mask],{'pos':(3,)},comments)
table.add('microstructure',microstructure[mask])
table.to_ASCII(sys.stdout if name is None else \
os.path.splitext(name)[0]+'.seeds')
table.to_file(sys.stdout if name is None else \
os.path.splitext(name)[0]+'.seeds')

View File

@ -92,5 +92,5 @@ for name in filenames:
table = damask.Table(seeds,{'pos':(3,),'microstructure':(1,)},comments)
table.set('microstructure',table.get('microstructure').astype(np.int))
table.to_ASCII(sys.stdout if name is None else \
os.path.splitext(name)[0]+'_poked_{}.seeds'.format(options.N))
table.to_file(sys.stdout if name is None else \
os.path.splitext(name)[0]+f'_poked_{options.N}.seeds')

View File

@ -162,4 +162,4 @@ for name in filenames:
else np.random.normal(loc = options.mean, scale = options.sigma, size = options.N)
table.add('weight',weights)
table.to_ASCII(sys.stdout if name is None else name)
table.to_file(sys.stdout if name is None else name)