ensure that data is correctly ordered
This commit is contained in:
parent
8d0c4310cf
commit
828e82605e
|
@ -44,7 +44,7 @@ for name in filenames:
|
|||
damask.util.report(scriptName,name)
|
||||
|
||||
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
grid,size = damask.util.coordGridAndSize(table.get(options.pos))
|
||||
grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos),True)
|
||||
|
||||
for label in options.labels:
|
||||
field = table.get(label)
|
||||
|
|
|
@ -50,7 +50,7 @@ for name in filenames:
|
|||
damask.util.report(scriptName,name)
|
||||
|
||||
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
grid,size = damask.util.coordGridAndSize(table.get(options.pos))
|
||||
grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos),True)
|
||||
|
||||
F = table.get(options.f).reshape(np.append(grid[::-1],(3,3)))
|
||||
if options.nodal:
|
||||
|
|
|
@ -44,7 +44,7 @@ for name in filenames:
|
|||
damask.util.report(scriptName,name)
|
||||
|
||||
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
grid,size = damask.util.coordGridAndSize(table.get(options.pos))
|
||||
grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos),True)
|
||||
|
||||
for label in options.labels:
|
||||
field = table.get(label)
|
||||
|
|
|
@ -44,7 +44,7 @@ for name in filenames:
|
|||
damask.util.report(scriptName,name)
|
||||
|
||||
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
|
||||
grid,size = damask.util.coordGridAndSize(table.get(options.pos))
|
||||
grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos),True)
|
||||
|
||||
for label in options.labels:
|
||||
field = table.get(label)
|
||||
|
|
|
@ -102,7 +102,7 @@ def cell_coord0_2_DNA(coord0,ordered=False):
|
|||
raise ValueError('Data count {} does not match grid {}.'.format(len(coord0),grid))
|
||||
|
||||
start = origin + delta*.5
|
||||
end = origin + size -delta*.5
|
||||
end = origin - delta*.5 + size
|
||||
|
||||
if not np.allclose(coords[0],np.linspace(start[0],end[0],grid[0])) and \
|
||||
np.allclose(coords[1],np.linspace(start[1],end[1],grid[1])) and \
|
||||
|
|
Loading…
Reference in New Issue