Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development
This commit is contained in:
commit
cb62066667
|
@ -1 +1 @@
|
||||||
./env/DAMASK.csh
|
env/DAMASK.csh
|
|
@ -1 +1 @@
|
||||||
./env/DAMASK.sh
|
env/DAMASK.sh
|
|
@ -1 +1 @@
|
||||||
./env/DAMASK.zsh
|
env/DAMASK.zsh
|
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 057371b82e3f5e880271b9631ace46c54280a753
|
Subproject commit 19a53f6229603aeafb2466b58679a1cd04fc0142
|
|
@ -43,7 +43,7 @@ q_slip 1.0 # q-exponent in glide velocity
|
||||||
CLambdaSlip 10.0 # Adj. parameter controlling dislocation mean free path
|
CLambdaSlip 10.0 # Adj. parameter controlling dislocation mean free path
|
||||||
D0 4.0e-5 # Vacancy diffusion prefactor [m**2/s]
|
D0 4.0e-5 # Vacancy diffusion prefactor [m**2/s]
|
||||||
Qsd 4.5e-19 # Activation energy for climb [J]
|
Qsd 4.5e-19 # Activation energy for climb [J]
|
||||||
Catomicvolume 1.0 # Adj. parameter controlling the atomic volume [in b]
|
Catomicvolume 1.0 # Adj. parameter controlling the atomic volume [in b^3]
|
||||||
Cedgedipmindistance 1.0 # Adj. parameter controlling the minimum dipole distance [in b]
|
Cedgedipmindistance 1.0 # Adj. parameter controlling the minimum dipole distance [in b]
|
||||||
atol_rho 1.0
|
atol_rho 1.0
|
||||||
interactionSlipSlip 0.122 0.122 0.625 0.07 0.137 0.122 # Interaction coefficients (Kubin et al. 2008)
|
interactionSlipSlip 0.122 0.122 0.625 0.07 0.137 0.122 # Interaction coefficients (Kubin et al. 2008)
|
||||||
|
|
|
@ -48,17 +48,16 @@ if options.asciitable is not None and os.path.isfile(options.asciitable):
|
||||||
buffered = False,
|
buffered = False,
|
||||||
readonly = True)
|
readonly = True)
|
||||||
linkedTable.head_read() # read ASCII header info of linked table
|
linkedTable.head_read() # read ASCII header info of linked table
|
||||||
if linkedTable.label_dimension(options.link[1]) != 1:
|
linkDim = linkedTable.label_dimension(options.link[1]) # dimension of linking column
|
||||||
parser.error('linking column {} needs to be scalar valued.'.format(options.link[1]))
|
|
||||||
|
|
||||||
missing_labels = linkedTable.data_readArray([options.link[1]]+options.label)
|
missing_labels = linkedTable.data_readArray([options.link[1]]+options.label) # try reading linked ASCII table
|
||||||
linkedTable.close() # close linked ASCII table
|
linkedTable.close() # close linked ASCII table
|
||||||
|
|
||||||
if len(missing_labels) > 0:
|
if len(missing_labels) > 0:
|
||||||
damask.util.croak('column{} {} not found...'.format('s' if len(missing_labels) > 1 else '',', '.join(missing_labels)))
|
damask.util.croak('column{} {} not found...'.format('s' if len(missing_labels) > 1 else '',', '.join(missing_labels)))
|
||||||
|
|
||||||
index = linkedTable.data[:,0]
|
index = linkedTable.data[:,:linkDim]
|
||||||
data = linkedTable.data[:,1:]
|
data = linkedTable.data[:,linkDim:]
|
||||||
else:
|
else:
|
||||||
parser.error('no linked ASCIItable given.')
|
parser.error('no linked ASCIItable given.')
|
||||||
|
|
||||||
|
@ -80,8 +79,10 @@ for name in filenames:
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
linkColumn = table.label_index(options.link[0])
|
myLink = table.label_index (options.link[0])
|
||||||
if linkColumn < 0: errors.append('linking column {} not found.'.format(options.link[0]))
|
myLinkDim = table.label_dimension(options.link[0])
|
||||||
|
if myLink < 0: errors.append('linking column {} not found.'.format(options.link[0]))
|
||||||
|
if myLinkDim != linkDim: errors.append('dimension mismatch for column {}.'.format(options.link[0]))
|
||||||
|
|
||||||
if errors != []:
|
if errors != []:
|
||||||
damask.util.croak(errors)
|
damask.util.croak(errors)
|
||||||
|
@ -91,7 +92,7 @@ for name in filenames:
|
||||||
# ------------------------------------------ assemble header --------------------------------------
|
# ------------------------------------------ assemble header --------------------------------------
|
||||||
|
|
||||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||||
table.labels_append(linkedTable.labels(raw = True)[1:]) # extend with new labels (except for linked column)
|
table.labels_append(linkedTable.labels(raw = True)[linkDim:]) # extend with new labels (except for linked column)
|
||||||
|
|
||||||
table.head_write()
|
table.head_write()
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ for name in filenames:
|
||||||
outputAlive = True
|
outputAlive = True
|
||||||
while outputAlive and table.data_read(): # read next data line of ASCII table
|
while outputAlive and table.data_read(): # read next data line of ASCII table
|
||||||
try:
|
try:
|
||||||
table.data_append(data[np.argwhere(index == float(table.data[linkColumn]))[0]]) # add data from first matching line
|
table.data_append(data[np.argwhere(np.all((map(float,table.data[myLink:myLink+myLinkDim]) - index)==0,axis=1))[0]]) # add data of first matching line
|
||||||
except IndexError:
|
except IndexError:
|
||||||
table.data_append(np.nan*np.ones_like(data[0])) # or add NaNs
|
table.data_append(np.nan*np.ones_like(data[0])) # or add NaNs
|
||||||
outputAlive = table.data_write() # output processed line
|
outputAlive = table.data_write() # output processed line
|
||||||
|
|
Loading…
Reference in New Issue