on the way to full python 3 compatibility

This commit is contained in:
Martin Diehl 2018-07-20 03:31:46 +02:00
parent b59145fca5
commit 24d1528e04
3 changed files with 12 additions and 5 deletions

@ -1 +1 @@
Subproject commit 4cbe7024b4ebd1ef3ee35fbf8b9676f1c377f462
Subproject commit 12ecac5ad75a160d5ee8e2b18b752fdab11dfa0d

View File

@ -270,7 +270,7 @@ for name in filenames:
ODF['limit'] = np.radians(limits[1,:]) # right hand limits in radians
ODF['center'] = 0.0 if all(limits[0,:]<1e-8) else 0.5 # vertex or cell centered
ODF['interval'] = np.array(map(len,[np.unique(table.data[:,i]) for i in range(3)]),'i') # steps are number of distict values
ODF['interval'] = np.array(list(map(len,[np.unique(table.data[:,i]) for i in range(3)])),'i') # steps are number of distict values
ODF['nBins'] = ODF['interval'].prod()
ODF['delta'] = np.radians(np.array(limits[1,0:3]-limits[0,0:3])/(ODF['interval']-1)) # step size

View File

@ -77,7 +77,14 @@ def mesh(r,d):
"%f %f %f"%(-d[0],d[1],d[2]),
"%f %f %f"%(-d[0],d[1],0.0),
"*add_elements",
range(1,9),
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"*sub_divisions",
"%i %i %i"%(r[2],r[1],r[0]),
"*subdivide_elements",
@ -201,7 +208,7 @@ if options.port:
except:
parser.error('no valid Mentat release found.')
# --- loop over input files -------------------------------------------------------------------------
# --- loop over input files ------------------------------------------------------------------------
if filenames == []: filenames = [None]
@ -236,7 +243,7 @@ for name in filenames:
# --- read data ------------------------------------------------------------------------------------
microstructure = table.microstructure_read(info['grid']).reshape(info['grid'].prod(),order='F') # read microstructure
microstructure = table.microstructure_read(info['grid']).reshape(info['grid'].prod(),order='F') # read microstructure
cmds = [\
init(),