some more work on the postprocessing scripts, decreased test tolerance because spectral decomposition has rounding errors (depending on machine/python/numpy version)
This commit is contained in:
parent
8a683e2371
commit
cbafad50d0
|
@ -7,7 +7,7 @@ from optparse import OptionParser
|
|||
from vtk.util import numpy_support
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# -----------------------------
|
||||
|
@ -111,7 +111,7 @@ def vtk_writeASCII_mesh(mesh,data,res,sep):
|
|||
|
||||
cmds = [\
|
||||
'# vtk DataFile Version 3.1',
|
||||
string.replace('powered by %s'%scriptID,'\n','\\n'),
|
||||
'powered by %s'%scriptID,
|
||||
'ASCII',
|
||||
'DATASET UNSTRUCTURED_GRID',
|
||||
'POINTS %i double'%N1,
|
||||
|
@ -228,7 +228,7 @@ def vtk_writeASCII_points(coordinates,data,res,sep):
|
|||
|
||||
cmds = [\
|
||||
'# vtk DataFile Version 3.1',
|
||||
string.replace('powered by %s'%scriptID,'\n','\\n'),
|
||||
'powered by %s'%scriptID,
|
||||
'ASCII',
|
||||
'DATASET UNSTRUCTURED_GRID',
|
||||
'POINTS %i float'%N,
|
||||
|
@ -257,10 +257,10 @@ def vtk_writeASCII_points(coordinates,data,res,sep):
|
|||
# ----------------------- MAIN -------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog [options] datafile[s]', description = """
|
||||
Produce VTK file from data field. Coordinates are taken from (consecutive) x, y, and z columns.
|
||||
Produce VTK file from data field.
|
||||
Coordinates are taken from (consecutive) x, y, and z columns.
|
||||
|
||||
""",version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
sepChoices = ['n','t','s']
|
||||
parser.add_option('-s', '--scalar', dest='scalar', action='extend', type='string', metavar = '<string LIST>',
|
||||
|
|
|
@ -6,7 +6,7 @@ import numpy as np
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def unravel(item):
|
||||
|
@ -19,11 +19,12 @@ def unravel(item):
|
|||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) with derived values according to user defined arithmetic operation between column(s).
|
||||
Columns can be specified either by label or index. Use ';' for ',' in functions. Numpy is available as np
|
||||
Columns can be specified either by label or index. Use ';' for ',' in functions.
|
||||
Numpy is available as np.
|
||||
|
||||
Example: distance to IP coordinates -- "math.sqrt( #ip.x#**2 + #ip.y#**2 + round(#ip.z#;3)**2 )"
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-l','--label', dest='labels', action='extend', type='string', metavar='<string LIST>',
|
||||
help='(list of) new column labels')
|
||||
|
@ -60,7 +61,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
evaluator = {}
|
||||
brokenFormula = {}
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -15,11 +15,9 @@ scriptName = scriptID.split()[1]
|
|||
# --------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing Cauchy stress based on given column(s) of
|
||||
deformation gradient and first Piola--Kirchhoff stress.
|
||||
Add column(s) containing Cauchy stress based on given column(s) of deformation gradient and first Piola--Kirchhoff stress.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-f','--defgrad', dest='defgrad', action='store', type='string', metavar='string',
|
||||
help='heading of columns containing deformation gradient [%default]')
|
||||
|
@ -56,7 +54,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -6,7 +6,7 @@ import numpy as np
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -14,11 +14,11 @@ scriptName = scriptID.split()[1]
|
|||
# --------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options file[s]', description = """
|
||||
Add column containing debug information
|
||||
Add column containing debug information.
|
||||
Operates on periodic ordered three-dimensional data sets.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
|
||||
parser.add_option('--no-shape','-s', dest='noShape', action='store_false',
|
||||
help='do not calcuate shape mismatch [%default]')
|
||||
|
@ -54,13 +54,13 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
# --------------- figure out dimension and resolution ----------------------------------------------
|
||||
try:
|
||||
locationCol = table.labels.index('%s.x'%options.coords) # columns containing location data
|
||||
except ValueError:
|
||||
file['croak'].write('no coordinate data found...\n'%key)
|
||||
file['croak'].write('no coordinate data (%s.x) found...\n'%options.coords)
|
||||
continue
|
||||
|
||||
grid = [{},{},{}]
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -19,8 +19,7 @@ Add column(s) containing curl of requested column(s).
|
|||
Operates on periodic ordered three-dimensional data sets.
|
||||
Deals with both vector- and tensor-valued fields.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-c','--coordinates', dest='coords', action='store', type='string', metavar='string',
|
||||
help='column heading for coordinates [%default]')
|
||||
|
@ -59,13 +58,13 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],True) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
# --------------- figure out dimension and resolution ----------------------------------------------
|
||||
try:
|
||||
locationCol = table.labels.index('%s.x'%options.coords) # columns containing location data
|
||||
except ValueError:
|
||||
file['croak'].write('no coordinate data found...\n'%key)
|
||||
file['croak'].write('no coordinate data (%s.x) found...\n'%options.coords)
|
||||
continue
|
||||
|
||||
grid = [{},{},{}]
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -18,8 +18,7 @@ parser = OptionParser(option_class=damask.extendableOption, usage='%prog options
|
|||
Add column(s) containing deformed configuration of requested column(s).
|
||||
Operates on periodic ordered three-dimensional data sets.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-c','--coordinates', dest='coords', action='store', type='string', metavar='string',
|
||||
help='column heading for coordinates [%default]')
|
||||
|
@ -52,13 +51,13 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
# --------------- figure out dimension and resolution ----------------------------------------------
|
||||
try:
|
||||
locationCol = table.labels.index('%s.x'%options.coords) # columns containing location data
|
||||
except ValueError:
|
||||
file['croak'].write('no coordinate data found...\n'%key)
|
||||
file['croak'].write('no coordinate data (%s.x) found...\n'%options.coords)
|
||||
continue
|
||||
|
||||
grid = [{},{},{}]
|
||||
|
|
|
@ -6,7 +6,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def determinant(m):
|
||||
|
@ -24,8 +24,7 @@ def determinant(m):
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing determinant of requested tensor column(s).
|
||||
|
||||
""", version=string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-t','--tensor', dest='tensor', action='extend', type='string', metavar='<string LIST>',
|
||||
help='heading of columns containing tensor field values')
|
||||
|
@ -59,7 +58,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = []
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -6,7 +6,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
oneThird = 1.0/3.0
|
||||
|
@ -25,8 +25,7 @@ def deviator(m):
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing deviator of requested tensor column(s).
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-t','--tensor', dest='tensor', action='extend', type='string', metavar='<string LIST>',
|
||||
help='heading of columns containing tensor field values')
|
||||
|
@ -63,7 +62,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = []
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -7,10 +7,9 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# MAIN
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -20,8 +19,7 @@ Add column(s) containing divergence of requested column(s).
|
|||
Operates on periodic ordered three-dimensional data sets.
|
||||
Deals with both vector- and tensor-valued fields.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
accuracyChoices = ['2','4','6','8']
|
||||
parser.add_option('--fdm', dest='accuracy', action='extend', type='string', metavar='<int LIST>',
|
||||
|
@ -73,13 +71,13 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],True) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
# --------------- figure out dimension and resolution ----------------------------------------------
|
||||
try:
|
||||
locationCol = table.labels.index('%s.x'%options.coords) # columns containing location data
|
||||
except ValueError:
|
||||
file['croak'].write('no coordinate data found...\n'%key)
|
||||
file['croak'].write('no coordinate data (%s.x) found...\n'%options.coords)
|
||||
continue
|
||||
|
||||
grid = [{},{},{}]
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def normalize(vec):
|
||||
|
@ -32,11 +32,9 @@ def E_hkl(stiffness,vec): # stiffness = (c11,c12,c44)
|
|||
# --------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing directional stiffness
|
||||
based on given cubic stiffness values C11, C12, and C44 in consecutive columns.
|
||||
Add column(s) containing directional stiffness based on given cubic stiffness values C11, C12, and C44 in consecutive columns.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-c','--stiffness', dest='vector', action='extend', type='string', metavar='<string LIST>',
|
||||
help='heading of column containing C11 (followed by C12, C44) field values')
|
||||
|
@ -75,7 +73,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = []
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -7,7 +7,7 @@ from optparse import OptionParser
|
|||
from scipy import ndimage
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def periodic_3Dpad(array, rimdim=(1,1,1)):
|
||||
|
@ -83,11 +83,10 @@ neighborhoods = {
|
|||
}
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing Euclidean distance to grain structural features:
|
||||
boundaries, triple lines, and quadruple points.
|
||||
Add column(s) containing Euclidean distance to grain structural features: boundaries, triple lines, and quadruple points.
|
||||
|
||||
""", version = scriptID)
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
parser.add_option('-c','--coordinates', dest='coords', action='store', type='string', metavar='string',
|
||||
help='column heading for coordinates [%default]')
|
||||
parser.add_option('-i','--identifier', dest='id', action='store', type='string', metavar = 'string',
|
||||
|
@ -126,13 +125,13 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
# --------------- figure out position of labels and coordinates ------------------------------------
|
||||
try:
|
||||
locationCol = table.labels.index('%s.x'%options.coords) # columns containing location data
|
||||
except ValueError:
|
||||
file['croak'].write('no coordinate data found...\n'%key)
|
||||
file['croak'].write('no coordinate data (%s.x) found...\n'%options.coords)
|
||||
continue
|
||||
|
||||
if options.id not in table.labels:
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -17,8 +17,7 @@ scriptName = scriptID.split()[1]
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add RGB color value corresponding to TSL-OIM scheme for inverse pole figures.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-p', '--pole', dest='pole', action='store', type='float', nargs=3, metavar='float float float',
|
||||
help = 'lab frame direction for inverse pole figure %default')
|
||||
|
@ -86,7 +85,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -5,7 +5,7 @@ import os,re,sys,math,string
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id: addCauchy.py 3301 2014-07-22 14:21:49Z MPIE\m.diehl $'
|
||||
scriptID = string.replace('$Id: addCauchy.py 3331 2014-08-04 17:53:41Z MPIE\m.diehl $','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -15,8 +15,7 @@ scriptName = scriptID.split()[1]
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add data in column(s) of second ASCIItable selected from row that is given by the value in a mapping column.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-a','--asciitable', dest='asciitable', action='store', type='string', metavar='string',
|
||||
help='mapped ASCIItable')
|
||||
|
@ -100,7 +99,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
if options.map not in table.labels:
|
||||
file['croak'].write('column %s not found...\n'%options.map)
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def Mises(what,tensor):
|
||||
|
@ -27,8 +27,7 @@ def Mises(what,tensor):
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add vonMises equivalent values for symmetric part of requested strains and/or stresses.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-e','--strain', dest='strain', action='extend', type='string', metavar='<string LIST>',
|
||||
help='heading(s) of columns containing strain tensors')
|
||||
|
@ -68,7 +67,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -6,7 +6,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# definition of element-wise p-norms for matrices
|
||||
|
@ -26,8 +26,7 @@ def normMax(object): # p = infinity
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing norm of requested column(s) being either vectors or tensors.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
normChoices = ['abs','frobenius','max']
|
||||
parser.add_option('-n','--norm', dest='norm', action='store', type='choice', choices=normChoices, metavar='string',
|
||||
|
@ -80,7 +79,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -6,7 +6,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -15,11 +15,9 @@ scriptName = scriptID.split()[1]
|
|||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add quaternion and/or Bunge Euler angle representation of crystal lattice orientation.
|
||||
Orientation is given by quaternion, Euler angles,
|
||||
rotation matrix, or crystal frame coordinates (i.e. component vectors of rotation matrix).
|
||||
Orientation is given by quaternion, Euler angles, rotation matrix, or crystal frame coordinates (i.e. component vectors of rotation matrix).
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
outputChoices = ['quaternion','eulers']
|
||||
parser.add_option('-o', '--output', dest='output', action='extend', type='string', metavar='<string LIST>',
|
||||
|
@ -96,7 +94,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -15,11 +15,9 @@ scriptName = scriptID.split()[1]
|
|||
# --------------------------------------------------------------------
|
||||
|
||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing Second Piola--Kirchhoff stress based on given column(s) of
|
||||
deformation gradient and first Piola--Kirchhoff stress.
|
||||
Add column(s) containing Second Piola--Kirchhoff stress based on given column(s) of deformation gradient and first Piola--Kirchhoff stress.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-f','--defgrad', dest='defgrad', action='store', type='string', metavar='string',
|
||||
help='heading of columns containing deformation gradient [%default]')
|
||||
|
@ -56,7 +54,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
slipnormal_temp = [
|
||||
|
@ -246,8 +246,7 @@ def crossproduct(x,y):
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add columns listing Schmid factors (and optional trace vector of selected system) for given Euler angles.
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-l','--lattice', dest='lattice', action='store', type='choice',
|
||||
choices=('fcc','bcc','hex'), metavar='string',
|
||||
|
@ -326,7 +325,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = defaultdict(list)
|
||||
column = defaultdict(dict)
|
||||
|
@ -345,7 +344,7 @@ for file in files:
|
|||
|
||||
# ------------------------------------------ assemble header ---------------------------------------
|
||||
|
||||
table.labels_append(['(%i)S(%i %i %i)[%i %i %i]'%(i+1,
|
||||
table.labels_append(['%i_S(%i_%i_%i)[%i_%i_%i]'%(i+1,
|
||||
slipnormal[options.lattice][i][0],
|
||||
slipnormal[options.lattice][i][1],
|
||||
slipnormal[options.lattice][i][2],
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
@ -17,8 +17,7 @@ scriptName = scriptID.split()[1]
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing eigenvalues and eigenvectors of requested tensor column(s).
|
||||
|
||||
""", version = string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-t','--tensor', dest='tensor', action='extend', type='string', metavar='<string LIST>',
|
||||
help='heading of columns containing tensor field values')
|
||||
|
@ -48,7 +47,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],True) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = []
|
||||
column = defaultdict(dict)
|
||||
|
|
|
@ -7,7 +7,7 @@ from collections import defaultdict
|
|||
from optparse import OptionParser
|
||||
import damask
|
||||
|
||||
scriptID = '$Id$'
|
||||
scriptID = string.replace('$Id$','\n','\\n')
|
||||
scriptName = scriptID.split()[1]
|
||||
|
||||
def operator(stretch,strain,eigenvalues):
|
||||
|
@ -28,8 +28,7 @@ def operator(stretch,strain,eigenvalues):
|
|||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
||||
Add column(s) containing given strains based on given stretches of requested deformation gradient column(s).
|
||||
|
||||
""" + string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
""", version = scriptID)
|
||||
|
||||
parser.add_option('-u','--right', dest='right', action='store_true',
|
||||
help='material strains based on right Cauchy--Green deformation, i.e., C and U [%default]')
|
||||
|
@ -85,7 +84,7 @@ for file in files:
|
|||
|
||||
table = damask.ASCIItable(file['input'],file['output'],False) # make unbuffered ASCII_table
|
||||
table.head_read() # read ASCII header info
|
||||
table.info_append(string.replace(scriptID,'\n','\\n') + '\t' + ' '.join(sys.argv[1:]))
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
|
||||
active = []
|
||||
column = defaultdict(dict)
|
||||
|
|
Loading…
Reference in New Issue