From 70cb1f07642e64726a13c4468552ea88ccc8567b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 22 Dec 2019 16:01:39 +0100 Subject: [PATCH 01/75] copy of addGridData W/O functionality for meshes --- processing/post/vtk_addRectilinearGridData.py | 199 ------------------ 1 file changed, 199 deletions(-) delete mode 100755 processing/post/vtk_addRectilinearGridData.py diff --git a/processing/post/vtk_addRectilinearGridData.py b/processing/post/vtk_addRectilinearGridData.py deleted file mode 100755 index 6f5e44e35..000000000 --- a/processing/post/vtk_addRectilinearGridData.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python3 - -import os -from optparse import OptionParser - -from collections import defaultdict - -import vtk -from vtk.util import numpy_support - -import damask - - -scriptName = os.path.splitext(os.path.basename(__file__))[0] -scriptID = ' '.join([scriptName,damask.version]) - - -# -------------------------------------------------------------------- -# MAIN -# -------------------------------------------------------------------- - -msg = "Add scalars, vectors, and/or an RGB tuple from" -msg += "an ASCIItable to existing VTK rectilinear grid (.vtr/.vtk)." -parser = OptionParser(option_class=damask.extendableOption, - usage='%prog options [file[s]]', - description = msg, - version = scriptID) - -parser.add_option( '--vtk', - dest = 'vtk', - type = 'string', metavar = 'string', - help = 'VTK file name') -parser.add_option('-r', '--render', - dest = 'render', - action = 'store_true', - help = 'open output in VTK render window') -parser.add_option('-d', '--data', - dest = 'data', - action = 'extend', metavar = '', - help = 'scalar/vector value(s) label(s)') -parser.add_option('-t', '--tensor', - dest = 'tensor', - action = 'extend', metavar = '', - help = 'tensor (3x3) value label(s)') -parser.add_option('-c', '--color', - dest = 'color', - action = 'extend', metavar = '', - help = 'RGB color tuple label') - -parser.set_defaults(data = [], - tensor = [], - color = [], - render = False, -) - -(options, filenames) = parser.parse_args() - -if not options.vtk: parser.error('no VTK file specified.') -if not os.path.exists(options.vtk): parser.error('VTK file does not exist.') - -vtk_file,vtk_ext = os.path.splitext(options.vtk) -if vtk_ext == '.vtr': - reader = vtk.vtkXMLRectilinearGridReader() - reader.SetFileName(options.vtk) - reader.Update() - rGrid = reader.GetOutput() -elif vtk_ext == '.vtk': - reader = vtk.vtkGenericDataObjectReader() - reader.SetFileName(options.vtk) - reader.Update() - rGrid = reader.GetRectilinearGridOutput() -else: - parser.error('unsupported VTK file type extension.') - -Npoints = rGrid.GetNumberOfPoints() -Ncells = rGrid.GetNumberOfCells() - -damask.util.croak('{}: {} points and {} cells...'.format(options.vtk,Npoints,Ncells)) - -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] - -for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False, - readonly = True) - except: continue - damask.util.report(scriptName, name) - -# --- interpret header ---------------------------------------------------------------------------- - - table.head_read() - - remarks = [] - errors = [] - VTKarray = {} - active = defaultdict(list) - - for datatype,dimension,label in [['data',0,options.data], - ['tensor',9,options.tensor], - ['color' ,3,options.color], - ]: - for i,dim in enumerate(table.label_dimension(label)): - me = label[i] - if dim == -1: remarks.append('{} "{}" not found...'.format(datatype,me)) - elif dimension > 0 \ - and dim != dimension: remarks.append('"{}" not of dimension {}...'.format(me,dimension)) - else: - remarks.append('adding {}{} "{}"...'.format(datatype if dim > 1 else 'scalar', - '' if dimension > 0 or dim == 1 else '[{}]'.format(dim), - me)) - active[datatype].append(me) - - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# ------------------------------------------ process data --------------------------------------- - - table.data_readArray([item for sublist in active.values() for item in sublist]) # read all requested data - - for datatype,labels in active.items(): # loop over scalar,color - for me in labels: # loop over all requested items - VTKtype = vtk.VTK_DOUBLE - VTKdata = table.data[:, table.label_indexrange(me)].copy() # copy to force contiguous layout - - if datatype == 'color': - VTKtype = vtk.VTK_UNSIGNED_CHAR - VTKdata = (VTKdata*255).astype(int) # translate to 0..255 UCHAR - elif datatype == 'tensor': - VTKdata[:,1] = VTKdata[:,3] = 0.5*(VTKdata[:,1]+VTKdata[:,3]) - VTKdata[:,2] = VTKdata[:,6] = 0.5*(VTKdata[:,2]+VTKdata[:,6]) - VTKdata[:,5] = VTKdata[:,7] = 0.5*(VTKdata[:,5]+VTKdata[:,7]) - - VTKarray[me] = numpy_support.numpy_to_vtk(num_array=VTKdata,deep=True,array_type=VTKtype) - VTKarray[me].SetName(me) - - table.close() # close input ASCII table - -# ------------------------------------------ add data --------------------------------------- - - if len(table.data) == Npoints: mode = 'point' - elif len(table.data) == Ncells: mode = 'cell' - else: - damask.util.croak('data count is incompatible with grid...') - continue - - damask.util.croak('{} mode...'.format(mode)) - - for datatype,labels in active.items(): # loop over scalar,color - if datatype == 'color': - if mode == 'cell': rGrid.GetCellData().SetScalars(VTKarray[active['color'][0]]) - elif mode == 'point': rGrid.GetPointData().SetScalars(VTKarray[active['color'][0]]) - for me in labels: # loop over all requested items - if mode == 'cell': rGrid.GetCellData().AddArray(VTKarray[me]) - elif mode == 'point': rGrid.GetPointData().AddArray(VTKarray[me]) - - rGrid.Modified() - -# ------------------------------------------ output result --------------------------------------- - - writer = vtk.vtkXMLRectilinearGridWriter() - writer.SetDataModeToBinary() - writer.SetCompressorTypeToZLib() - writer.SetFileName(vtk_file+'.'+writer.GetDefaultFileExtension()) - writer.SetInputData(rGrid) - writer.Write() - -# ------------------------------------------ render result --------------------------------------- - -if options.render: - mapper = vtk.vtkDataSetMapper() - mapper.SetInputData(rGrid) - actor = vtk.vtkActor() - actor.SetMapper(mapper) - -# Create the graphics structure. The renderer renders into the -# render window. The render window interactor captures mouse events -# and will perform appropriate camera or actor manipulation -# depending on the nature of the events. - - ren = vtk.vtkRenderer() - - renWin = vtk.vtkRenderWindow() - renWin.AddRenderer(ren) - - ren.AddActor(actor) - ren.SetBackground(1, 1, 1) - renWin.SetSize(200, 200) - - iren = vtk.vtkRenderWindowInteractor() - iren.SetRenderWindow(renWin) - - iren.Initialize() - renWin.Render() - iren.Start() From c3c08b5b53cde18091bc93d73b8bfee5095fa277 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 22 Dec 2019 16:16:04 +0100 Subject: [PATCH 02/75] using new class/unifying style --- processing/post/vtk_addGridData.py | 82 ++++++-------------- processing/post/vtk_addPointCloudData.py | 96 +++++++----------------- 2 files changed, 48 insertions(+), 130 deletions(-) diff --git a/processing/post/vtk_addGridData.py b/processing/post/vtk_addGridData.py index b9beb6abe..1596cd7fe 100755 --- a/processing/post/vtk_addGridData.py +++ b/processing/post/vtk_addGridData.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import sys from optparse import OptionParser from collections import defaultdict @@ -18,11 +19,10 @@ scriptID = ' '.join([scriptName,damask.version]) # MAIN # -------------------------------------------------------------------- -msg = "Add scalars, vectors, and/or an RGB tuple from" -msg += "an ASCIItable to existing VTK grid (.vtr/.vtk/.vtu)." parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', - description = msg, + description = "Add scalars, vectors, tensors, and/or an RGB tuple from ASCIItable " + + "to existing VTK grid (.vtr/.vtk/.vtu).", version = scriptID) parser.add_option( '--vtk', @@ -49,10 +49,10 @@ parser.add_option('-c', '--color', parser.set_defaults(data = [], tensor = [], color = [], - render = False, ) (options, filenames) = parser.parse_args() +if filenames == []: filenames = [None] if not options.vtk: parser.error('No VTK file specified.') if not os.path.exists(options.vtk): parser.error('VTK file does not exist.') @@ -87,65 +87,28 @@ Ncells = rGrid.GetNumberOfCells() damask.util.croak('{}: {} points and {} cells...'.format(options.vtk,Npoints,Ncells)) -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] - for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False, - readonly = True) - except: continue - damask.util.report(scriptName, name) + damask.util.report(scriptName,name) -# --- interpret header ---------------------------------------------------------------------------- - - table.head_read() - - remarks = [] - errors = [] + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) + VTKarray = {} - active = defaultdict(list) + for data in options.data: + VTKarray[data] = numpy_support.numpy_to_vtk(table.get(data).copy(), + deep=True,array_type=vtk.VTK_DOUBLE) + VTKarray[data].SetName(data) + + for color in options.color: + VTKarray[color] = numpy_support.numpy_to_vtk((table.get(color)*255).astype(int).copy(), + deep=True,array_type=vtk.VTK_UNSIGNED_CHAR) + VTKarray[color].SetName(color) - for datatype,dimension,label in [['data',99,options.data], - ['tensor',9,options.tensor], - ['color' ,3,options.color], - ]: - for i,dim in enumerate(table.label_dimension(label)): - me = label[i] - if dim == -1: remarks.append('{} "{}" not found...'.format(datatype,me)) - elif dim > dimension: remarks.append('"{}" not of dimension {}...'.format(me,dimension)) - else: - remarks.append('adding {} "{}"...'.format(datatype,me)) - active[datatype].append(me) + for tensor in options.tensor: + data = damask.mechanics.symmetric(table.get(tensor).reshape((-1,3,3))).reshape((-1,9)) + VTKarray[tensor] = numpy_support.numpy_to_vtk(data.copy(), + deep=True,array_type=vtk.VTK_DOUBLE) + VTKarray[tensor].SetName(tensor) - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# ------------------------------------------ process data --------------------------------------- - - table.data_readArray([item for sublist in active.values() for item in sublist]) # read all requested data - - for datatype,labels in active.items(): # loop over scalar,color - for me in labels: # loop over all requested items - VTKtype = vtk.VTK_DOUBLE - VTKdata = table.data[:, table.label_indexrange(me)].copy() # copy to force contiguous layout - - if datatype == 'color': - VTKtype = vtk.VTK_UNSIGNED_CHAR - VTKdata = (VTKdata*255).astype(int) # translate to 0..255 UCHAR - elif datatype == 'tensor': - VTKdata[:,1] = VTKdata[:,3] = 0.5*(VTKdata[:,1]+VTKdata[:,3]) - VTKdata[:,2] = VTKdata[:,6] = 0.5*(VTKdata[:,2]+VTKdata[:,6]) - VTKdata[:,5] = VTKdata[:,7] = 0.5*(VTKdata[:,5]+VTKdata[:,7]) - - VTKarray[me] = numpy_support.numpy_to_vtk(num_array=VTKdata,deep=True,array_type=VTKtype) - VTKarray[me].SetName(me) - - table.close() # close input ASCII table # ------------------------------------------ add data --------------------------------------- @@ -166,7 +129,6 @@ for name in filenames: elif mode == 'point': rGrid.GetPointData().AddArray(VTKarray[me]) rGrid.Modified() - if vtk.VTK_MAJOR_VERSION <= 5: rGrid.Update() # ------------------------------------------ output result --------------------------------------- @@ -184,7 +146,7 @@ if options.render: actor.SetMapper(mapper) # Create the graphics structure. The renderer renders into the -# render window. The render window interactor captures mouse events +# render window. The render window interactively captures mouse events # and will perform appropriate camera or actor manipulation # depending on the nature of the events. diff --git a/processing/post/vtk_addPointCloudData.py b/processing/post/vtk_addPointCloudData.py index 96bacae8a..5a40d967a 100755 --- a/processing/post/vtk_addPointCloudData.py +++ b/processing/post/vtk_addPointCloudData.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import sys from optparse import OptionParser from collections import defaultdict @@ -20,7 +21,8 @@ scriptID = ' '.join([scriptName,damask.version]) parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', - description = """Add scalar and RGB tuples from ASCIItable to existing VTK point cloud (.vtp).""", + description = "Add scalars, vectors, tensors, and/or an RGB tuple from ASCIItable " + + "VTK point cloud (.vtp).", version = scriptID) parser.add_option( '--vtk', @@ -39,9 +41,10 @@ parser.add_option('-t', '--tensor', dest = 'tensor', action = 'extend', metavar = '', help = 'tensor (3x3) value label(s)') -parser.add_option('-c', '--color', dest='color', action='extend', - metavar ='', - help = 'RGB color tuples') +parser.add_option('-c', '--color', + dest = 'color', + action = 'extend', metavar = '', + help = 'RGB color tuple label') parser.set_defaults(data = [], tensor = [], @@ -49,8 +52,9 @@ parser.set_defaults(data = [], ) (options, filenames) = parser.parse_args() +if filenames == []: filenames = [None] -if not options.vtk: parser.error('no VTK file specified.') +if not options.vtk: parser.error('No VTK file specified.') if not os.path.exists(options.vtk): parser.error('VTK file does not exist.') vtk_file,vtk_ext = os.path.splitext(options.vtk) @@ -77,76 +81,28 @@ if Npoints != Ncells or Npoints != Nvertices: damask.util.croak('{}: {} points/vertices/cells...'.format(options.vtk,Npoints)) -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] - for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False, - readonly = True) - except: continue - damask.util.report(scriptName, name) + damask.util.report(scriptName,name) -# --- interpret header ---------------------------------------------------------------------------- - - table.head_read() - - remarks = [] - errors = [] + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) + VTKarray = {} - active = defaultdict(list) + for data in options.data: + VTKarray[data] = numpy_support.numpy_to_vtk(table.get(data).copy(), + deep=True,array_type=vtk.VTK_DOUBLE) + VTKarray[data].SetName(data) + + for color in options.color: + VTKarray[color] = numpy_support.numpy_to_vtk((table.get(color)*255).astype(int).copy(), + deep=True,array_type=vtk.VTK_UNSIGNED_CHAR) + VTKarray[color].SetName(color) - for datatype,dimension,label in [['data',0,options.data], - ['tensor',9,options.tensor], - ['color' ,3,options.color], - ]: - for i,dim in enumerate(table.label_dimension(label)): - me = label[i] - if dim == -1: remarks.append('{} "{}" not found...'.format(datatype,me)) - elif dimension > 0 \ - and dim != dimension: remarks.append('"{}" not of dimension {}...'.format(me,dimension)) - else: - remarks.append('adding {}{} "{}"...'.format(datatype if dim > 1 else 'scalar', - '' if dimension > 0 or dim == 1 else '[{}]'.format(dim), - me)) - active[datatype].append(me) + for tensor in options.tensor: + data = damask.mechanics.symmetric(table.get(tensor).reshape((-1,3,3))).reshape((-1,9)) + VTKarray[tensor] = numpy_support.numpy_to_vtk(data.copy(), + deep=True,array_type=vtk.VTK_DOUBLE) + VTKarray[tensor].SetName(tensor) - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# --------------------------------------- process and add data ----------------------------------- - - table.data_readArray([item for sublist in active.values() for item in sublist]) # read all requested data - - for datatype,labels in active.items(): # loop over scalar,color - for me in labels: # loop over all requested items - VTKtype = vtk.VTK_DOUBLE - VTKdata = table.data[:, table.label_indexrange(me)].copy() # copy to force contiguous layout - - if datatype == 'color': - VTKtype = vtk.VTK_UNSIGNED_CHAR - VTKdata = (VTKdata*255).astype(int) # translate to 0..255 UCHAR - elif datatype == 'tensor': - VTKdata[:,1] = VTKdata[:,3] = 0.5*(VTKdata[:,1]+VTKdata[:,3]) - VTKdata[:,2] = VTKdata[:,6] = 0.5*(VTKdata[:,2]+VTKdata[:,6]) - VTKdata[:,5] = VTKdata[:,7] = 0.5*(VTKdata[:,5]+VTKdata[:,7]) - - VTKarray[me] = numpy_support.numpy_to_vtk(num_array=VTKdata,deep=True,array_type=VTKtype) - VTKarray[me].SetName(me) - - if datatype == 'color': - Polydata.GetPointData().SetScalars(VTKarray[me]) - Polydata.GetCellData().SetScalars(VTKarray[me]) - else: - Polydata.GetPointData().AddArray(VTKarray[me]) - Polydata.GetCellData().AddArray(VTKarray[me]) - - - table.input_close() # close input ASCII table # ------------------------------------------ output result --------------------------------------- From 2cb3213e37967e708abc52cb2f03908795adb0b2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 22 Dec 2019 18:11:01 +0100 Subject: [PATCH 03/75] improvements to Table class - string comparison should be '!=' not 'is not', latter compares object, not value - functions for common operations: append (vstack, growTable) and join (hstack, addTable) --- python/damask/table.py | 41 +++++++++++++++++++++++++++++++++++--- python/tests/test_Table.py | 28 ++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/python/damask/table.py b/python/damask/table.py index a5ce50237..28ce3efe0 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -248,17 +248,17 @@ class Table(): '' if info is None else ': {}'.format(info), )) - self.shapes = {(label if label is not label_old else label_new):self.shapes[label] for label in self.shapes} + self.shapes = {(label if label != label_old else label_new):self.shapes[label] for label in self.shapes} def sort_by(self,labels,ascending=True): """ - Get column data. + Sort table by values of given labels. Parameters ---------- label : str or list - Column labels. + Column labels for sorting. ascending : bool or list, optional Set sort order. @@ -269,6 +269,41 @@ class Table(): self.comments.append('sorted by [{}]'.format(', '.join(labels))) + def append(self,other): + """ + Append other table vertically (similar to numpy.vstack). Requires matching shapes and order. + + Parameters + ---------- + other : Table + Table to append + + """ + if self.shapes != other.shapes or not self.data.columns.equals(other.data.columns): + raise KeyError('Labels or shapes or order do not match') + else: + self.data = self.data.append(other.data,ignore_index=True) + + + def join(self,other): + """ + Append other table horizontally (similar to numpy.hstack). Requires matching number of rows + and no common lables + + Parameters + ---------- + other : Table + Table to join + + """ + if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]: + raise KeyError('Dublicated keys or row count mismatch') + else: + self.data = self.data.join(other.data) + for key in other.shapes: + self.shapes[key] = other.shapes[key] + + def to_ASCII(self,fname): """ Store as plain text file. diff --git a/python/tests/test_Table.py b/python/tests/test_Table.py index 818a55f40..d5f505e76 100644 --- a/python/tests/test_Table.py +++ b/python/tests/test_Table.py @@ -86,14 +86,42 @@ class TestTable: def test_rename_gone(self,default): default.rename('v','V') + assert 'v' not in default.shapes and 'v' not in default.data.columns with pytest.raises(KeyError): default.get('v') def test_delete(self,default): default.delete('v') + assert 'v' not in default.shapes and 'v' not in default.data.columns with pytest.raises(KeyError): default.get('v') + def test_join(self): + x = np.random.random((5,13)) + a = Table(x,{'F':(3,3),'v':(3,),'s':(1,)},['random test data']) + y = np.random.random((5,3)) + b = Table(y,{'u':(3,)},['random test data']) + a.join(b) + assert np.array_equal(a.get('u'), b.get('u')) + + def test_join_invalid(self): + x = np.random.random((5,13)) + a = Table(x,{'F':(3,3),'v':(3,),'s':(1,)},['random test data']) + with pytest.raises(KeyError): + a.join(a) + + def test_append(self): + x = np.random.random((5,13)) + a = Table(x,{'F':(3,3),'v':(3,),'s':(1,)},['random test data']) + a.append(a) + assert np.array_equal(a.data[:5].to_numpy(),a.data[5:].to_numpy()) + + def test_append_invalid(self): + x = np.random.random((5,13)) + a = Table(x,{'F':(3,3),'v':(3,),'s':(1,)},['random test data']) + b = Table(x,{'F':(3,3),'u':(3,),'s':(1,)},['random test data']) + with pytest.raises(KeyError): + a.append(b) def test_invalid_initialization(self): x = np.random.random((5,10)) From 644967329f9165c1e19125aea75ffac3765d0288 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 22 Dec 2019 22:23:33 +0100 Subject: [PATCH 04/75] improved tests --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 036faecca..e6d5dfb2f 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 036faecca39b46fd2328597ca858cbb04e37f79a +Subproject commit e6d5dfb2fa8544de93378d60aaf8423409cfd387 From db14baec4123588a25179172ef7cbb9e6ac274e3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 22 Dec 2019 22:23:48 +0100 Subject: [PATCH 05/75] using central functionality --- processing/post/addTable.py | 57 +++++++----------------------------- processing/post/growTable.py | 53 ++++++--------------------------- 2 files changed, 19 insertions(+), 91 deletions(-) diff --git a/processing/post/addTable.py b/processing/post/addTable.py index 7af1dcf35..c7d34f1e8 100755 --- a/processing/post/addTable.py +++ b/processing/post/addTable.py @@ -25,56 +25,19 @@ parser.add_option('-a', '--add','--table', help = 'tables to add') (options,filenames) = parser.parse_args() - -if options.table is None: - parser.error('no table specified.') - - -# --- loop over input files ------------------------------------------------------------------------- - if filenames == []: filenames = [None] +if options.table is None: + parser.error('no table specified.') + for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False) - except: continue + damask.util.report(scriptName,name) - damask.util.report(scriptName,name) + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) - tables = [] - for addTable in options.table: - try: tables.append(damask.ASCIItable(name = addTable, - buffered = False, - readonly = True) - ) - except: continue + for addTable in options.table: + table2 = damask.Table.from_ASCII(addTable) + table2.data = table2.data[:table.data.shape[0]] + table.join(table2) -# ------------------------------------------ read headers ------------------------------------------ - - table.head_read() - for addTable in tables: addTable.head_read() - -# ------------------------------------------ assemble header -------------------------------------- - - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - - for addTable in tables: table.labels_append(addTable.labels(raw = True)) # extend ASCII header with new labels - - table.head_write() - -# ------------------------------------------ process data ------------------------------------------ - - outputAlive = True - while outputAlive and table.data_read(): - for addTable in tables: - outputAlive = addTable.data_read() # read next table's data - if not outputAlive: break - table.data_append(addTable.data) # append to master table - if outputAlive: - outputAlive = table.data_write() # output processed line - -# ------------------------------------------ output finalization ----------------------------------- - - table.close() # close ASCII tables - for addTable in tables: - addTable.close() + table.to_ASCII(sys.stdout if name is None else name) diff --git a/processing/post/growTable.py b/processing/post/growTable.py index 361ea5764..4fd647b1e 100755 --- a/processing/post/growTable.py +++ b/processing/post/growTable.py @@ -27,53 +27,18 @@ parser.add_option('-a', '--add','--table', help = 'tables to add') (options,filenames) = parser.parse_args() - -if options.table is None: - parser.error('no table specified.') - - -# --- loop over input files ------------------------------------------------------------------------- - if filenames == []: filenames = [None] +if options.table is None: + parser.error('no table specified.') + for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False) - except: continue + damask.util.report(scriptName,name) - damask.util.report(scriptName,name) + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) - tables = [] - for addTable in options.table: - try: tables.append(damask.ASCIItable(name = addTable, - buffered = False, - readonly = True) - ) - except: continue + for growTable in options.table: + table2 = damask.Table.from_ASCII(growTable) + table.append(table2) -# ------------------------------------------ read headers ------------------------------------------ - - table.head_read() - for addTable in tables: addTable.head_read() - -# ------------------------------------------ assemble header -------------------------------------- - - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - - table.head_write() - -# ------------------------------------------ process data ------------------------------------------ - - table.data_readArray() - data = table.data - for addTable in tables: - addTable.data_readArray(table.labels(raw = True)) - data = np.vstack((data,addTable.data)) - table.data = data - table.data_writeArray() - -# ------------------------------------------ output finalization ----------------------------------- - - table.close() # close ASCII tables - for addTable in tables: - addTable.close() + table.to_ASCII(sys.stdout if name is None else name) From 149e4d6d73cdd2ffc08795c0881cde7698f88eef Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 05:51:41 +0100 Subject: [PATCH 06/75] not needed --- processing/post/addStrainTensors.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 2aa206952..c4d0779e2 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -143,9 +143,6 @@ for name in filenames: for theStretch in stretches: stretch[theStretch] = np.where(abs(stretch[theStretch]) < 1e-12, 0, stretch[theStretch]) # kill nasty noisy data (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) - neg = np.where(D < 0.0) # find negative eigenvalues ... - D[neg] *= -1. # ... flip value ... - V[:,neg] *= -1. # ... and vector for theStrain in strains: d = operator(theStretch,theStrain,D) # operate on eigenvalues of U or V eps = np.dot(V,np.dot(np.diag(d),V.T)).reshape(9) # build tensor back from eigenvalue/vector basis From 3ed9126845d42e4fd186df885df777f5739b14f4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 05:52:14 +0100 Subject: [PATCH 07/75] also not needed --- processing/post/addStrainTensors.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index c4d0779e2..881b53fec 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -19,8 +19,8 @@ def operator(stretch,strain,eigenvalues): 'U#ln': np.log(eigenvalues) , 'V#Biot': ( np.ones(3,'d') - 1.0/eigenvalues ) , 'U#Biot': ( eigenvalues - np.ones(3,'d') ) , - 'V#Green': ( np.ones(3,'d') - 1.0/eigenvalues/eigenvalues) *0.5, - 'U#Green': ( eigenvalues*eigenvalues - np.ones(3,'d')) *0.5, + 'V#Green': ( np.ones(3,'d') - 1.0/eigenvalues**2.0) *0.5, + 'U#Green': ( eigenvalues**2.0 - np.ones(3,'d')) *0.5, }[stretch+'#'+strain] @@ -141,7 +141,6 @@ for name in filenames: stretch['V'] = np.dot(F,R_inv) # F = VR for theStretch in stretches: - stretch[theStretch] = np.where(abs(stretch[theStretch]) < 1e-12, 0, stretch[theStretch]) # kill nasty noisy data (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) for theStrain in strains: d = operator(theStretch,theStrain,D) # operate on eigenvalues of U or V From 3c4c364107c29dbf88e80e8deecbea2001d4b453 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 06:48:42 +0100 Subject: [PATCH 08/75] bugfix: wrong results when calculating multiple strain tensors. Introduced in cd6a4d1cfd655581fbb022f0d52a868bf2144db8 --- processing/post/addStrainTensors.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 881b53fec..8516d9be8 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -15,12 +15,12 @@ scriptID = ' '.join([scriptName,damask.version]) def operator(stretch,strain,eigenvalues): """Albrecht Bertram: Elasticity and Plasticity of Large Deformations An Introduction (3rd Edition, 2012), p. 102.""" return { - 'V#ln': np.log(eigenvalues) , - 'U#ln': np.log(eigenvalues) , - 'V#Biot': ( np.ones(3,'d') - 1.0/eigenvalues ) , - 'U#Biot': ( eigenvalues - np.ones(3,'d') ) , - 'V#Green': ( np.ones(3,'d') - 1.0/eigenvalues**2.0) *0.5, - 'U#Green': ( eigenvalues**2.0 - np.ones(3,'d')) *0.5, + 'V#ln': np.log(eigenvalues) , + 'U#ln': np.log(eigenvalues) , + 'V#Biot': ( np.ones(3,'d') - eigenvalues**-1.0) , + 'U#Biot': ( eigenvalues**1.0 - np.ones(3,'d')) , + 'V#Green': ( np.ones(3,'d') - eigenvalues**-2.0)*0.5, + 'U#Green': ( eigenvalues**2.0 - np.ones(3,'d')) *0.5, }[stretch+'#'+strain] @@ -142,7 +142,7 @@ for name in filenames: for theStretch in stretches: (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) - for theStrain in strains: + for theStrain in strains: d = operator(theStretch,theStrain,D) # operate on eigenvalues of U or V eps = np.dot(V,np.dot(np.diag(d),V.T)).reshape(9) # build tensor back from eigenvalue/vector basis From 60580cc45adb20dbf1284a3229213ba790ae5bac Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 07:16:50 +0100 Subject: [PATCH 09/75] mixed up left/right stretch tensor --- python/damask/mechanics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/mechanics.py b/python/damask/mechanics.py index 5503d7048..08f5ca125 100644 --- a/python/damask/mechanics.py +++ b/python/damask/mechanics.py @@ -58,10 +58,10 @@ def strain_tensor(F,t,m): """ F_ = F.reshape((1,3,3)) if F.shape == (3,3) else F - if t == 'U': + if t == 'V': B = np.matmul(F_,transpose(F_)) w,n = np.linalg.eigh(B) - elif t == 'V': + elif t == 'U': C = np.matmul(transpose(F_),F_) w,n = np.linalg.eigh(C) From 93bc66d19fbe68adff3c61bcf3455f55fc068b51 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 09:33:14 +0100 Subject: [PATCH 10/75] same order as in mechanics --- processing/post/addStrainTensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 8516d9be8..f35c965ba 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -137,8 +137,8 @@ for name in filenames: F = np.array(list(map(float,table.data[column:column+items['tensor']['dim']])),'d').reshape(items['tensor']['shape']) (U,S,Vh) = np.linalg.svd(F) # singular value decomposition R_inv = np.dot(U,Vh).T # rotation of polar decomposition - stretch['U'] = np.dot(R_inv,F) # F = RU stretch['V'] = np.dot(F,R_inv) # F = VR + stretch['U'] = np.dot(R_inv,F) # F = RU for theStretch in stretches: (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) From d26005960c2adf04f45c9b2f57d01b2cf9e5839e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 09:52:42 +0100 Subject: [PATCH 11/75] do not rely on singular value decomposition --- processing/post/addStrainTensors.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index f35c965ba..7799dcd88 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -15,12 +15,12 @@ scriptID = ' '.join([scriptName,damask.version]) def operator(stretch,strain,eigenvalues): """Albrecht Bertram: Elasticity and Plasticity of Large Deformations An Introduction (3rd Edition, 2012), p. 102.""" return { - 'V#ln': np.log(eigenvalues) , - 'U#ln': np.log(eigenvalues) , - 'V#Biot': ( np.ones(3,'d') - eigenvalues**-1.0) , - 'U#Biot': ( eigenvalues**1.0 - np.ones(3,'d')) , - 'V#Green': ( np.ones(3,'d') - eigenvalues**-2.0)*0.5, - 'U#Green': ( eigenvalues**2.0 - np.ones(3,'d')) *0.5, + 'V#ln': np.log(eigenvalues)*.5 , + 'U#ln': np.log(eigenvalues)*.5 , + 'V#Biot': ( np.ones(3,'d') - eigenvalues**-0.5) , + 'U#Biot': ( eigenvalues**0.5 - np.ones(3,'d')) , + 'V#Green': ( np.ones(3,'d') - eigenvalues**-1.0)*0.5, + 'U#Green': ( eigenvalues**1.0 - np.ones(3,'d')) *0.5, }[stretch+'#'+strain] @@ -135,10 +135,8 @@ for name in filenames: while outputAlive and table.data_read(): # read next data line of ASCII table for column in items['tensor']['column']: # loop over all requested defgrads F = np.array(list(map(float,table.data[column:column+items['tensor']['dim']])),'d').reshape(items['tensor']['shape']) - (U,S,Vh) = np.linalg.svd(F) # singular value decomposition - R_inv = np.dot(U,Vh).T # rotation of polar decomposition - stretch['V'] = np.dot(F,R_inv) # F = VR - stretch['U'] = np.dot(R_inv,F) # F = RU + stretch['V'] = np.dot(F,F.T) # F = VR + stretch['U'] = np.dot(F.T,F) # F = RU for theStretch in stretches: (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) From 27d6b91f188c38206050e2016be1206422340b1f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 10:19:38 +0100 Subject: [PATCH 12/75] using central funtionality --- PRIVATE | 2 +- processing/post/addStrainTensors.py | 100 ++++++---------------------- 2 files changed, 23 insertions(+), 79 deletions(-) diff --git a/PRIVATE b/PRIVATE index e6d5dfb2f..cda69f9a5 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit e6d5dfb2fa8544de93378d60aaf8423409cfd387 +Subproject commit cda69f9a59fe64223439a2c725e1a78cf22b28aa diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 7799dcd88..756761e46 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -12,15 +12,15 @@ import damask scriptName = os.path.splitext(os.path.basename(__file__))[0] scriptID = ' '.join([scriptName,damask.version]) -def operator(stretch,strain,eigenvalues): +def parameters(stretch,strain): """Albrecht Bertram: Elasticity and Plasticity of Large Deformations An Introduction (3rd Edition, 2012), p. 102.""" return { - 'V#ln': np.log(eigenvalues)*.5 , - 'U#ln': np.log(eigenvalues)*.5 , - 'V#Biot': ( np.ones(3,'d') - eigenvalues**-0.5) , - 'U#Biot': ( eigenvalues**0.5 - np.ones(3,'d')) , - 'V#Green': ( np.ones(3,'d') - eigenvalues**-1.0)*0.5, - 'U#Green': ( eigenvalues**1.0 - np.ones(3,'d')) *0.5, + 'V#ln': ('V',0.0), + 'U#ln': ('U',0.0), + 'V#Biot': ('V',-.5), + 'U#Biot': ('U',+.5), + 'V#Green': ('V',-1.), + 'U#Green': ('U',+1.), }[stretch+'#'+strain] @@ -64,9 +64,10 @@ parser.set_defaults( ) (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] if len(options.defgrad) > 1: - options.defgrad = options.defgrad[1:] + options.defgrad = options.defgrad[1:] stretches = [] strains = [] @@ -78,78 +79,21 @@ if options.biot: strains.append('Biot') if options.green: strains.append('Green') if options.defgrad is None: - parser.error('no data column specified.') - -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] + parser.error('no data column specified.') for name in filenames: - try: - table = damask.ASCIItable(name = name, - buffered = False) - except IOError: continue - damask.util.report(scriptName,name) + damask.util.report(scriptName,name) + + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) -# ------------------------------------------ read header ------------------------------------------ - - table.head_read() - -# ------------------------------------------ sanity checks ---------------------------------------- - - items = { - 'tensor': {'dim': 9, 'shape': [3,3], 'labels':options.defgrad, 'column': []}, - } - errors = [] - remarks = [] - - for type, data in items.items(): - for what in data['labels']: - dim = table.label_dimension(what) - if dim != data['dim']: remarks.append('column {} is not a {}...'.format(what,type)) - else: - items[type]['column'].append(table.label_index(what)) + for defgrad in options.defgrad: + F = table.get(defgrad).reshape((-1,3,3)) for theStretch in stretches: - for theStrain in strains: - table.labels_append(['{}_{}({}){}'.format(i+1, # extend ASCII header with new labels - theStrain, - theStretch, - what if what != 'f' else '') for i in range(9)]) + for theStrain in strains: + (t,m) = parameters(theStretch,theStrain) + label = '{}({}){}'.format(theStrain,theStretch,defgrad if defgrad != 'f' else '') + table.add(label, + damask.mechanics.strain_tensor(F,t,m).reshape((-1,9)), + scriptID+' '+' '.join(sys.argv[1:])) - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# ------------------------------------------ assemble header -------------------------------------- - - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - table.head_write() - -# ------------------------------------------ process data ------------------------------------------ - - stretch = {} - outputAlive = True - - while outputAlive and table.data_read(): # read next data line of ASCII table - for column in items['tensor']['column']: # loop over all requested defgrads - F = np.array(list(map(float,table.data[column:column+items['tensor']['dim']])),'d').reshape(items['tensor']['shape']) - stretch['V'] = np.dot(F,F.T) # F = VR - stretch['U'] = np.dot(F.T,F) # F = RU - - for theStretch in stretches: - (D,V) = np.linalg.eigh((stretch[theStretch]+stretch[theStretch].T)*0.5) # eigen decomposition (of symmetric(ed) matrix) - for theStrain in strains: - d = operator(theStretch,theStrain,D) # operate on eigenvalues of U or V - eps = np.dot(V,np.dot(np.diag(d),V.T)).reshape(9) # build tensor back from eigenvalue/vector basis - - table.data_append(list(eps)) - -# ------------------------------------------ output result ----------------------------------------- - - outputAlive = table.data_write() # output processed line - -# ------------------------------------------ output finalization ----------------------------------- - - table.close() # close ASCII tables + table.to_ASCII(sys.stdout if name is None else name) From aec9c601d6aa17d8baa7a09796e8d312aba7b8a7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 11:25:07 +0100 Subject: [PATCH 13/75] some insights from continuum mechanics formulated as test --- python/damask/mechanics.py | 18 ++++++++---- python/tests/test_mechanics.py | 54 +++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/python/damask/mechanics.py b/python/damask/mechanics.py index 08f5ca125..307f1d83d 100644 --- a/python/damask/mechanics.py +++ b/python/damask/mechanics.py @@ -92,21 +92,27 @@ def deviatoric_part(x): x - np.einsum('ijk,i->ijk',np.broadcast_to(np.eye(3),[x.shape[0],3,3]),spherical_part(x)) -def spherical_part(x): +def spherical_part(x,tensor=False): """ Return spherical (hydrostatic) part of a tensor. - A single scalar is returned, i.e. the hydrostatic part is not mapped on the 3rd order identity - matrix. - Parameters ---------- x : numpy.array of shape (:,3,3) or (3,3) Tensor of which the hydrostatic part is computed. + tensor : bool, optional + Map spherical part onto identity tensor. Default is false """ - return np.trace(x)/3.0 if np.shape(x) == (3,3) else \ - np.trace(x,axis1=1,axis2=2)/3.0 + if x.shape == (3,3): + sph = np.trace(x)/3.0 + return sph if not tensor else np.eye(3)*sph + else: + sph = np.trace(x,axis1=1,axis2=2)/3.0 + if not tensor: + return sph + else: + return np.einsum('ijk,i->ijk',np.broadcast_to(np.eye(3),(x.shape[0],3,3)),sph) def Mises_stress(sigma): diff --git a/python/tests/test_mechanics.py b/python/tests/test_mechanics.py index aab92bef3..1ea1f2bba 100644 --- a/python/tests/test_mechanics.py +++ b/python/tests/test_mechanics.py @@ -30,8 +30,8 @@ class TestMechanics: def test_vectorize_spherical_part(self): x = np.random.random((self.n,3,3)) - assert np.allclose(mechanics.spherical_part(x)[self.c], - mechanics.spherical_part(x[self.c])) + assert np.allclose(mechanics.spherical_part(x,True)[self.c], + mechanics.spherical_part(x[self.c],True)) def test_vectorize_Mises_stress(self): @@ -94,6 +94,15 @@ class TestMechanics: assert np.allclose(mechanics.Cauchy(np.broadcast_to(np.eye(3),(self.n,3,3)),P), mechanics.symmetric(P)) + def test_polar_decomposition(self): + """F = RU = VR.""" + F = np.broadcast_to(np.eye(3),[self.n,3,3])*np.random.random((self.n,3,3)) + R = mechanics.rotational_part(F) + V = mechanics.left_stretch(F) + U = mechanics.right_stretch(F) + assert np.allclose(np.matmul(R,U), + np.matmul(V,R)) + def test_strain_tensor_no_rotation(self): """Ensure that left and right stretch give same results for no rotation.""" @@ -102,6 +111,12 @@ class TestMechanics: assert np.allclose(mechanics.strain_tensor(F,'U',m), mechanics.strain_tensor(F,'V',m)) + def test_strain_tensor_rotation_equivalence(self): + """Ensure that left and right strain differ only by a rotation.""" + F = np.random.random((self.n,3,3)) + m = np.random.random()*5.0-2.5 + assert np.allclose(np.linalg.det(mechanics.strain_tensor(F,'U',m)), + np.linalg.det(mechanics.strain_tensor(F,'V',m))) def test_strain_tensor_rotation(self): """Ensure that pure rotation results in no strain.""" @@ -111,15 +126,46 @@ class TestMechanics: assert np.allclose(mechanics.strain_tensor(F,t,m), 0.0) + def test_rotation_determinant(self): + """ + Ensure that the determinant of the rotational part is +- 1. + + Should be +1, but random F might contain a reflection. + """ + x = np.random.random((self.n,3,3)) + assert np.allclose(np.abs(np.linalg.det(mechanics.rotational_part(x))), + 1.0) + def test_spherical_deviatoric_part(self): """Ensure that full tensor is sum of spherical and deviatoric part.""" x = np.random.random((self.n,3,3)) - sph = np.broadcast_to(np.eye(3),(self.n,3,3))\ - * np.repeat(mechanics.spherical_part(x),9).reshape(self.n,3,3) + sph = mechanics.spherical_part(x,True) assert np.allclose(sph + mechanics.deviatoric_part(x), x) + def test_deviatoric_Mises(self): + """Ensure that Mises equivalent stress depends only on deviatoric part.""" + x = np.random.random((self.n,3,3)) + full = mechanics.Mises_stress(x) + dev = mechanics.Mises_stress(mechanics.deviatoric_part(x)) + assert np.allclose(full, + dev) + + def test_spherical_mapping(self): + """Ensure that mapping to tensor is correct.""" + x = np.random.random((self.n,3,3)) + tensor = mechanics.spherical_part(x,True) + scalar = mechanics.spherical_part(x) + assert np.allclose(np.linalg.det(tensor), + scalar**3.0) + + def test_spherical_Mises(self): + """Ensure that Mises equivalent strrain of spherical strain is 0.""" + x = np.random.random((self.n,3,3)) + sph = mechanics.spherical_part(x,True) + assert np.allclose(mechanics.Mises_strain(sph), + 0.0) def test_symmetric(self): """Ensure that a symmetric tensor is half of the sum of a tensor and its transpose.""" From 264afe00f9f2f23370aad41c63ce5704c5c9a9ac Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 23 Dec 2019 17:52:35 +0100 Subject: [PATCH 14/75] using central functionality --- processing/post/averageDown.py | 18 ++++------------- processing/post/blowUp.py | 36 ++++++++++------------------------ 2 files changed, 14 insertions(+), 40 deletions(-) diff --git a/processing/post/averageDown.py b/processing/post/averageDown.py index d4e2a3529..c7586ed94 100755 --- a/processing/post/averageDown.py +++ b/processing/post/averageDown.py @@ -122,20 +122,10 @@ for name in filenames: #--- generate grid -------------------------------------------------------------------------------- - x = (0.5 + shift[0] + np.arange(packedGrid[0],dtype=float))/packedGrid[0]*size[0] - y = (0.5 + shift[1] + np.arange(packedGrid[1],dtype=float))/packedGrid[1]*size[1] - z = (0.5 + shift[2] + np.arange(packedGrid[2],dtype=float))/packedGrid[2]*size[2] + coords = damask.grid_filters.cell_coord0(packedGrid,size,shift/packedGrid*size+origin) + table.data[:,table.label_indexrange(options.pos)] = coords.reshape((-1,3)) - xx = np.tile( x, packedGrid[1]* packedGrid[2]) - yy = np.tile(np.repeat(y,packedGrid[0] ),packedGrid[2]) - zz = np.repeat(z,packedGrid[0]*packedGrid[1]) - table.data[:,table.label_indexrange(options.pos)] = np.squeeze(np.dstack((xx,yy,zz))) - -# ------------------------------------------ output result ----------------------------------------- - - table.data_writeArray() - # ------------------------------------------ output finalization ----------------------------------- - - table.close() # close ASCII tables + table.data_writeArray() + table.close() diff --git a/processing/post/blowUp.py b/processing/post/blowUp.py index 32cc1909d..47abc187a 100755 --- a/processing/post/blowUp.py +++ b/processing/post/blowUp.py @@ -4,6 +4,7 @@ import os import sys from optparse import OptionParser +from scipy import ndimage import numpy as np import damask @@ -94,30 +95,13 @@ for name in filenames: table.head_write() # ------------------------------------------ process data ------------------------------------------- + table.data_readArray() + data = table.data.reshape(tuple(grid)+(-1,)) + table.data = ndimage.interpolation.zoom(data,tuple(packing)+(1,),order=0,mode='nearest').reshape((outSize.prod(),-1)) + coords = damask.grid_filters.cell_coord0(outSize,size,origin) + table.data[:,table.label_indexrange(options.pos)] = coords.reshape((-1,3)) + table.data[:,table.label_index('elem')] = np.arange(1,outSize.prod()+1) - data = np.zeros(outSize.tolist()+[len(table.labels(raw = True))]) - p = np.zeros(3,'i') - - for p[2] in range(grid[2]): - for p[1] in range(grid[1]): - for p[0] in range(grid[0]): - d = p*packing - table.data_read() - data[d[0]:d[0]+packing[0], - d[1]:d[1]+packing[1], - d[2]:d[2]+packing[2], - : ] = np.tile(np.array(table.data_asFloat(),'d'),packing.tolist()+[1]) # tile to match blowUp voxel size - elementSize = size/grid/packing - elem = 1 - for c in range(outSize[2]): - for b in range(outSize[1]): - for a in range(outSize[0]): - data[a,b,c,table.label_indexrange(options.pos)] = [a+0.5,b+0.5,c+0.5]*elementSize - if colElem != -1: data[a,b,c,colElem] = elem - table.data = data[a,b,c,:].tolist() - outputAlive = table.data_write() # output processed line - elem += 1 - -# ------------------------------------------ output finalization ----------------------------------- - - table.close() # close input ASCII table (works for stdin) +# ------------------------------------------ output finalization ----------------------------------- + table.data_writeArray() + table.close() From 9e949556265a80d8c3d041ff85d0d7e0eea0d7b6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 24 Dec 2019 15:58:37 +0100 Subject: [PATCH 15/75] wrong coordinates for non-cubical grids --- processing/pre/geom_toTable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/pre/geom_toTable.py b/processing/pre/geom_toTable.py index 3d955ad53..53196e808 100755 --- a/processing/pre/geom_toTable.py +++ b/processing/pre/geom_toTable.py @@ -30,7 +30,7 @@ for name in filenames: geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name) damask.util.croak(geom) - coord0 = damask.grid_filters.cell_coord0(geom.grid,geom.size,geom.origin).reshape((-1,3),order='F') + coord0 = damask.grid_filters.cell_coord0(geom.grid,geom.size,geom.origin).reshape((-1,3)) comments = geom.comments \ + [scriptID + ' ' + ' '.join(sys.argv[1:]), From f5c58517a7d43d573130c9ffd2e3a913c6ad4ab2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 24 Dec 2019 15:59:09 +0100 Subject: [PATCH 16/75] enable one grid point along all directions --- python/damask/grid_filters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/damask/grid_filters.py b/python/damask/grid_filters.py index 93e61f5d8..9c8b1b88e 100644 --- a/python/damask/grid_filters.py +++ b/python/damask/grid_filters.py @@ -200,6 +200,10 @@ def cell_coord0_2_DNA(coord0,ordered=True): size = grid/np.maximum(grid-1,1) * (maxcorner-mincorner) delta = size/grid origin = mincorner - delta*.5 + + # 1D/2D: size/origin combination undefined, set origin to 0.0 + size [np.where(grid==1)] = origin[np.where(grid==1)]*2. + origin[np.where(grid==1)] = 0.0 if grid.prod() != len(coord0): raise ValueError('Data count {} does not match grid {}.'.format(len(coord0),grid)) From be319c5a83bcffc1184466ef683838181fec298b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 25 Dec 2019 09:24:42 +0100 Subject: [PATCH 17/75] single source of truth --- src/lattice.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 025a1f8a5..4aab12fc9 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -371,7 +371,7 @@ module lattice 1,-1, 1, -2,-1, 1, & -1, 1, 1, -1,-2, 1, & 1, 1, 1, 1,-2, 1 & - ],pReal),[ 3 + 3,LATTICE_BCT_NSLIP]) !< slip systems for bct sorted by Bieler + ],pReal),shape(LATTICE_BCT_SYSTEMSLIP)) !< slip systems for bct sorted by Bieler !-------------------------------------------------------------------------------------------------- ! isotropic @@ -387,7 +387,7 @@ module lattice 0, 1, 0, 1, 0, 0, & 0, 0, 1, 0, 1, 0, & 1, 0, 0, 0, 0, 1 & - ],pReal),[ 3 + 3,LATTICE_ISO_NCLEAVAGE]) + ],pReal),shape(LATTICE_ISO_SYSTEMCLEAVAGE)) !-------------------------------------------------------------------------------------------------- @@ -404,7 +404,7 @@ module lattice 0, 1, 0, 1, 0, 0, & 0, 0, 1, 0, 1, 0, & 1, 0, 0, 0, 0, 1 & - ],pReal),[ 3 + 3,LATTICE_ORT_NCLEAVAGE]) + ],pReal),shape(LATTICE_ORT_SYSTEMCLEAVAGE)) From 05b2c80430cbf0a20b72275d29344bf672970484 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 26 Dec 2019 14:34:22 +0100 Subject: [PATCH 18/75] migrating ASCIItable to Table class --- processing/post/averageDown.py | 54 ++++++------------------------- processing/post/blowUp.py | 58 +++++++--------------------------- 2 files changed, 21 insertions(+), 91 deletions(-) diff --git a/processing/post/averageDown.py b/processing/post/averageDown.py index c7586ed94..817000dfa 100755 --- a/processing/post/averageDown.py +++ b/processing/post/averageDown.py @@ -49,6 +49,7 @@ parser.set_defaults(pos = 'pos', ) (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] packing = np.array(options.packing,dtype = int) shift = np.array(options.shift, dtype = int) @@ -56,47 +57,14 @@ shift = np.array(options.shift, dtype = int) prefix = 'averagedDown{}x{}x{}_'.format(*packing) if any(shift != 0): prefix += 'shift{:+}{:+}{:+}_'.format(*shift) -# --- loop over input files ------------------------------------------------------------------------ - -if filenames == []: filenames = [None] for name in filenames: - try: table = damask.ASCIItable(name = name, - outname = os.path.join(os.path.dirname(name), - prefix+os.path.basename(name)) if name else name, - buffered = False) - except IOError: - continue damask.util.report(scriptName,name) - -# ------------------------------------------ read header ------------------------------------------ - - table.head_read() - -# ------------------------------------------ sanity checks ---------------------------------------- - - errors = [] - remarks = [] - if table.label_dimension(options.pos) != 3: errors.append('coordinates {} are not a vector.'.format(options.pos)) - - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# ------------------------------------------ assemble header --------------------------------------- - - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - table.head_write() - -# --------------- figure out size and grid --------------------------------------------------------- - - table.data_readArray() + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) if (options.grid is None or options.size is None): - grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.data[:,table.label_indexrange(options.pos)]) + grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) else: grid = np.array(options.grid,'i') size = np.array(options.size,'d') @@ -105,27 +73,25 @@ for name in filenames: shift = np.where(grid == 1,0,shift) # reset shift to 0 where grid==1 packedGrid = np.maximum(np.ones(3,'i'),grid//packing) + data = table.data.values.reshape(tuple(grid)+(-1,),order = 'F') averagedDown = scipy.ndimage.filters.uniform_filter( \ np.roll( np.roll( - np.roll(table.data.reshape(list(grid)+[table.data.shape[1]],order = 'F'), + np.roll(data, -shift[0],axis = 0), -shift[1],axis = 1), -shift[2],axis = 2), size = list(packing) + [1], mode = 'wrap', origin = list(-(packing//2)) + [0])\ - [::packing[0],::packing[1],::packing[2],:].reshape((packedGrid.prod(),table.data.shape[1]),order = 'F') + [::packing[0],::packing[1],::packing[2],:].reshape((packedGrid.prod(),-1),order = 'F') - table.data = averagedDown - -#--- generate grid -------------------------------------------------------------------------------- + table = damask.Table(averagedDown,table.shapes,table.comments) coords = damask.grid_filters.cell_coord0(packedGrid,size,shift/packedGrid*size+origin) - table.data[:,table.label_indexrange(options.pos)] = coords.reshape((-1,3)) + table.set(options.pos, coords.reshape((-1,3))) -# ------------------------------------------ output finalization ----------------------------------- - table.data_writeArray() - table.close() + outname = os.path.join(os.path.dirname(name),prefix+os.path.basename(name)) + table.to_ASCII(sys.stdout if name is None else outname) diff --git a/processing/post/blowUp.py b/processing/post/blowUp.py index 47abc187a..ec42e2365 100755 --- a/processing/post/blowUp.py +++ b/processing/post/blowUp.py @@ -43,65 +43,29 @@ parser.set_defaults(pos = 'pos', ) (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] options.packing = np.array(options.packing) prefix = 'blowUp{}x{}x{}_'.format(*options.packing) -# --- loop over input files ------------------------------------------------------------------------- - -if filenames == []: filenames = [None] for name in filenames: - try: table = damask.ASCIItable(name = name, - outname = os.path.join(os.path.dirname(name), - prefix+os.path.basename(name)) if name else name, - buffered = False) - except IOError: - continue damask.util.report(scriptName,name) - -# ------------------------------------------ read header ------------------------------------------ - - table.head_read() - -# ------------------------------------------ sanity checks ---------------------------------------- - errors = [] - remarks = [] - - if table.label_dimension(options.pos) != 3: errors.append('coordinates "{}" are not a vector.'.format(options.pos)) - - colElem = table.label_index('elem') - - if remarks != []: damask.util.croak(remarks) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - -# --------------- figure out size and grid --------------------------------------------------------- - - table.data_readArray(options.pos) - table.data_rewind() - - grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.data) + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) + grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) packing = np.array(options.packing,'i') outSize = grid*packing -# ------------------------------------------ assemble header -------------------------------------- + data = table.data.values.reshape(tuple(grid)+(-1,)) + blownUp = ndimage.interpolation.zoom(data,tuple(packing)+(1,),order=0,mode='nearest').reshape((outSize.prod(),-1)) - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - table.head_write() + table = damask.Table(blownUp,table.shapes,table.comments) -# ------------------------------------------ process data ------------------------------------------- - table.data_readArray() - data = table.data.reshape(tuple(grid)+(-1,)) - table.data = ndimage.interpolation.zoom(data,tuple(packing)+(1,),order=0,mode='nearest').reshape((outSize.prod(),-1)) coords = damask.grid_filters.cell_coord0(outSize,size,origin) - table.data[:,table.label_indexrange(options.pos)] = coords.reshape((-1,3)) - table.data[:,table.label_index('elem')] = np.arange(1,outSize.prod()+1) - -# ------------------------------------------ output finalization ----------------------------------- - table.data_writeArray() - table.close() + table.set(options.pos,coords.reshape((-1,3))) + table.set('elem',np.arange(1,outSize.prod()+1)) + + outname = os.path.join(os.path.dirname(name),prefix+os.path.basename(name)) + table.to_ASCII(sys.stdout if name is None else outname) From af0a4c5d268bb88f4dbf8816a597c05a63fd31fe Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 26 Dec 2019 15:24:37 +0100 Subject: [PATCH 19/75] unused --- src/IO.f90 | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 8926e1e21..9a0c94661 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -23,7 +23,6 @@ module IO IO_read_ASCII, & IO_open_file, & IO_open_jobFile_binary, & - IO_write_jobFile, & IO_isBlank, & IO_getTag, & IO_stringPos, & @@ -289,25 +288,6 @@ end subroutine IO_open_inputFile #endif -!-------------------------------------------------------------------------------------------------- -!> @brief opens ASCII file to given unit for writing. File is named after solver job name plus -!! given extension and located in current working directory -!-------------------------------------------------------------------------------------------------- -subroutine IO_write_jobFile(fileUnit,ext) - - integer, intent(in) :: fileUnit !< file unit - character(len=*), intent(in) :: ext !< extension of file - - integer :: myStat - character(len=1024) :: path - - path = trim(getSolverJobName())//'.'//ext - open(fileUnit,status='replace',iostat=myStat,file=path) - if (myStat /= 0) call IO_error(100,el=myStat,ext_msg=path) - -end subroutine IO_write_jobFile - - !-------------------------------------------------------------------------------------------------- !> @brief identifies strings without content !-------------------------------------------------------------------------------------------------- From f9fcaca60b6c3640dcf6c50a562736259cce81d4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 26 Dec 2019 15:24:51 +0100 Subject: [PATCH 20/75] aliases are just confusing --- src/mesh_grid.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh_grid.f90 b/src/mesh_grid.f90 index 3d839e1c9..8411ae773 100644 --- a/src/mesh_grid.f90 +++ b/src/mesh_grid.f90 @@ -173,7 +173,7 @@ subroutine readGeom(grid,geomSize,origin,microstructure,homogenization) !-------------------------------------------------------------------------------------------------- ! get header length endPos = index(rawData,new_line('')) - if(endPos <= index(rawData,'head')) then + if(endPos <= index(rawData,'head')) then ! ToDo: Should be 'header' startPos = len(rawData) call IO_error(error_ID=841, ext_msg='readGeom') else From d4d419b713b34e9d31879d8d985c1f805d3ab77a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 30 Dec 2019 06:48:55 +0100 Subject: [PATCH 21/75] better readable --- src/mesh_grid.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh_grid.f90 b/src/mesh_grid.f90 index 8411ae773..3ce633dbe 100644 --- a/src/mesh_grid.f90 +++ b/src/mesh_grid.f90 @@ -277,13 +277,13 @@ subroutine readGeom(grid,geomSize,origin,microstructure,homogenization) compression: if (IO_lc(IO_stringValue(line,chunkPos,2)) == 'of') then c = IO_intValue(line,chunkPos,1) microstructure(e:e+c-1) = [(IO_intValue(line,chunkPos,3),i = 1,IO_intValue(line,chunkPos,1))] - else if (IO_lc(IO_stringValue(line,chunkPos,2)) == 'to') then compression + else if (IO_lc(IO_stringValue(line,chunkPos,2)) == 'to') then compression c = abs(IO_intValue(line,chunkPos,3) - IO_intValue(line,chunkPos,1)) + 1 o = merge(+1, -1, IO_intValue(line,chunkPos,3) > IO_intValue(line,chunkPos,1)) microstructure(e:e+c-1) = [(i, i = IO_intValue(line,chunkPos,1),IO_intValue(line,chunkPos,3),o)] else compression c = chunkPos(1) - microstructure(e:e+c-1) = [(IO_intValue(line,chunkPos,i+1), i=0, c-1)] + microstructure(e:e+c-1) = [(IO_intValue(line,chunkPos,i+1), i=0, c-1)] endif compression endif noCompression From a87e396b83a9b5a438812fb90fa3d87361f1626a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 11:31:33 +0100 Subject: [PATCH 22/75] bugfix: need to addData to vtk not really sure why 'SetScalars' was used for color. 'AddArray' seems to work. Also, there seems to be no difference between 'data' and 'tensor' --- processing/post/vtk_addGridData.py | 13 ++++--------- processing/post/vtk_addPointCloudData.py | 8 +++++--- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/processing/post/vtk_addGridData.py b/processing/post/vtk_addGridData.py index 1596cd7fe..8e76cfca8 100755 --- a/processing/post/vtk_addGridData.py +++ b/processing/post/vtk_addGridData.py @@ -2,8 +2,8 @@ import os import sys +from io import StringIO from optparse import OptionParser -from collections import defaultdict import vtk from vtk.util import numpy_support @@ -120,14 +120,9 @@ for name in filenames: damask.util.croak('{} mode...'.format(mode)) - for datatype,labels in active.items(): # loop over scalar,color - if datatype == 'color': - if mode == 'cell': rGrid.GetCellData().SetScalars(VTKarray[active['color'][0]]) - elif mode == 'point': rGrid.GetPointData().SetScalars(VTKarray[active['color'][0]]) - for me in labels: # loop over all requested items - if mode == 'cell': rGrid.GetCellData().AddArray(VTKarray[me]) - elif mode == 'point': rGrid.GetPointData().AddArray(VTKarray[me]) - + for data in VTKarray: + if mode == 'cell': rGrid.GetCellData().AddArray(VTKarray[data]) + elif mode == 'point': rGrid.GetPointData().AddArray(VTKarray[data]) rGrid.Modified() # ------------------------------------------ output result --------------------------------------- diff --git a/processing/post/vtk_addPointCloudData.py b/processing/post/vtk_addPointCloudData.py index 5a40d967a..833bfc88e 100755 --- a/processing/post/vtk_addPointCloudData.py +++ b/processing/post/vtk_addPointCloudData.py @@ -2,8 +2,8 @@ import os import sys +from io import StringIO from optparse import OptionParser -from collections import defaultdict import vtk from vtk.util import numpy_support @@ -104,10 +104,12 @@ for name in filenames: VTKarray[tensor].SetName(tensor) -# ------------------------------------------ output result --------------------------------------- - + for data in VTKarray: + Polydata.GetPointData().AddArray(VTKarray[data]) Polydata.Modified() +# ------------------------------------------ output result --------------------------------------- + writer = vtk.vtkXMLPolyDataWriter() writer.SetDataModeToBinary() writer.SetCompressorTypeToZLib() From b9a82ef5236adf8e1de2abd174900f13e7b68e6a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 12:10:32 +0100 Subject: [PATCH 23/75] not needed anymore --- examples/ConfigFiles/Texture_Gauss_001.config | 2 +- examples/ConfigFiles/Texture_Gauss_101.config | 2 +- examples/ConfigFiles/Texture_Gauss_111.config | 2 +- examples/ConfigFiles/Texture_Gauss_123.config | 2 +- examples/FEM/polyXtal/material.config | 299 ++++++----------- examples/MSC.Marc/material.config | 303 ++++++------------ .../EshelbyInclusion/material.config | 4 +- .../Polycrystal/material.config | 60 ++-- 8 files changed, 227 insertions(+), 447 deletions(-) diff --git a/examples/ConfigFiles/Texture_Gauss_001.config b/examples/ConfigFiles/Texture_Gauss_001.config index 4711c4135..4fb519f08 100644 --- a/examples/ConfigFiles/Texture_Gauss_001.config +++ b/examples/ConfigFiles/Texture_Gauss_001.config @@ -1,2 +1,2 @@ [001] -(gauss) phi1 0.000 Phi 0.000 phi2 0.000 scatter 0.000 fraction 1.000 +(gauss) phi1 0.000 Phi 0.000 phi2 0.000 diff --git a/examples/ConfigFiles/Texture_Gauss_101.config b/examples/ConfigFiles/Texture_Gauss_101.config index 79457aeac..c6c1b5dbe 100644 --- a/examples/ConfigFiles/Texture_Gauss_101.config +++ b/examples/ConfigFiles/Texture_Gauss_101.config @@ -1,2 +1,2 @@ [101] -(gauss) phi1 0.000 Phi 45.000 phi2 90.000 scatter 0.000 fraction 1.000 +(gauss) phi1 0.000 Phi 45.000 phi2 90.000 diff --git a/examples/ConfigFiles/Texture_Gauss_111.config b/examples/ConfigFiles/Texture_Gauss_111.config index 8204bfb69..0d685a66e 100644 --- a/examples/ConfigFiles/Texture_Gauss_111.config +++ b/examples/ConfigFiles/Texture_Gauss_111.config @@ -1,2 +1,2 @@ [111] -(gauss) phi1 0.000 Phi 54.7356 phi2 45.000 scatter 0.000 fraction 1.000 +(gauss) phi1 0.000 Phi 54.7356 phi2 45.000 diff --git a/examples/ConfigFiles/Texture_Gauss_123.config b/examples/ConfigFiles/Texture_Gauss_123.config index 32d28442f..da4fa30ab 100644 --- a/examples/ConfigFiles/Texture_Gauss_123.config +++ b/examples/ConfigFiles/Texture_Gauss_123.config @@ -1,2 +1,2 @@ [123] -(gauss) phi1 209.805 Phi 29.206 phi2 63.435 scatter 0.000 fraction 1.000 +(gauss) phi1 209.805 Phi 29.206 phi2 63.435 diff --git a/examples/FEM/polyXtal/material.config b/examples/FEM/polyXtal/material.config index 51cf8c163..197890821 100644 --- a/examples/FEM/polyXtal/material.config +++ b/examples/FEM/polyXtal/material.config @@ -459,301 +459,202 @@ crystallite 1 #-------------------# [Grain001] -(gauss) phi1 172.344 Phi 114.046 phi2 294.669 scatter 0.0 fraction 1.0 - +(gauss) phi1 172.344 Phi 114.046 phi2 294.669 [Grain002] -(gauss) phi1 186.013 Phi 94.7338 phi2 329.683 scatter 0.0 fraction 1.0 - +(gauss) phi1 186.013 Phi 94.7338 phi2 329.683 [Grain003] -(gauss) phi1 162.41 Phi 98.9455 phi2 130.322 scatter 0.0 fraction 1.0 - +(gauss) phi1 162.41 Phi 98.9455 phi2 130.322 [Grain004] -(gauss) phi1 355.272 Phi 140.621 phi2 125.567 scatter 0.0 fraction 1.0 - +(gauss) phi1 355.272 Phi 140.621 phi2 125.567 [Grain005] -(gauss) phi1 21.7641 Phi 143.388 phi2 240.373 scatter 0.0 fraction 1.0 - +(gauss) phi1 21.7641 Phi 143.388 phi2 240.373 [Grain006] -(gauss) phi1 88.1966 Phi 92.3358 phi2 194.78 scatter 0.0 fraction 1.0 - +(gauss) phi1 88.1966 Phi 92.3358 phi2 194.78 [Grain007] -(gauss) phi1 161.137 Phi 78.0062 phi2 111.948 scatter 0.0 fraction 1.0 - +(gauss) phi1 161.137 Phi 78.0062 phi2 111.948 [Grain008] -(gauss) phi1 169.792 Phi 89.5333 phi2 159.265 scatter 0.0 fraction 1.0 - +(gauss) phi1 169.792 Phi 89.5333 phi2 159.265 [Grain009] -(gauss) phi1 264.847 Phi 130.291 phi2 180.604 scatter 0.0 fraction 1.0 - +(gauss) phi1 264.847 Phi 130.291 phi2 180.604 [Grain010] -(gauss) phi1 70.6323 Phi 84.1754 phi2 341.162 scatter 0.0 fraction 1.0 - +(gauss) phi1 70.6323 Phi 84.1754 phi2 341.162 [Grain011] -(gauss) phi1 67.7751 Phi 36.1662 phi2 139.898 scatter 0.0 fraction 1.0 - +(gauss) phi1 67.7751 Phi 36.1662 phi2 139.898 [Grain012] -(gauss) phi1 111.621 Phi 19.1089 phi2 228.338 scatter 0.0 fraction 1.0 - +(gauss) phi1 111.621 Phi 19.1089 phi2 228.338 [Grain013] -(gauss) phi1 129.9 Phi 139.011 phi2 238.735 scatter 0.0 fraction 1.0 - +(gauss) phi1 129.9 Phi 139.011 phi2 238.735 [Grain014] -(gauss) phi1 221.405 Phi 129.743 phi2 99.6471 scatter 0.0 fraction 1.0 - +(gauss) phi1 221.405 Phi 129.743 phi2 99.6471 [Grain015] -(gauss) phi1 241.783 Phi 98.3729 phi2 260.615 scatter 0.0 fraction 1.0 - +(gauss) phi1 241.783 Phi 98.3729 phi2 260.615 [Grain016] -(gauss) phi1 72.5592 Phi 122.403 phi2 165.046 scatter 0.0 fraction 1.0 - +(gauss) phi1 72.5592 Phi 122.403 phi2 165.046 [Grain017] -(gauss) phi1 64.8818 Phi 82.6384 phi2 236.305 scatter 0.0 fraction 1.0 - +(gauss) phi1 64.8818 Phi 82.6384 phi2 236.305 [Grain018] -(gauss) phi1 201.096 Phi 65.9312 phi2 330.745 scatter 0.0 fraction 1.0 - +(gauss) phi1 201.096 Phi 65.9312 phi2 330.745 [Grain019] -(gauss) phi1 192.994 Phi 81.9371 phi2 239.326 scatter 0.0 fraction 1.0 - +(gauss) phi1 192.994 Phi 81.9371 phi2 239.326 [Grain020] -(gauss) phi1 125.335 Phi 90.4527 phi2 207.982 scatter 0.0 fraction 1.0 - +(gauss) phi1 125.335 Phi 90.4527 phi2 207.982 [Grain021] -(gauss) phi1 55.8848 Phi 26.4455 phi2 100.921 scatter 0.0 fraction 1.0 - +(gauss) phi1 55.8848 Phi 26.4455 phi2 100.921 [Grain022] -(gauss) phi1 40.722 Phi 95.6415 phi2 269.174 scatter 0.0 fraction 1.0 - +(gauss) phi1 40.722 Phi 95.6415 phi2 269.174 [Grain023] -(gauss) phi1 250.487 Phi 69.6035 phi2 201.732 scatter 0.0 fraction 1.0 - +(gauss) phi1 250.487 Phi 69.6035 phi2 201.732 [Grain024] -(gauss) phi1 204.199 Phi 84.983 phi2 20.3469 scatter 0.0 fraction 1.0 - +(gauss) phi1 204.199 Phi 84.983 phi2 20.3469 [Grain025] -(gauss) phi1 12.7416 Phi 128.589 phi2 271.553 scatter 0.0 fraction 1.0 - +(gauss) phi1 12.7416 Phi 128.589 phi2 271.553 [Grain026] -(gauss) phi1 299.704 Phi 85.3961 phi2 217.359 scatter 0.0 fraction 1.0 - +(gauss) phi1 299.704 Phi 85.3961 phi2 217.359 [Grain027] -(gauss) phi1 48.8232 Phi 83.6209 phi2 200.361 scatter 0.0 fraction 1.0 - +(gauss) phi1 48.8232 Phi 83.6209 phi2 200.361 [Grain028] -(gauss) phi1 336.395 Phi 97.3059 phi2 187.071 scatter 0.0 fraction 1.0 - +(gauss) phi1 336.395 Phi 97.3059 phi2 187.071 [Grain029] -(gauss) phi1 274.354 Phi 78.2424 phi2 320.308 scatter 0.0 fraction 1.0 - +(gauss) phi1 274.354 Phi 78.2424 phi2 320.308 [Grain030] -(gauss) phi1 320.776 Phi 149.72 phi2 163.862 scatter 0.0 fraction 1.0 - +(gauss) phi1 320.776 Phi 149.72 phi2 163.862 [Grain031] -(gauss) phi1 179.549 Phi 106.548 phi2 345.498 scatter 0.0 fraction 1.0 - +(gauss) phi1 179.549 Phi 106.548 phi2 345.498 [Grain032] -(gauss) phi1 163.508 Phi 24.4238 phi2 127.809 scatter 0.0 fraction 1.0 - +(gauss) phi1 163.508 Phi 24.4238 phi2 127.809 [Grain033] -(gauss) phi1 193.405 Phi 157.012 phi2 321.342 scatter 0.0 fraction 1.0 - +(gauss) phi1 193.405 Phi 157.012 phi2 321.342 [Grain034] -(gauss) phi1 9.09886 Phi 95.9453 phi2 102.32 scatter 0.0 fraction 1.0 - +(gauss) phi1 9.09886 Phi 95.9453 phi2 102.32 [Grain035] -(gauss) phi1 353.876 Phi 150.824 phi2 174.886 scatter 0.0 fraction 1.0 - +(gauss) phi1 353.876 Phi 150.824 phi2 174.886 [Grain036] -(gauss) phi1 138.914 Phi 76.5811 phi2 167.927 scatter 0.0 fraction 1.0 - +(gauss) phi1 138.914 Phi 76.5811 phi2 167.927 [Grain037] -(gauss) phi1 262.655 Phi 76.2738 phi2 12.4459 scatter 0.0 fraction 1.0 - +(gauss) phi1 262.655 Phi 76.2738 phi2 12.4459 [Grain038] -(gauss) phi1 121.849 Phi 65.5254 phi2 192.601 scatter 0.0 fraction 1.0 - +(gauss) phi1 121.849 Phi 65.5254 phi2 192.601 [Grain039] -(gauss) phi1 275.824 Phi 81.6788 phi2 164.228 scatter 0.0 fraction 1.0 - +(gauss) phi1 275.824 Phi 81.6788 phi2 164.228 [Grain040] -(gauss) phi1 68.9202 Phi 160.5 phi2 210.862 scatter 0.0 fraction 1.0 - +(gauss) phi1 68.9202 Phi 160.5 phi2 210.862 [Grain041] -(gauss) phi1 51.0398 Phi 82.7291 phi2 74.016 scatter 0.0 fraction 1.0 - +(gauss) phi1 51.0398 Phi 82.7291 phi2 74.016 [Grain042] -(gauss) phi1 338.746 Phi 62.7854 phi2 129.362 scatter 0.0 fraction 1.0 - +(gauss) phi1 338.746 Phi 62.7854 phi2 129.362 [Grain043] -(gauss) phi1 204.51 Phi 151.256 phi2 178.89 scatter 0.0 fraction 1.0 - +(gauss) phi1 204.51 Phi 151.256 phi2 178.89 [Grain044] -(gauss) phi1 122.098 Phi 104.003 phi2 323.04 scatter 0.0 fraction 1.0 - +(gauss) phi1 122.098 Phi 104.003 phi2 323.04 [Grain045] -(gauss) phi1 106.693 Phi 108.61 phi2 336.935 scatter 0.0 fraction 1.0 - +(gauss) phi1 106.693 Phi 108.61 phi2 336.935 [Grain046] -(gauss) phi1 118.856 Phi 160.992 phi2 316.152 scatter 0.0 fraction 1.0 - +(gauss) phi1 118.856 Phi 160.992 phi2 316.152 [Grain047] -(gauss) phi1 177.962 Phi 114.868 phi2 13.6918 scatter 0.0 fraction 1.0 - +(gauss) phi1 177.962 Phi 114.868 phi2 13.6918 [Grain048] -(gauss) phi1 330.273 Phi 174.495 phi2 231.249 scatter 0.0 fraction 1.0 - +(gauss) phi1 330.273 Phi 174.495 phi2 231.249 [Grain049] -(gauss) phi1 7.31937 Phi 94.7313 phi2 17.8461 scatter 0.0 fraction 1.0 - +(gauss) phi1 7.31937 Phi 94.7313 phi2 17.8461 [Grain050] -(gauss) phi1 74.3385 Phi 49.9546 phi2 286.482 scatter 0.0 fraction 1.0 - +(gauss) phi1 74.3385 Phi 49.9546 phi2 286.482 [Grain051] -(gauss) phi1 326.388 Phi 76.9547 phi2 214.758 scatter 0.0 fraction 1.0 - +(gauss) phi1 326.388 Phi 76.9547 phi2 214.758 [Grain052] -(gauss) phi1 276.024 Phi 72.1242 phi2 275.884 scatter 0.0 fraction 1.0 - +(gauss) phi1 276.024 Phi 72.1242 phi2 275.884 [Grain053] -(gauss) phi1 137.681 Phi 116.99 phi2 6.87047 scatter 0.0 fraction 1.0 - +(gauss) phi1 137.681 Phi 116.99 phi2 6.87047 [Grain054] -(gauss) phi1 200.213 Phi 123.618 phi2 268.84 scatter 0.0 fraction 1.0 - +(gauss) phi1 200.213 Phi 123.618 phi2 268.84 [Grain055] -(gauss) phi1 7.13702 Phi 56.2015 phi2 119.65 scatter 0.0 fraction 1.0 - +(gauss) phi1 7.13702 Phi 56.2015 phi2 119.65 [Grain056] -(gauss) phi1 72.1783 Phi 81.0906 phi2 6.06213 scatter 0.0 fraction 1.0 - +(gauss) phi1 72.1783 Phi 81.0906 phi2 6.06213 [Grain057] -(gauss) phi1 184.565 Phi 110.01 phi2 239.546 scatter 0.0 fraction 1.0 - +(gauss) phi1 184.565 Phi 110.01 phi2 239.546 [Grain058] -(gauss) phi1 210.124 Phi 128.631 phi2 8.61611 scatter 0.0 fraction 1.0 - +(gauss) phi1 210.124 Phi 128.631 phi2 8.61611 [Grain059] -(gauss) phi1 290.326 Phi 170.412 phi2 144.269 scatter 0.0 fraction 1.0 - +(gauss) phi1 290.326 Phi 170.412 phi2 144.269 [Grain060] -(gauss) phi1 204.748 Phi 76.7343 phi2 200.385 scatter 0.0 fraction 1.0 - +(gauss) phi1 204.748 Phi 76.7343 phi2 200.385 [Grain061] -(gauss) phi1 54.3015 Phi 65.9143 phi2 117.373 scatter 0.0 fraction 1.0 - +(gauss) phi1 54.3015 Phi 65.9143 phi2 117.373 [Grain062] -(gauss) phi1 261.263 Phi 52.255 phi2 95.9146 scatter 0.0 fraction 1.0 - +(gauss) phi1 261.263 Phi 52.255 phi2 95.9146 [Grain063] -(gauss) phi1 328.054 Phi 51.0778 phi2 24.2782 scatter 0.0 fraction 1.0 - +(gauss) phi1 328.054 Phi 51.0778 phi2 24.2782 [Grain064] -(gauss) phi1 163.03 Phi 154.894 phi2 64.126 scatter 0.0 fraction 1.0 - +(gauss) phi1 163.03 Phi 154.894 phi2 64.126 [Grain065] -(gauss) phi1 183.87 Phi 80.1848 phi2 18.7438 scatter 0.0 fraction 1.0 - +(gauss) phi1 183.87 Phi 80.1848 phi2 18.7438 [Grain066] -(gauss) phi1 219.91 Phi 113.727 phi2 126.67 scatter 0.0 fraction 1.0 - +(gauss) phi1 219.91 Phi 113.727 phi2 126.67 [Grain067] -(gauss) phi1 1.43844 Phi 87.6365 phi2 217.342 scatter 0.0 fraction 1.0 - +(gauss) phi1 1.43844 Phi 87.6365 phi2 217.342 [Grain068] -(gauss) phi1 16.6245 Phi 162.07 phi2 43.7899 scatter 0.0 fraction 1.0 - +(gauss) phi1 16.6245 Phi 162.07 phi2 43.7899 [Grain069] -(gauss) phi1 16.86 Phi 53.8682 phi2 256.917 scatter 0.0 fraction 1.0 - +(gauss) phi1 16.86 Phi 53.8682 phi2 256.917 [Grain070] -(gauss) phi1 1.01921 Phi 118.449 phi2 307.223 scatter 0.0 fraction 1.0 - +(gauss) phi1 1.01921 Phi 118.449 phi2 307.223 [Grain071] -(gauss) phi1 19.0397 Phi 83.8885 phi2 262.687 scatter 0.0 fraction 1.0 - +(gauss) phi1 19.0397 Phi 83.8885 phi2 262.687 [Grain072] -(gauss) phi1 99.799 Phi 77.2307 phi2 84.9727 scatter 0.0 fraction 1.0 - +(gauss) phi1 99.799 Phi 77.2307 phi2 84.9727 [Grain073] -(gauss) phi1 234.292 Phi 63.5029 phi2 250.315 scatter 0.0 fraction 1.0 - +(gauss) phi1 234.292 Phi 63.5029 phi2 250.315 [Grain074] -(gauss) phi1 315.529 Phi 106.015 phi2 103.711 scatter 0.0 fraction 1.0 - +(gauss) phi1 315.529 Phi 106.015 phi2 103.711 [Grain075] -(gauss) phi1 235.595 Phi 110.152 phi2 210.277 scatter 0.0 fraction 1.0 - +(gauss) phi1 235.595 Phi 110.152 phi2 210.277 [Grain076] -(gauss) phi1 341.907 Phi 17.1839 phi2 332.75 scatter 0.0 fraction 1.0 - +(gauss) phi1 341.907 Phi 17.1839 phi2 332.75 [Grain077] -(gauss) phi1 352.166 Phi 88.6049 phi2 114.964 scatter 0.0 fraction 1.0 - +(gauss) phi1 352.166 Phi 88.6049 phi2 114.964 [Grain078] -(gauss) phi1 342.33 Phi 117.777 phi2 180.346 scatter 0.0 fraction 1.0 - +(gauss) phi1 342.33 Phi 117.777 phi2 180.346 [Grain079] -(gauss) phi1 224.952 Phi 70.5702 phi2 148.486 scatter 0.0 fraction 1.0 - +(gauss) phi1 224.952 Phi 70.5702 phi2 148.486 [Grain080] -(gauss) phi1 7.71702 Phi 23.6124 phi2 131.591 scatter 0.0 fraction 1.0 - +(gauss) phi1 7.71702 Phi 23.6124 phi2 131.591 [Grain081] -(gauss) phi1 65.1024 Phi 138.774 phi2 247.344 scatter 0.0 fraction 1.0 - +(gauss) phi1 65.1024 Phi 138.774 phi2 247.344 [Grain082] -(gauss) phi1 37.6181 Phi 51.5209 phi2 8.4169 scatter 0.0 fraction 1.0 - +(gauss) phi1 37.6181 Phi 51.5209 phi2 8.4169 [Grain083] -(gauss) phi1 245.335 Phi 53.4543 phi2 52.5205 scatter 0.0 fraction 1.0 - +(gauss) phi1 245.335 Phi 53.4543 phi2 52.5205 [Grain084] -(gauss) phi1 259.572 Phi 87.7026 phi2 272.065 scatter 0.0 fraction 1.0 - +(gauss) phi1 259.572 Phi 87.7026 phi2 272.065 [Grain085] -(gauss) phi1 269.39 Phi 103.379 phi2 132.506 scatter 0.0 fraction 1.0 - +(gauss) phi1 269.39 Phi 103.379 phi2 132.506 [Grain086] -(gauss) phi1 175.156 Phi 119.338 phi2 355.51 scatter 0.0 fraction 1.0 - +(gauss) phi1 175.156 Phi 119.338 phi2 355.51 [Grain087] -(gauss) phi1 248.11 Phi 39.4772 phi2 310.371 scatter 0.0 fraction 1.0 - +(gauss) phi1 248.11 Phi 39.4772 phi2 310.371 [Grain088] -(gauss) phi1 121.809 Phi 141.465 phi2 10.0736 scatter 0.0 fraction 1.0 - +(gauss) phi1 121.809 Phi 141.465 phi2 10.0736 [Grain089] -(gauss) phi1 2.4357 Phi 47.118 phi2 274.654 scatter 0.0 fraction 1.0 - +(gauss) phi1 2.4357 Phi 47.118 phi2 274.654 [Grain090] -(gauss) phi1 314.188 Phi 134.146 phi2 250.673 scatter 0.0 fraction 1.0 - +(gauss) phi1 314.188 Phi 134.146 phi2 250.673 [Grain091] -(gauss) phi1 114.815 Phi 121.132 phi2 275.124 scatter 0.0 fraction 1.0 - +(gauss) phi1 114.815 Phi 121.132 phi2 275.124 [Grain092] -(gauss) phi1 126.699 Phi 99.0325 phi2 320.537 scatter 0.0 fraction 1.0 - +(gauss) phi1 126.699 Phi 99.0325 phi2 320.537 [Grain093] -(gauss) phi1 184.138 Phi 20.1663 phi2 159.314 scatter 0.0 fraction 1.0 - +(gauss) phi1 184.138 Phi 20.1663 phi2 159.314 [Grain094] -(gauss) phi1 296.502 Phi 15.2389 phi2 39.382 scatter 0.0 fraction 1.0 - +(gauss) phi1 296.502 Phi 15.2389 phi2 39.382 [Grain095] -(gauss) phi1 167.8 Phi 151.764 phi2 192.568 scatter 0.0 fraction 1.0 - +(gauss) phi1 167.8 Phi 151.764 phi2 192.568 [Grain096] -(gauss) phi1 257.822 Phi 133.446 phi2 257.108 scatter 0.0 fraction 1.0 - +(gauss) phi1 257.822 Phi 133.446 phi2 257.108 [Grain097] -(gauss) phi1 71.6923 Phi 74.5726 phi2 342.575 scatter 0.0 fraction 1.0 - +(gauss) phi1 71.6923 Phi 74.5726 phi2 342.575 [Grain098] -(gauss) phi1 176.748 Phi 28.39 phi2 327.375 scatter 0.0 fraction 1.0 - +(gauss) phi1 176.748 Phi 28.39 phi2 327.375 [Grain099] -(gauss) phi1 121.822 Phi 141.836 phi2 22.6349 scatter 0.0 fraction 1.0 - +(gauss) phi1 121.822 Phi 141.836 phi2 22.6349 [Grain100] -(gauss) phi1 180.151 Phi 109.246 phi2 146.177 scatter 0.0 fraction 1.0 +(gauss) phi1 180.151 Phi 109.246 phi2 146.177 diff --git a/examples/MSC.Marc/material.config b/examples/MSC.Marc/material.config index 92a3ed38e..69b8412f4 100644 --- a/examples/MSC.Marc/material.config +++ b/examples/MSC.Marc/material.config @@ -9,307 +9,206 @@ #-------------------# [Grain001] -crystallite 1 (constituent) phase 1 texture 1 fraction 1.0 [Grain002] -crystallite 1 (constituent) phase 1 texture 2 fraction 1.0 [Grain003] -crystallite 1 (constituent) phase 1 texture 3 fraction 1.0 [Grain004] -crystallite 1 (constituent) phase 1 texture 4 fraction 1.0 [Grain005] -crystallite 1 (constituent) phase 1 texture 5 fraction 1.0 [Grain006] -crystallite 1 (constituent) phase 1 texture 6 fraction 1.0 [Grain007] -crystallite 1 (constituent) phase 1 texture 7 fraction 1.0 [Grain008] -crystallite 1 (constituent) phase 1 texture 8 fraction 1.0 [Grain009] -crystallite 1 (constituent) phase 1 texture 9 fraction 1.0 [Grain010] -crystallite 1 (constituent) phase 1 texture 10 fraction 1.0 [Grain011] -crystallite 1 (constituent) phase 1 texture 11 fraction 1.0 [Grain012] -crystallite 1 (constituent) phase 1 texture 12 fraction 1.0 [Grain013] -crystallite 1 (constituent) phase 1 texture 13 fraction 1.0 [Grain014] -crystallite 1 (constituent) phase 1 texture 14 fraction 1.0 [Grain015] -crystallite 1 (constituent) phase 1 texture 15 fraction 1.0 [Grain016] -crystallite 1 (constituent) phase 1 texture 16 fraction 1.0 [Grain017] -crystallite 1 (constituent) phase 1 texture 17 fraction 1.0 [Grain018] -crystallite 1 (constituent) phase 1 texture 18 fraction 1.0 [Grain019] -crystallite 1 (constituent) phase 1 texture 19 fraction 1.0 [Grain020] -crystallite 1 (constituent) phase 1 texture 20 fraction 1.0 [Grain021] -crystallite 1 (constituent) phase 1 texture 21 fraction 1.0 [Grain022] -crystallite 1 (constituent) phase 1 texture 22 fraction 1.0 [Grain023] -crystallite 1 (constituent) phase 1 texture 23 fraction 1.0 [Grain024] -crystallite 1 (constituent) phase 1 texture 24 fraction 1.0 [Grain025] -crystallite 1 (constituent) phase 1 texture 25 fraction 1.0 [Grain026] -crystallite 1 (constituent) phase 1 texture 26 fraction 1.0 [Grain027] -crystallite 1 (constituent) phase 1 texture 27 fraction 1.0 [Grain028] -crystallite 1 (constituent) phase 1 texture 28 fraction 1.0 [Grain029] -crystallite 1 (constituent) phase 1 texture 29 fraction 1.0 [Grain030] -crystallite 1 (constituent) phase 1 texture 30 fraction 1.0 [Grain031] -crystallite 1 (constituent) phase 1 texture 31 fraction 1.0 [Grain032] -crystallite 1 (constituent) phase 1 texture 32 fraction 1.0 [Grain033] -crystallite 1 (constituent) phase 1 texture 33 fraction 1.0 [Grain034] -crystallite 1 (constituent) phase 1 texture 34 fraction 1.0 [Grain035] -crystallite 1 (constituent) phase 1 texture 35 fraction 1.0 [Grain036] -crystallite 1 (constituent) phase 1 texture 36 fraction 1.0 [Grain037] -crystallite 1 (constituent) phase 1 texture 37 fraction 1.0 [Grain038] -crystallite 1 (constituent) phase 1 texture 38 fraction 1.0 [Grain039] -crystallite 1 (constituent) phase 1 texture 39 fraction 1.0 [Grain040] -crystallite 1 (constituent) phase 1 texture 40 fraction 1.0 [Grain041] -crystallite 1 (constituent) phase 1 texture 41 fraction 1.0 [Grain042] -crystallite 1 (constituent) phase 1 texture 42 fraction 1.0 [Grain043] -crystallite 1 (constituent) phase 1 texture 43 fraction 1.0 [Grain044] -crystallite 1 (constituent) phase 1 texture 44 fraction 1.0 [Grain045] -crystallite 1 (constituent) phase 1 texture 45 fraction 1.0 [Grain046] -crystallite 1 (constituent) phase 1 texture 46 fraction 1.0 [Grain047] -crystallite 1 (constituent) phase 1 texture 47 fraction 1.0 [Grain048] -crystallite 1 (constituent) phase 1 texture 48 fraction 1.0 [Grain049] -crystallite 1 (constituent) phase 1 texture 49 fraction 1.0 [Grain050] -crystallite 1 (constituent) phase 1 texture 50 fraction 1.0 [Grain051] -crystallite 1 (constituent) phase 1 texture 51 fraction 1.0 [Grain052] -crystallite 1 (constituent) phase 1 texture 52 fraction 1.0 [Grain053] -crystallite 1 (constituent) phase 1 texture 53 fraction 1.0 [Grain054] -crystallite 1 (constituent) phase 1 texture 54 fraction 1.0 [Grain055] -crystallite 1 (constituent) phase 1 texture 55 fraction 1.0 [Grain056] -crystallite 1 (constituent) phase 1 texture 56 fraction 1.0 [Grain057] -crystallite 1 (constituent) phase 1 texture 57 fraction 1.0 [Grain058] -crystallite 1 (constituent) phase 1 texture 58 fraction 1.0 [Grain059] -crystallite 1 (constituent) phase 1 texture 59 fraction 1.0 [Grain060] -crystallite 1 (constituent) phase 1 texture 60 fraction 1.0 [Grain061] -crystallite 1 (constituent) phase 1 texture 61 fraction 1.0 [Grain062] -crystallite 1 (constituent) phase 1 texture 62 fraction 1.0 [Grain063] -crystallite 1 (constituent) phase 1 texture 63 fraction 1.0 [Grain064] -crystallite 1 (constituent) phase 1 texture 64 fraction 1.0 [Grain065] -crystallite 1 (constituent) phase 1 texture 65 fraction 1.0 [Grain066] -crystallite 1 (constituent) phase 1 texture 66 fraction 1.0 [Grain067] -crystallite 1 (constituent) phase 1 texture 67 fraction 1.0 [Grain068] -crystallite 1 (constituent) phase 1 texture 68 fraction 1.0 [Grain069] -crystallite 1 (constituent) phase 1 texture 69 fraction 1.0 [Grain070] -crystallite 1 (constituent) phase 1 texture 70 fraction 1.0 [Grain071] -crystallite 1 (constituent) phase 1 texture 71 fraction 1.0 [Grain072] -crystallite 1 (constituent) phase 1 texture 72 fraction 1.0 [Grain073] -crystallite 1 (constituent) phase 1 texture 73 fraction 1.0 [Grain074] -crystallite 1 (constituent) phase 1 texture 74 fraction 1.0 [Grain075] -crystallite 1 (constituent) phase 1 texture 75 fraction 1.0 [Grain076] -crystallite 1 (constituent) phase 1 texture 76 fraction 1.0 [Grain077] -crystallite 1 (constituent) phase 1 texture 77 fraction 1.0 [Grain078] -crystallite 1 (constituent) phase 1 texture 78 fraction 1.0 [Grain079] -crystallite 1 (constituent) phase 1 texture 79 fraction 1.0 [Grain080] -crystallite 1 (constituent) phase 1 texture 80 fraction 1.0 [Grain081] -crystallite 1 (constituent) phase 1 texture 81 fraction 1.0 [Grain082] -crystallite 1 (constituent) phase 1 texture 82 fraction 1.0 [Grain083] -crystallite 1 (constituent) phase 1 texture 83 fraction 1.0 [Grain084] -crystallite 1 (constituent) phase 1 texture 84 fraction 1.0 [Grain085] -crystallite 1 (constituent) phase 1 texture 85 fraction 1.0 [Grain086] -crystallite 1 (constituent) phase 1 texture 86 fraction 1.0 [Grain087] -crystallite 1 (constituent) phase 1 texture 87 fraction 1.0 [Grain088] -crystallite 1 (constituent) phase 1 texture 88 fraction 1.0 [Grain089] -crystallite 1 (constituent) phase 1 texture 89 fraction 1.0 [Grain090] -crystallite 1 (constituent) phase 1 texture 90 fraction 1.0 [Grain091] -crystallite 1 (constituent) phase 1 texture 91 fraction 1.0 [Grain092] -crystallite 1 (constituent) phase 1 texture 92 fraction 1.0 [Grain093] -crystallite 1 (constituent) phase 1 texture 93 fraction 1.0 [Grain094] -crystallite 1 (constituent) phase 1 texture 94 fraction 1.0 [Grain095] -crystallite 1 (constituent) phase 1 texture 95 fraction 1.0 [Grain096] -crystallite 1 (constituent) phase 1 texture 96 fraction 1.0 [Grain097] -crystallite 1 (constituent) phase 1 texture 97 fraction 1.0 [Grain098] -crystallite 1 (constituent) phase 1 texture 98 fraction 1.0 [Grain099] -crystallite 1 (constituent) phase 1 texture 99 fraction 1.0 [Grain100] -crystallite 1 (constituent) phase 1 texture 100 fraction 1.0 [cubeGrain] -crystallite 1 (constituent) phase 1 texture 101 fraction 1.0 #-------------------# @@ -317,208 +216,208 @@ crystallite 1 #-------------------# [Grain001] -(gauss) phi1 359.121452 Phi 82.319471 Phi2 347.729535 scatter 0 fraction 1 +(gauss) phi1 359.121452 Phi 82.319471 Phi2 347.729535 [Grain002] -(gauss) phi1 269.253967 Phi 105.379919 Phi2 173.029284 scatter 0 fraction 1 +(gauss) phi1 269.253967 Phi 105.379919 Phi2 173.029284 [Grain003] -(gauss) phi1 26.551535 Phi 171.606752 Phi2 124.949264 scatter 0 fraction 1 +(gauss) phi1 26.551535 Phi 171.606752 Phi2 124.949264 [Grain004] -(gauss) phi1 123.207774 Phi 124.339577 Phi2 47.937748 scatter 0 fraction 1 +(gauss) phi1 123.207774 Phi 124.339577 Phi2 47.937748 [Grain005] -(gauss) phi1 324.188825 Phi 103.089216 Phi2 160.373624 scatter 0 fraction 1 +(gauss) phi1 324.188825 Phi 103.089216 Phi2 160.373624 [Grain006] -(gauss) phi1 238.295585 Phi 165.416882 Phi2 234.307741 scatter 0 fraction 1 +(gauss) phi1 238.295585 Phi 165.416882 Phi2 234.307741 [Grain007] -(gauss) phi1 232.707177 Phi 110.733726 Phi2 308.049265 scatter 0 fraction 1 +(gauss) phi1 232.707177 Phi 110.733726 Phi2 308.049265 [Grain008] -(gauss) phi1 144.463291 Phi 125.891441 Phi2 348.674207 scatter 0 fraction 1 +(gauss) phi1 144.463291 Phi 125.891441 Phi2 348.674207 [Grain009] -(gauss) phi1 215.423832 Phi 69.759502 Phi2 164.477632 scatter 0 fraction 1 +(gauss) phi1 215.423832 Phi 69.759502 Phi2 164.477632 [Grain010] -(gauss) phi1 118.805444 Phi 143.057031 Phi2 271.963190 scatter 0 fraction 1 +(gauss) phi1 118.805444 Phi 143.057031 Phi2 271.963190 [Grain011] -(gauss) phi1 218.049576 Phi 64.017550 Phi2 323.040457 scatter 0 fraction 1 +(gauss) phi1 218.049576 Phi 64.017550 Phi2 323.040457 [Grain012] -(gauss) phi1 236.962483 Phi 134.312093 Phi2 220.433366 scatter 0 fraction 1 +(gauss) phi1 236.962483 Phi 134.312093 Phi2 220.433366 [Grain013] -(gauss) phi1 352.317686 Phi 3.356527 Phi2 92.447275 scatter 0 fraction 1 +(gauss) phi1 352.317686 Phi 3.356527 Phi2 92.447275 [Grain014] -(gauss) phi1 198.311545 Phi 71.452240 Phi2 199.441849 scatter 0 fraction 1 +(gauss) phi1 198.311545 Phi 71.452240 Phi2 199.441849 [Grain015] -(gauss) phi1 351.993635 Phi 36.500987 Phi2 236.852886 scatter 0 fraction 1 +(gauss) phi1 351.993635 Phi 36.500987 Phi2 236.852886 [Grain016] -(gauss) phi1 262.389063 Phi 101.249950 Phi2 334.305959 scatter 0 fraction 1 +(gauss) phi1 262.389063 Phi 101.249950 Phi2 334.305959 [Grain017] -(gauss) phi1 53.220668 Phi 69.570254 Phi2 277.061151 scatter 0 fraction 1 +(gauss) phi1 53.220668 Phi 69.570254 Phi2 277.061151 [Grain018] -(gauss) phi1 122.156119 Phi 140.207051 Phi2 221.172906 scatter 0 fraction 1 +(gauss) phi1 122.156119 Phi 140.207051 Phi2 221.172906 [Grain019] -(gauss) phi1 295.422170 Phi 26.595511 Phi2 263.206315 scatter 0 fraction 1 +(gauss) phi1 295.422170 Phi 26.595511 Phi2 263.206315 [Grain020] -(gauss) phi1 179.137406 Phi 104.500977 Phi2 151.742108 scatter 0 fraction 1 +(gauss) phi1 179.137406 Phi 104.500977 Phi2 151.742108 [Grain021] -(gauss) phi1 199.045094 Phi 5.228899 Phi2 356.542109 scatter 0 fraction 1 +(gauss) phi1 199.045094 Phi 5.228899 Phi2 356.542109 [Grain022] -(gauss) phi1 268.671476 Phi 24.835403 Phi2 33.578889 scatter 0 fraction 1 +(gauss) phi1 268.671476 Phi 24.835403 Phi2 33.578889 [Grain023] -(gauss) phi1 264.248527 Phi 59.766630 Phi2 340.865462 scatter 0 fraction 1 +(gauss) phi1 264.248527 Phi 59.766630 Phi2 340.865462 [Grain024] -(gauss) phi1 254.223491 Phi 51.125301 Phi2 201.094027 scatter 0 fraction 1 +(gauss) phi1 254.223491 Phi 51.125301 Phi2 201.094027 [Grain025] -(gauss) phi1 22.214008 Phi 92.248774 Phi2 215.168318 scatter 0 fraction 1 +(gauss) phi1 22.214008 Phi 92.248774 Phi2 215.168318 [Grain026] -(gauss) phi1 49.511491 Phi 79.933539 Phi2 187.188575 scatter 0 fraction 1 +(gauss) phi1 49.511491 Phi 79.933539 Phi2 187.188575 [Grain027] -(gauss) phi1 318.916204 Phi 113.102650 Phi2 241.076629 scatter 0 fraction 1 +(gauss) phi1 318.916204 Phi 113.102650 Phi2 241.076629 [Grain028] -(gauss) phi1 239.378433 Phi 89.578655 Phi2 94.167043 scatter 0 fraction 1 +(gauss) phi1 239.378433 Phi 89.578655 Phi2 94.167043 [Grain029] -(gauss) phi1 27.561421 Phi 142.892093 Phi2 197.735666 scatter 0 fraction 1 +(gauss) phi1 27.561421 Phi 142.892093 Phi2 197.735666 [Grain030] -(gauss) phi1 135.210581 Phi 165.859834 Phi2 285.449561 scatter 0 fraction 1 +(gauss) phi1 135.210581 Phi 165.859834 Phi2 285.449561 [Grain031] -(gauss) phi1 223.515916 Phi 56.824378 Phi2 343.289074 scatter 0 fraction 1 +(gauss) phi1 223.515916 Phi 56.824378 Phi2 343.289074 [Grain032] -(gauss) phi1 41.127974 Phi 111.289145 Phi2 214.855145 scatter 0 fraction 1 +(gauss) phi1 41.127974 Phi 111.289145 Phi2 214.855145 [Grain033] -(gauss) phi1 17.335045 Phi 140.496745 Phi2 77.747371 scatter 0 fraction 1 +(gauss) phi1 17.335045 Phi 140.496745 Phi2 77.747371 [Grain034] -(gauss) phi1 36.206421 Phi 148.574232 Phi2 88.870226 scatter 0 fraction 1 +(gauss) phi1 36.206421 Phi 148.574232 Phi2 88.870226 [Grain035] -(gauss) phi1 159.618336 Phi 125.680504 Phi2 204.119403 scatter 0 fraction 1 +(gauss) phi1 159.618336 Phi 125.680504 Phi2 204.119403 [Grain036] -(gauss) phi1 8.752464 Phi 99.173166 Phi2 143.227089 scatter 0 fraction 1 +(gauss) phi1 8.752464 Phi 99.173166 Phi2 143.227089 [Grain037] -(gauss) phi1 351.570753 Phi 67.343218 Phi2 1.779612 scatter 0 fraction 1 +(gauss) phi1 351.570753 Phi 67.343218 Phi2 1.779612 [Grain038] -(gauss) phi1 46.771572 Phi 155.018674 Phi2 302.319987 scatter 0 fraction 1 +(gauss) phi1 46.771572 Phi 155.018674 Phi2 302.319987 [Grain039] -(gauss) phi1 244.255976 Phi 80.566566 Phi2 264.069331 scatter 0 fraction 1 +(gauss) phi1 244.255976 Phi 80.566566 Phi2 264.069331 [Grain040] -(gauss) phi1 41.775388 Phi 47.109507 Phi2 300.598550 scatter 0 fraction 1 +(gauss) phi1 41.775388 Phi 47.109507 Phi2 300.598550 [Grain041] -(gauss) phi1 268.753103 Phi 46.654050 Phi2 190.382041 scatter 0 fraction 1 +(gauss) phi1 268.753103 Phi 46.654050 Phi2 190.382041 [Grain042] -(gauss) phi1 239.574480 Phi 62.517793 Phi2 147.817535 scatter 0 fraction 1 +(gauss) phi1 239.574480 Phi 62.517793 Phi2 147.817535 [Grain043] -(gauss) phi1 128.059775 Phi 61.916743 Phi2 169.674359 scatter 0 fraction 1 +(gauss) phi1 128.059775 Phi 61.916743 Phi2 169.674359 [Grain044] -(gauss) phi1 166.545156 Phi 58.709099 Phi2 252.885391 scatter 0 fraction 1 +(gauss) phi1 166.545156 Phi 58.709099 Phi2 252.885391 [Grain045] -(gauss) phi1 92.867691 Phi 28.906456 Phi2 164.197290 scatter 0 fraction 1 +(gauss) phi1 92.867691 Phi 28.906456 Phi2 164.197290 [Grain046] -(gauss) phi1 291.056147 Phi 35.145174 Phi2 250.155599 scatter 0 fraction 1 +(gauss) phi1 291.056147 Phi 35.145174 Phi2 250.155599 [Grain047] -(gauss) phi1 79.015862 Phi 44.772479 Phi2 267.982808 scatter 0 fraction 1 +(gauss) phi1 79.015862 Phi 44.772479 Phi2 267.982808 [Grain048] -(gauss) phi1 108.400702 Phi 69.883075 Phi2 222.737053 scatter 0 fraction 1 +(gauss) phi1 108.400702 Phi 69.883075 Phi2 222.737053 [Grain049] -(gauss) phi1 348.326500 Phi 11.339714 Phi2 121.682346 scatter 0 fraction 1 +(gauss) phi1 348.326500 Phi 11.339714 Phi2 121.682346 [Grain050] -(gauss) phi1 331.476209 Phi 108.775043 Phi2 335.139671 scatter 0 fraction 1 +(gauss) phi1 331.476209 Phi 108.775043 Phi2 335.139671 [Grain051] -(gauss) phi1 196.750278 Phi 93.955106 Phi2 63.689075 scatter 0 fraction 1 +(gauss) phi1 196.750278 Phi 93.955106 Phi2 63.689075 [Grain052] -(gauss) phi1 136.077875 Phi 130.508342 Phi2 128.468976 scatter 0 fraction 1 +(gauss) phi1 136.077875 Phi 130.508342 Phi2 128.468976 [Grain053] -(gauss) phi1 239.643513 Phi 76.284643 Phi2 168.821008 scatter 0 fraction 1 +(gauss) phi1 239.643513 Phi 76.284643 Phi2 168.821008 [Grain054] -(gauss) phi1 113.850670 Phi 117.531757 Phi2 71.971648 scatter 0 fraction 1 +(gauss) phi1 113.850670 Phi 117.531757 Phi2 71.971648 [Grain055] -(gauss) phi1 149.554071 Phi 16.543098 Phi2 195.556172 scatter 0 fraction 1 +(gauss) phi1 149.554071 Phi 16.543098 Phi2 195.556172 [Grain056] -(gauss) phi1 46.626579 Phi 52.447846 Phi2 304.495569 scatter 0 fraction 1 +(gauss) phi1 46.626579 Phi 52.447846 Phi2 304.495569 [Grain057] -(gauss) phi1 255.251821 Phi 86.678048 Phi2 238.982712 scatter 0 fraction 1 +(gauss) phi1 255.251821 Phi 86.678048 Phi2 238.982712 [Grain058] -(gauss) phi1 324.266133 Phi 28.075458 Phi2 41.191295 scatter 0 fraction 1 +(gauss) phi1 324.266133 Phi 28.075458 Phi2 41.191295 [Grain059] -(gauss) phi1 312.000332 Phi 74.648725 Phi2 87.403581 scatter 0 fraction 1 +(gauss) phi1 312.000332 Phi 74.648725 Phi2 87.403581 [Grain060] -(gauss) phi1 57.742481 Phi 163.241519 Phi2 68.491438 scatter 0 fraction 1 +(gauss) phi1 57.742481 Phi 163.241519 Phi2 68.491438 [Grain061] -(gauss) phi1 112.442447 Phi 51.735320 Phi2 206.538656 scatter 0 fraction 1 +(gauss) phi1 112.442447 Phi 51.735320 Phi2 206.538656 [Grain062] -(gauss) phi1 297.453842 Phi 115.283041 Phi2 57.785319 scatter 0 fraction 1 +(gauss) phi1 297.453842 Phi 115.283041 Phi2 57.785319 [Grain063] -(gauss) phi1 119.132681 Phi 117.923565 Phi2 196.121206 scatter 0 fraction 1 +(gauss) phi1 119.132681 Phi 117.923565 Phi2 196.121206 [Grain064] -(gauss) phi1 199.267314 Phi 163.091476 Phi2 53.549301 scatter 0 fraction 1 +(gauss) phi1 199.267314 Phi 163.091476 Phi2 53.549301 [Grain065] -(gauss) phi1 37.765215 Phi 76.795488 Phi2 146.264753 scatter 0 fraction 1 +(gauss) phi1 37.765215 Phi 76.795488 Phi2 146.264753 [Grain066] -(gauss) phi1 324.550183 Phi 27.665150 Phi2 56.383148 scatter 0 fraction 1 +(gauss) phi1 324.550183 Phi 27.665150 Phi2 56.383148 [Grain067] -(gauss) phi1 337.305377 Phi 136.807151 Phi2 133.661586 scatter 0 fraction 1 +(gauss) phi1 337.305377 Phi 136.807151 Phi2 133.661586 [Grain068] -(gauss) phi1 115.744041 Phi 64.536978 Phi2 262.694800 scatter 0 fraction 1 +(gauss) phi1 115.744041 Phi 64.536978 Phi2 262.694800 [Grain069] -(gauss) phi1 136.293403 Phi 48.862462 Phi2 343.319175 scatter 0 fraction 1 +(gauss) phi1 136.293403 Phi 48.862462 Phi2 343.319175 [Grain070] -(gauss) phi1 111.030931 Phi 80.823213 Phi2 84.041594 scatter 0 fraction 1 +(gauss) phi1 111.030931 Phi 80.823213 Phi2 84.041594 [Grain071] -(gauss) phi1 303.985249 Phi 118.929631 Phi2 302.307709 scatter 0 fraction 1 +(gauss) phi1 303.985249 Phi 118.929631 Phi2 302.307709 [Grain072] -(gauss) phi1 193.556259 Phi 75.928015 Phi2 176.696899 scatter 0 fraction 1 +(gauss) phi1 193.556259 Phi 75.928015 Phi2 176.696899 [Grain073] -(gauss) phi1 102.543259 Phi 121.929923 Phi2 234.496773 scatter 0 fraction 1 +(gauss) phi1 102.543259 Phi 121.929923 Phi2 234.496773 [Grain074] -(gauss) phi1 218.581323 Phi 101.753894 Phi2 305.566089 scatter 0 fraction 1 +(gauss) phi1 218.581323 Phi 101.753894 Phi2 305.566089 [Grain075] -(gauss) phi1 229.542114 Phi 118.839215 Phi2 129.179156 scatter 0 fraction 1 +(gauss) phi1 229.542114 Phi 118.839215 Phi2 129.179156 [Grain076] -(gauss) phi1 202.258840 Phi 139.205956 Phi2 352.248979 scatter 0 fraction 1 +(gauss) phi1 202.258840 Phi 139.205956 Phi2 352.248979 [Grain077] -(gauss) phi1 137.954289 Phi 63.806918 Phi2 128.975049 scatter 0 fraction 1 +(gauss) phi1 137.954289 Phi 63.806918 Phi2 128.975049 [Grain078] -(gauss) phi1 327.557366 Phi 84.987420 Phi2 345.483143 scatter 0 fraction 1 +(gauss) phi1 327.557366 Phi 84.987420 Phi2 345.483143 [Grain079] -(gauss) phi1 334.610243 Phi 74.535474 Phi2 106.419231 scatter 0 fraction 1 +(gauss) phi1 334.610243 Phi 74.535474 Phi2 106.419231 [Grain080] -(gauss) phi1 62.906243 Phi 46.752029 Phi2 222.692276 scatter 0 fraction 1 +(gauss) phi1 62.906243 Phi 46.752029 Phi2 222.692276 [Grain081] -(gauss) phi1 254.121439 Phi 121.005485 Phi2 287.265977 scatter 0 fraction 1 +(gauss) phi1 254.121439 Phi 121.005485 Phi2 287.265977 [Grain082] -(gauss) phi1 140.765045 Phi 141.268031 Phi2 271.327656 scatter 0 fraction 1 +(gauss) phi1 140.765045 Phi 141.268031 Phi2 271.327656 [Grain083] -(gauss) phi1 10.726984 Phi 66.339177 Phi2 189.073212 scatter 0 fraction 1 +(gauss) phi1 10.726984 Phi 66.339177 Phi2 189.073212 [Grain084] -(gauss) phi1 270.921536 Phi 72.821127 Phi2 313.590515 scatter 0 fraction 1 +(gauss) phi1 270.921536 Phi 72.821127 Phi2 313.590515 [Grain085] -(gauss) phi1 299.059668 Phi 23.884874 Phi2 80.016277 scatter 0 fraction 1 +(gauss) phi1 299.059668 Phi 23.884874 Phi2 80.016277 [Grain086] -(gauss) phi1 208.617406 Phi 11.031834 Phi2 302.388247 scatter 0 fraction 1 +(gauss) phi1 208.617406 Phi 11.031834 Phi2 302.388247 [Grain087] -(gauss) phi1 62.929967 Phi 65.223261 Phi2 108.558265 scatter 0 fraction 1 +(gauss) phi1 62.929967 Phi 65.223261 Phi2 108.558265 [Grain088] -(gauss) phi1 9.014959 Phi 33.542169 Phi2 247.970366 scatter 0 fraction 1 +(gauss) phi1 9.014959 Phi 33.542169 Phi2 247.970366 [Grain089] -(gauss) phi1 272.432808 Phi 30.065174 Phi2 19.803570 scatter 0 fraction 1 +(gauss) phi1 272.432808 Phi 30.065174 Phi2 19.803570 [Grain090] -(gauss) phi1 179.621980 Phi 151.763475 Phi2 61.871794 scatter 0 fraction 1 +(gauss) phi1 179.621980 Phi 151.763475 Phi2 61.871794 [Grain091] -(gauss) phi1 247.810321 Phi 112.752980 Phi2 264.668469 scatter 0 fraction 1 +(gauss) phi1 247.810321 Phi 112.752980 Phi2 264.668469 [Grain092] -(gauss) phi1 270.780630 Phi 102.037858 Phi2 31.602610 scatter 0 fraction 1 +(gauss) phi1 270.780630 Phi 102.037858 Phi2 31.602610 [Grain093] -(gauss) phi1 17.626672 Phi 56.032415 Phi2 245.079600 scatter 0 fraction 1 +(gauss) phi1 17.626672 Phi 56.032415 Phi2 245.079600 [Grain094] -(gauss) phi1 112.165186 Phi 87.390459 Phi2 182.086729 scatter 0 fraction 1 +(gauss) phi1 112.165186 Phi 87.390459 Phi2 182.086729 [Grain095] -(gauss) phi1 157.869381 Phi 79.905131 Phi2 107.037081 scatter 0 fraction 1 +(gauss) phi1 157.869381 Phi 79.905131 Phi2 107.037081 [Grain096] -(gauss) phi1 106.163846 Phi 148.477084 Phi2 350.980466 scatter 0 fraction 1 +(gauss) phi1 106.163846 Phi 148.477084 Phi2 350.980466 [Grain097] -(gauss) phi1 262.138550 Phi 58.923588 Phi2 111.303439 scatter 0 fraction 1 +(gauss) phi1 262.138550 Phi 58.923588 Phi2 111.303439 [Grain098] -(gauss) phi1 88.739397 Phi 119.092789 Phi2 222.502594 scatter 0 fraction 1 +(gauss) phi1 88.739397 Phi 119.092789 Phi2 222.502594 [Grain099] -(gauss) phi1 337.603765 Phi 10.145102 Phi2 80.934916 scatter 0 fraction 1 +(gauss) phi1 337.603765 Phi 10.145102 Phi2 80.934916 [Grain100] -(gauss) phi1 341.022242 Phi 45.927285 Phi2 252.045476 scatter 0 fraction 1 +(gauss) phi1 341.022242 Phi 45.927285 Phi2 252.045476 [cube] -(gauss) phi1 0 Phi 0 phi2 0 scatter 0 fraction 1 +(gauss) phi1 0 Phi 0 phi2 0 #-------------------# diff --git a/examples/SpectralMethod/EshelbyInclusion/material.config b/examples/SpectralMethod/EshelbyInclusion/material.config index d1ea80964..6dda5c2dd 100644 --- a/examples/SpectralMethod/EshelbyInclusion/material.config +++ b/examples/SpectralMethod/EshelbyInclusion/material.config @@ -104,8 +104,8 @@ crystallite 1 #--------------------------# [cube] -(gauss) phi1 0.0 Phi 0.0 phi2 0.0 scatter 0.0 fraction 1.0 +(gauss) phi1 0.0 Phi 0.0 phi2 0.0 [rotated] -(gauss) phi1 0.0 Phi 45.0 phi2 0.0 scatter 0.0 fraction 1.0 +(gauss) phi1 0.0 Phi 45.0 phi2 0.0 diff --git a/examples/SpectralMethod/Polycrystal/material.config b/examples/SpectralMethod/Polycrystal/material.config index e47c2142c..44e8b8c1d 100644 --- a/examples/SpectralMethod/Polycrystal/material.config +++ b/examples/SpectralMethod/Polycrystal/material.config @@ -51,64 +51,44 @@ atol_resistance 1 #-------------------# [Grain01] -crystallite 1 (constituent) phase 1 texture 01 fraction 1.0 [Grain02] -crystallite 1 (constituent) phase 1 texture 02 fraction 1.0 [Grain03] -crystallite 1 (constituent) phase 1 texture 03 fraction 1.0 [Grain04] -crystallite 1 (constituent) phase 1 texture 04 fraction 1.0 [Grain05] -crystallite 1 (constituent) phase 1 texture 05 fraction 1.0 [Grain06] -crystallite 1 (constituent) phase 1 texture 06 fraction 1.0 [Grain07] -crystallite 1 (constituent) phase 1 texture 07 fraction 1.0 [Grain08] -crystallite 1 (constituent) phase 1 texture 08 fraction 1.0 [Grain09] -crystallite 1 (constituent) phase 1 texture 09 fraction 1.0 [Grain10] -crystallite 1 (constituent) phase 1 texture 10 fraction 1.0 [Grain11] -crystallite 1 (constituent) phase 1 texture 11 fraction 1.0 [Grain12] -crystallite 1 (constituent) phase 1 texture 12 fraction 1.0 [Grain13] -crystallite 1 (constituent) phase 1 texture 13 fraction 1.0 [Grain14] -crystallite 1 (constituent) phase 1 texture 14 fraction 1.0 [Grain15] -crystallite 1 (constituent) phase 1 texture 15 fraction 1.0 [Grain16] -crystallite 1 (constituent) phase 1 texture 16 fraction 1.0 [Grain17] -crystallite 1 (constituent) phase 1 texture 17 fraction 1.0 [Grain18] -crystallite 1 (constituent) phase 1 texture 18 fraction 1.0 [Grain19] -crystallite 1 (constituent) phase 1 texture 19 fraction 1.0 [Grain20] -crystallite 1 (constituent) phase 1 texture 20 fraction 1.0 @@ -116,42 +96,42 @@ crystallite 1 #-------------------# [Grain01] -(gauss) phi1 0.0 Phi 0.0 phi2 0.0 scatter 0.0 fraction 1.0 +(gauss) phi1 0.0 Phi 0.0 phi2 0.0 [Grain02] -(gauss) phi1 257.468172 Phi 53.250534 phi2 157.331503 scatter 0.0 fraction 1.0 +(gauss) phi1 257.468172 Phi 53.250534 phi2 157.331503 [Grain03] -(gauss) phi1 216.994815 Phi 94.418518 phi2 251.147231 scatter 0.0 fraction 1.0 +(gauss) phi1 216.994815 Phi 94.418518 phi2 251.147231 [Grain04] -(gauss) phi1 196.157946 Phi 55.870978 phi2 21.68117 scatter 0.0 fraction 1.0 +(gauss) phi1 196.157946 Phi 55.870978 phi2 21.68117 [Grain05] -(gauss) phi1 152.515728 Phi 139.769395 phi2 240.036018 scatter 0.0 fraction 1.0 +(gauss) phi1 152.515728 Phi 139.769395 phi2 240.036018 [Grain06] -(gauss) phi1 232.521881 Phi 73.749222 phi2 241.429633 scatter 0.0 fraction 1.0 +(gauss) phi1 232.521881 Phi 73.749222 phi2 241.429633 [Grain07] -(gauss) phi1 157.531396 Phi 135.503513 phi2 75.737722 scatter 0.0 fraction 1.0 +(gauss) phi1 157.531396 Phi 135.503513 phi2 75.737722 [Grain08] -(gauss) phi1 321.03828 Phi 27.209843 phi2 46.413467 scatter 0.0 fraction 1.0 +(gauss) phi1 321.03828 Phi 27.209843 phi2 46.413467 [Grain09] -(gauss) phi1 346.918594 Phi 87.495569 phi2 113.554206 scatter 0.0 fraction 1.0 +(gauss) phi1 346.918594 Phi 87.495569 phi2 113.554206 [Grain10] -(gauss) phi1 138.038947 Phi 99.827132 phi2 130.935878 scatter 0.0 fraction 1.0 +(gauss) phi1 138.038947 Phi 99.827132 phi2 130.935878 [Grain11] -(gauss) phi1 285.021014 Phi 118.092004 phi2 205.270837 scatter 0.0 fraction 1.0 +(gauss) phi1 285.021014 Phi 118.092004 phi2 205.270837 [Grain12] -(gauss) phi1 190.402171 Phi 56.738068 phi2 157.896545 scatter 0.0 fraction 1.0 +(gauss) phi1 190.402171 Phi 56.738068 phi2 157.896545 [Grain13] -(gauss) phi1 204.496042 Phi 95.031265 phi2 355.814582 scatter 0.0 fraction 1.0 +(gauss) phi1 204.496042 Phi 95.031265 phi2 355.814582 [Grain14] -(gauss) phi1 333.21479 Phi 82.133355 phi2 36.736132 scatter 0.0 fraction 1.0 +(gauss) phi1 333.21479 Phi 82.133355 phi2 36.736132 [Grain15] -(gauss) phi1 25.572981 Phi 164.242648 phi2 75.195632 scatter 0.0 fraction 1.0 +(gauss) phi1 25.572981 Phi 164.242648 phi2 75.195632 [Grain16] -(gauss) phi1 31.366548 Phi 76.392403 phi2 58.071426 scatter 0.0 fraction 1.0 +(gauss) phi1 31.366548 Phi 76.392403 phi2 58.071426 [Grain17] -(gauss) phi1 7.278623 Phi 77.044663 phi2 235.118997 scatter 0.0 fraction 1.0 +(gauss) phi1 7.278623 Phi 77.044663 phi2 235.118997 [Grain18] -(gauss) phi1 299.743144 Phi 76.475096 phi2 91.184977 scatter 0.0 fraction 1.0 +(gauss) phi1 299.743144 Phi 76.475096 phi2 91.184977 [Grain19] -(gauss) phi1 280.13643 Phi 27.439718 phi2 167.871878 scatter 0.0 fraction 1.0 +(gauss) phi1 280.13643 Phi 27.439718 phi2 167.871878 [Grain20] -(gauss) phi1 313.204373 Phi 68.676053 phi2 87.993213 scatter 0.0 fraction 1.0 +(gauss) phi1 313.204373 Phi 68.676053 phi2 87.993213 From e47119e7f75d0f7fcae2dc4308114287f7da34d2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 12:11:40 +0100 Subject: [PATCH 24/75] outdated/not needed --- .../reference_postProc/rotation_90deg.txt | 94 ------------------- .../rotation_90deg_inc90.txt | 3 - .../SpectralMethod/EshelbyInclusion/runAll.sh | 54 ----------- 3 files changed, 151 deletions(-) delete mode 100644 examples/MSC.Marc/reference_postProc/rotation_90deg.txt delete mode 100644 examples/MSC.Marc/reference_postProc/rotation_90deg_inc90.txt delete mode 100755 examples/SpectralMethod/EshelbyInclusion/runAll.sh diff --git a/examples/MSC.Marc/reference_postProc/rotation_90deg.txt b/examples/MSC.Marc/reference_postProc/rotation_90deg.txt deleted file mode 100644 index 27c80fbdb..000000000 --- a/examples/MSC.Marc/reference_postProc/rotation_90deg.txt +++ /dev/null @@ -1,94 +0,0 @@ -2 header -$Id: postResults 861 2011-05-06 10:00:27Z MPIE\c.kords $ -inc time elem node ip grain ip.x ip.y ip.z CauchyStress.intensity CauchyStress.t11 CauchyStress.t22 CauchyStress.t33 CauchyStress.t12 CauchyStress.t23 CauchyStress.t13 1_1_f 1_2_f 1_3_f 1_4_f 1_5_f 1_6_f 1_7_f 1_8_f 1_9_f 1_1_grainrotation 1_2_grainrotation 1_3_grainrotation 1_4_grainrotation 1_1_resistance_slip 1_2_resistance_slip 1_3_resistance_slip 1_4_resistance_slip 1_5_resistance_slip 1_6_resistance_slip 1_7_resistance_slip 1_8_resistance_slip 1_9_resistance_slip 1_10_resistance_slip 1_11_resistance_slip 1_12_resistance_slip -0 0.0 1 5 1 1 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -1 1.0 1 5 1 1 0.5 0.5 0.5 0.024172998067 0.056046936661 0.0577092021704 0.0580734722316 0.0075496127829 0.00882737897336 0.00766104180366 1.0 1.1259596093e-13 1.12595994811e-13 1.55780499177e-13 0.999847710133 -0.0174524057657 1.55782193243e-13 0.0174524057657 0.999847710133 1.0 -1.23725617425e-12 1.23720879461e-12 1.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -2 2.0 1 5 1 1 0.5 0.5 0.5 0.0241432830571 0.0377263836563 0.0324090756476 0.033376660198 0.00727691268548 0.00865175202489 0.00764666078612 1.0 1.10501743118e-13 1.10501777e-13 1.50193822223e-13 0.99939084053 -0.034899495542 1.55527744546e-13 0.034899495542 0.99939084053 1.0 -6.45080505939e-13 5.68662738426e-13 2.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -3 3.0 1 5 1 1 0.5 0.5 0.5 0.0257848323757 0.0201567672193 0.00817993376404 0.00972554087639 0.00701188668609 0.00847246591002 0.00763081293553 1.0 1.08486407791e-13 1.08486434896e-13 1.447601533e-13 0.998629510403 -0.0523359552026 1.55243941075e-13 0.0523359552026 0.998629510403 1.0 -4.46705416797e-13 3.46547009838e-13 3.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -4 4.0 1 5 1 1 0.5 0.5 0.5 0.0286209738301 0.00342932180502 -0.0149000706151 -0.0128218811005 0.00675505120307 0.00828998535872 0.0076136472635 1.0 1.06547922069e-13 1.06547949174e-13 1.39501515266e-13 0.997564077377 -0.0697564706206 1.54932937682e-13 0.0697564706206 0.997564077377 1.0 -3.46813588048e-13 2.36204529243e-13 4.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -5 5.0 1 5 1 1 0.5 0.5 0.5 0.032148640163 -0.0124530605972 -0.0368128865957 -0.0341981202364 0.00650494545698 0.00810338370502 0.00759505899623 1.0 1.04684232745e-13 1.04684253074e-13 1.34370257434e-13 0.996194720268 -0.0871557444334 1.54588120733e-13 0.0871557444334 0.996194720268 1.0 -2.8629133569e-13 1.70304512138e-13 5.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -6 6.0 1 5 1 1 0.5 0.5 0.5 0.0360145416329 -0.027449907735 -0.0575108379126 -0.0543776340783 0.00626290449873 0.00791467912495 0.0075753852725 1.0 1.02893266281e-13 1.0289328661e-13 1.29417364412e-13 0.994521915913 -0.104528464377 1.54218746606e-13 0.104528464377 0.994521915913 1.0 -2.45509477548e-13 1.26874964528e-13 6.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -7 7.0 1 5 1 1 0.5 0.5 0.5 0.0399740663918 -0.0415176264942 -0.0769297853112 -0.0733039304614 0.00602708896622 0.00772315822542 0.00755509966984 1.0 1.01173003352e-13 1.01173016904e-13 1.24581768512e-13 0.992546141148 -0.121869340539 1.5383908611e-13 0.121869340539 0.992546141148 1.0 -2.1607593644e-13 9.60403970436e-14 7.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -8 8.0 1 5 1 1 0.5 0.5 0.5 0.0438656010832 -0.0547002702951 -0.0950862541795 -0.0910048484802 0.00579795939848 0.0075320713222 0.00753418169916 1.0 9.95214110774e-14 9.952142463e-14 1.19883541028e-13 0.990268051624 -0.139173105359 1.5344615769e-13 0.139173105359 0.990268051624 1.0 -1.93732616754e-13 7.31539937134e-14 8.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -9 9.0 1 5 1 1 0.5 0.5 0.5 0.0476265064906 -0.06693007797 -0.111963532865 -0.107425913215 0.00557443965226 0.00733647309244 0.00751292472705 1.0 9.79365107892e-14 9.79365175654e-14 1.15288543144e-13 0.987688362598 -0.156434461474 1.53048269045e-13 0.156434461474 0.987688362598 1.0 -1.7614966289e-13 5.54610577028e-14 9.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -10 10.0 1 5 1 1 0.5 0.5 0.5 0.0511619284052 -0.0781974568963 -0.127493560314 -0.122531078756 0.00535882124677 0.00714056473225 0.00749061629176 1.0 9.64163509231e-14 9.64163509231e-14 1.10881335851e-13 0.984807729721 -0.173648178577 1.52618409989e-13 0.173648178577 0.984807729721 1.0 -1.61827379296e-13 4.16502735892e-14 10.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -11 11.0 1 5 1 1 0.5 0.5 0.5 0.0544590124719 -0.088471762836 -0.141687169671 -0.136302277446 0.0051483400166 0.00694213900715 0.00746928341687 1.0 9.49590273492e-14 9.49590341255e-14 1.06568040796e-13 0.981627166271 -0.190808996558 1.52226335378e-13 0.190808996558 0.981627166271 1.0 -1.50064490456e-13 3.04205106743e-14 11.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -12 12.0 1 5 1 1 0.5 0.5 0.5 0.0574517639017 -0.0978478044271 -0.154580652714 -0.148810505867 0.00494291307405 0.00674560666084 0.00744635425508 1.0 9.35626969238e-14 9.35626969238e-14 1.02349369485e-13 0.978147625923 -0.207911685109 1.51779779608e-13 0.207911685109 0.978147625923 1.0 -1.40004354681e-13 2.11307767752e-14 12.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -13 13.0 1 5 1 1 0.5 0.5 0.5 0.0601600304963 -0.10622742027 -0.166131272912 -0.159981891513 0.0047429674305 0.00654464075342 0.00742361694574 1.0 9.22255571608e-14 9.22255503845e-14 9.82438888813e-14 0.974370062351 -0.224951043725 1.5134031181e-13 0.224951043725 0.974370062351 1.0 -1.31394718782e-13 1.33769905892e-14 13.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -14 14.0 1 5 1 1 0.5 0.5 0.5 0.0625560237246 -0.113614186645 -0.176321923733 -0.169804736972 0.00454916572198 0.00634495634586 0.00740135088563 1.0 9.09458597841e-14 9.09458530078e-14 9.42784397643e-14 0.970295727253 -0.241921886802 1.50916524286e-13 0.241921886802 0.970295727253 1.0 -1.23946358277e-13 6.88772167895e-15 14.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -15 15.0 1 5 1 1 0.5 0.5 0.5 0.064623152588 -0.120048590004 -0.185179919004 -0.17832493782 0.00435922853649 0.00614238297567 0.00737902149558 1.0 8.97219175041e-14 8.97219107278e-14 9.03759421358e-14 0.965925812721 -0.258819043636 1.50488345743e-13 0.258819043636 0.965925812721 1.0 -1.17391732728e-13 1.26347923687e-15 15.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -16 16.0 1 5 1 1 0.5 0.5 0.5 0.0663746195376 -0.125523671508 -0.192728817463 -0.185538485646 0.00417540827766 0.00594279170036 0.00735600618646 1.0 8.85521107938e-14 8.85521040175e-14 8.66191951607e-14 0.961261689663 -0.275637358427 1.50032669123e-13 0.275637358427 0.961261689663 1.0 -1.11524369384e-13 -3.50626472131e-15 16.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -17 17.0 1 5 1 1 0.5 0.5 0.5 0.0677872073143 -0.130049750209 -0.198957800865 -0.191445931792 0.00399514567107 0.00573630817235 0.00733454944566 1.0 8.74348675601e-14 8.74348607838e-14 8.29210628655e-14 0.956304728985 -0.292371690273 1.49627706059e-13 0.292371690273 0.956304728985 1.0 -1.06359209905e-13 -7.7192983925e-15 17.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -18 18.0 1 5 1 1 0.5 0.5 0.5 0.0688726440667 -0.13366368413 -0.20391356945 -0.196102648973 0.00382082024589 0.00553295295686 0.00731354439631 1.0 8.63686902487e-14 8.63686766962e-14 7.93686337898e-14 0.951056540012 -0.309017002583 1.49233476596e-13 0.309017002583 0.951056540012 1.0 -1.01717394815e-13 -1.1326327212e-14 18.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -19 19.0 1 5 1 1 0.5 0.5 0.5 0.0696297180331 -0.136321663857 -0.207558274269 -0.199463963509 0.00364940264262 0.00533262779936 0.00729088904336 1.0 8.53521355156e-14 8.53521151868e-14 7.58580481416e-14 0.945518553257 -0.325568139553 1.48775008155e-13 0.325568139553 0.945518553257 1.0 -9.7403408581e-14 -1.45807929668e-14 19.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -20 20.0 1 5 1 1 0.5 0.5 0.5 0.0700644066665 -0.138097688556 -0.209973961115 -0.201613843441 0.00348059250973 0.00512766698375 0.00727100577205 1.0 8.43838074503e-14 8.43837938977e-14 7.23816555195e-14 0.939692616463 -0.342020124197 1.48407572039e-13 0.342020124197 0.939692616463 1.0 -9.35965172554e-14 -1.75459757942e-14 20.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -21 21.0 1 5 1 1 0.5 0.5 0.5 0.0701877711751 -0.138971403241 -0.211157605052 -0.20253777504 0.00331580708735 0.00492311827838 0.00725055858493 1.0 8.34624050102e-14 8.34623846814e-14 6.89923311081e-14 0.933580458164 -0.358367949724 1.4801277337e-13 0.358367949724 0.933580458164 1.0 -9.0061604821e-14 -2.01888507268e-14 21.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -22 22.0 1 5 1 1 0.5 0.5 0.5 0.0699866553715 -0.138959825039 -0.211107447743 -0.202245801687 0.00315649039112 0.00472341617569 0.00723067810759 1.0 8.25866610342e-14 8.25866339291e-14 6.57438174539e-14 0.927183866501 -0.374606579542 1.4762987382e-13 0.374606579542 0.927183866501 1.0 -8.68153950963e-14 -2.24807118179e-14 22.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -23 23.0 1 5 1 1 0.5 0.5 0.5 0.0694881714825 -0.138143435121 -0.209938883781 -0.200845211744 0.00299837184139 0.00451778201386 0.00721126794815 1.0 8.17553761235e-14 8.17553490184e-14 6.24881345127e-14 0.920504868031 -0.39073112607 1.47254902499e-13 0.39073112607 0.920504868031 1.0 -8.38166477413e-14 -2.46553706542e-14 23.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -24 24.0 1 5 1 1 0.5 0.5 0.5 0.0687132541533 -0.136471450329 -0.20762142539 -0.198303565383 0.0028445108328 0.00431606685743 0.00719203986228 1.0 8.09674050896e-14 8.09673779845e-14 5.93358776826e-14 0.913545489311 -0.406736642122 1.46877193567e-13 0.406736642122 0.913545489311 1.0 -8.10227265054e-14 -2.65915626107e-14 24.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -25 25.0 1 5 1 1 0.5 0.5 0.5 0.0676169983635 -0.13403198123 -0.204196736217 -0.194667950273 0.00269203982316 0.00410861568525 0.00717331608757 1.0 8.02216705066e-14 8.02216434015e-14 5.61884252234e-14 0.906307816505 -0.422618240118 1.46507656809e-13 0.422618240118 0.906307816505 1.0 -7.84230400888e-14 -2.84337508508e-14 25.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -26 26.0 1 5 1 1 0.5 0.5 0.5 0.0662631331079 -0.130787238479 -0.199683398008 -0.189970225096 0.00254649785347 0.00390863511711 0.00715752178803 1.0 7.95171491586e-14 7.95171220536e-14 5.32437219585e-14 0.898794054985 -0.438371151686 1.46231442753e-13 0.438371151686 0.898794054985 1.0 -7.6093421657e-14 -2.99671074901e-14 26.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -27 27.0 1 5 1 1 0.5 0.5 0.5 0.0646436064666 -0.126818150282 -0.194168791175 -0.184269443154 0.00239934097044 0.00370743637905 0.00713936518878 1.0 7.88528788163e-14 7.8852844935e-14 5.02027178238e-14 0.891006529331 -0.453990489244 1.45861472314e-13 0.453990489244 0.891006529331 1.0 -7.37995886732e-14 -3.15536984562e-14 27.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -28 28.0 1 5 1 1 0.5 0.5 0.5 0.0627565607148 -0.122118026018 -0.18763422966 -0.177565723658 0.00225654477254 0.00350114423782 0.00712363282219 1.0 7.82279311316e-14 7.82279040265e-14 4.72786279527e-14 0.88294762373 -0.469471544027 1.45566271168e-13 0.469471544027 0.88294762373 1.0 -7.17171954418e-14 -3.29618534615e-14 28.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -29 29.0 1 5 1 1 0.5 0.5 0.5 0.0606526623375 -0.11671321094 -0.180158898234 -0.169930398464 0.00211710762233 0.003298870055 0.00710933981463 1.0 7.76414658477e-14 7.76414319664e-14 4.44384214485e-14 0.874619722366 -0.484809607267 1.45310806031e-13 0.484809607267 0.874619722366 1.0 -6.9789633057e-14 -3.42433838175e-14 29.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -30 30.0 1 5 1 1 0.5 0.5 0.5 0.0582944850272 -0.1107018888 -0.171804904938 -0.161417961121 0.00197660620324 0.00309796072543 0.00709319859743 1.0 7.7092669813e-14 7.70926291555e-14 4.15282669635e-14 0.866025388241 -0.5 1.44978782668e-13 0.5 0.866025388241 1.0 -6.78861535128e-14 -3.55643994614e-14 30.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -31 31.0 1 5 1 1 0.5 0.5 0.5 0.0557503201598 -0.104059666395 -0.162606656551 -0.152081504464 0.00184033811092 0.00289721833542 0.00708150491118 1.0 7.65807840861e-14 7.65807502048e-14 3.87372832379e-14 0.857167303562 -0.515038073063 1.44792137264e-13 0.515038073063 0.857167303562 1.0 -6.62197551025e-14 -3.67385463685e-14 31.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -32 32.0 1 5 1 1 0.5 0.5 0.5 0.0529884126408 -0.0968004092574 -0.152546048164 -0.14190004766 0.00170668761712 0.0026978047099 0.00706525752321 1.0 7.6105117488e-14 7.61050768304e-14 3.60106096418e-14 0.848048090935 -0.529919266701 1.44433035952e-13 0.529919266701 0.848048090935 1.0 -6.44701645043e-14 -3.78307716371e-14 32.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -33 33.0 1 5 1 1 0.5 0.5 0.5 0.0500567272075 -0.0890314355493 -0.141778171062 -0.131015405059 0.00157438474707 0.00249168649316 0.00705360202119 1.0 7.56650127211e-14 7.56649788398e-14 3.33055252214e-14 0.838670551777 -0.544639050961 1.44223988221e-13 0.544639050961 0.838670551777 1.0 -6.29398605716e-14 -3.88876756317e-14 33.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -34 34.0 1 5 1 1 0.5 0.5 0.5 0.0469640629868 -0.0807560905814 -0.130312100053 -0.119427792728 0.00144245161209 0.00229033012874 0.00704180356115 1.0 7.52598734743e-14 7.52598328167e-14 3.05895784506e-14 0.829037606716 -0.559192895889 1.43997755885e-13 0.559192895889 0.829037606716 1.0 -6.14617270923e-14 -3.99417607007e-14 34.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -35 35.0 1 5 1 1 0.5 0.5 0.5 0.0437172172209 -0.071987785399 -0.118148125708 -0.107174038887 0.00131240475457 0.00208335206844 0.00703246705234 1.0 7.48891440939e-14 7.48891034364e-14 2.79183008092e-14 0.819152057171 -0.573576450348 1.43846116659e-13 0.573576450348 0.819152057171 1.0 -6.01114481542e-14 -4.09455862228e-14 35.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -36 36.0 1 5 1 1 0.5 0.5 0.5 0.0403788372113 -0.0627495497465 -0.105374902487 -0.0943066850305 0.00118379341438 0.00188469397835 0.00702259968966 1.0 7.45523163603e-14 7.45522757027e-14 2.5277750135e-14 0.809017002583 -0.587785243988 1.43663347277e-13 0.587785243988 0.809017002583 1.0 -5.87893923538e-14 -4.19154524999e-14 36.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -37 37.0 1 5 1 1 0.5 0.5 0.5 0.0369407713034 -0.053146019578 -0.0920672789216 -0.0809241756797 0.00105845439248 0.00168191338889 0.0070105525665 1.0 7.42489362636e-14 7.42488888298e-14 2.27346861768e-14 0.798635542393 -0.601814985275 1.43391131217e-13 0.601814985275 0.798635542393 1.0 -5.74447715958e-14 -4.27990704942e-14 37.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -38 38.0 1 5 1 1 0.5 0.5 0.5 0.0334600072977 -0.0431970842183 -0.0782782137394 -0.0670673400164 0.000933687435463 0.00148375425488 0.00700649619102 1.0 7.39785836756e-14 7.39785362418e-14 2.01957371047e-14 0.788010776043 -0.61566144228 1.43388285186e-13 0.61566144228 0.788010776043 1.0 -5.63700595804e-14 -4.36789107216e-14 38.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -39 39.0 1 5 1 1 0.5 0.5 0.5 0.0299732687575 -0.032885748893 -0.0640020221472 -0.0527336075902 0.000808531127404 0.00128437299281 0.00699805375189 1.0 7.37408926781e-14 7.37408452443e-14 1.76288596622e-14 0.777145981789 -0.629320383072 1.4321798413e-13 0.629320383072 0.777145981789 1.0 -5.52001275093e-14 -4.45814548201e-14 39.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -40 40.0 1 5 1 1 0.5 0.5 0.5 0.0265501119175 -0.0222893729806 -0.0493332147598 -0.0380037464201 0.000683732156176 0.00107720762026 0.00699263811111 1.0 7.35355447866e-14 7.35354973528e-14 1.50622549643e-14 0.766044437885 -0.642787575722 1.43141751165e-13 0.642787575722 0.766044437885 1.0 -5.41440536069e-14 -4.54841479964e-14 40.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -41 41.0 1 5 1 1 0.5 0.5 0.5 0.0232912298862 -0.0114479679614 -0.0343343839049 -0.0229646526277 0.000558626372367 0.000879483588506 0.00698518194258 1.0 7.33622553982e-14 7.33622079643e-14 1.24743245179e-14 0.754709601402 -0.656059026718 1.42980692932e-13 0.656059026718 0.754709601402 1.0 -5.30580997703e-14 -4.64043103802e-14 41.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -42 42.0 1 5 1 1 0.5 0.5 0.5 0.0203406476883 -0.000415417132899 -0.0190748237073 -0.00765737332404 0.000437716866145 0.000681487843394 0.00698295794427 1.0 7.32207941197e-14 7.32207466859e-14 1.00257809663e-14 0.7431448102 -0.669130623341 1.42991467191e-13 0.669130623341 0.7431448102 1.0 -5.21353590182e-14 -4.72217344437e-14 42.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -43 43.0 1 5 1 1 0.5 0.5 0.5 0.017873190849 0.0107409814373 -0.00360602373257 0.00782212708145 0.000314239208819 0.000479505921248 0.00697580305859 1.0 7.31109712159e-14 7.31109170058e-14 7.47973206403e-15 0.731353700161 -0.681998372078 1.42815406311e-13 0.681998372078 0.731353700161 1.0 -5.1103120623e-14 -4.81168585336e-14 43.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -44 44.0 1 5 1 1 0.5 0.5 0.5 0.0162081584588 0.0220755711198 0.0120714716613 0.0235084760934 0.000193880769075 0.000282061198959 0.00697334948927 1.0 7.30326240564e-14 7.30325698463e-14 5.03865299026e-15 0.71933978796 -0.694658339024 1.42792353462e-13 0.694658339024 0.71933978796 1.0 -5.02115777884e-14 -4.89405845223e-14 44.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -45 45.0 1 5 1 1 0.5 0.5 0.5 0.0156273554774 0.0334772281349 0.0278379991651 0.0392913781106 7.09175001248e-05 8.74613033375e-05 0.00697097880766 1.0 7.29856645498e-14 7.29856103397e-14 2.50234157871e-15 0.707106769085 -0.707106769085 1.42759393716e-13 0.707106769085 0.707106769085 1.0 -4.93375177139e-14 -4.98392356573e-14 45.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -46 46.0 1 5 1 1 0.5 0.5 0.5 0.0162480691786 0.0449191257358 0.0436743237078 0.0551158338785 -4.99888519698e-05 -0.000117406474601 0.00696983095258 1.0 7.29700181572e-14 7.29699571708e-14 3.70651989336e-17 0.694658398628 -0.71933978796 1.42756737421e-13 0.71933978796 0.694658398628 1.0 -4.85075202933e-14 -5.06943662396e-14 46.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -47 47.0 1 5 1 1 0.5 0.5 0.5 0.017954318699 0.0563476122916 0.0594997182488 0.0709141045809 -0.000170402156073 -0.000321725587128 0.00697033200413 1.0 7.29856645498e-14 7.29856035634e-14 -2.41059012283e-15 0.681998372078 -0.731353700161 1.42799441434e-13 0.731353700161 0.681998372078 1.0 -4.77291918824e-14 -5.15456851735e-14 47.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -48 48.0 1 5 1 1 0.5 0.5 0.5 0.0204742447658 0.0677090287209 0.075221426785 0.0866304710507 -0.00029246028862 -0.000511626130901 0.00697235297412 1.0 7.30326240564e-14 7.303256307e-14 -4.91429161294e-15 0.669130623341 -0.7431448102 1.42883006316e-13 0.7431448102 0.669130623341 1.0 -4.69965219356e-14 -5.2443960226e-14 48.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -49 49.0 1 5 1 1 0.5 0.5 0.5 0.023524710328 0.0790234953165 0.0908864960074 0.102273575962 -0.000416969822254 -0.000719646865036 0.0069726947695 1.0 7.31109644396e-14 7.31109034533e-14 -7.50072916376e-15 0.656059026718 -0.754709541798 1.42894593727e-13 0.754709541798 0.656059026718 1.0 -4.62321492396e-14 -5.34057729138e-14 49.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -50 50.0 1 5 1 1 0.5 0.5 0.5 0.0268598238159 0.0902177020907 0.106357127428 0.1177008003 -0.000538720283657 -0.0009086750797 0.00697285402566 1.0 7.32207941197e-14 7.32207331333e-14 -9.98427042269e-15 0.642787635326 -0.766044437885 1.42887085627e-13 0.766044437885 0.642787635326 1.0 -4.54714797716e-14 -5.43082492497e-14 50.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -51 51.0 1 5 1 1 0.5 0.5 0.5 0.0303826202004 0.101213820279 0.121579430997 0.132867023349 -0.000660901481751 -0.00111284002196 0.00697690108791 1.0 7.33622553982e-14 7.33621876355e-14 -1.24756806177e-14 0.629320383072 -0.777145922184 1.43004138804e-13 0.777145922184 0.629320383072 1.0 -4.48062200948e-14 -5.52263923069e-14 51.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -52 52.0 1 5 1 1 0.5 0.5 0.5 0.0339949033569 0.11201544106 0.136535584927 0.147761180997 -0.000784714065958 -0.00131459208205 0.00697894394398 1.0 7.35355380104e-14 7.3535477024e-14 -1.50155309329e-14 0.615661501884 -0.788010716438 1.43037965912e-13 0.788010716438 0.615661501884 1.0 -4.40999640234e-14 -5.61864601069e-14 52.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -53 53.0 1 5 1 1 0.5 0.5 0.5 0.0376308280896 0.122612737119 0.15118843317 0.1623544842 -0.00091004971182 -0.00151794939302 0.00698458682746 1.0 7.37408859018e-14 7.37408249155e-14 -1.75981801289e-14 0.60181504488 -0.798635482788 1.43186406742e-13 0.798635482788 0.60181504488 1.0 -4.34776455289e-14 -5.71844546542e-14 53.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -54 54.0 1 5 1 1 0.5 0.5 0.5 0.0412246747871 0.132881388068 0.165393546224 0.176486164331 -0.00103311298881 -0.00171284656972 0.00699377711862 1.0 7.39785768994e-14 7.39785091367e-14 -2.00878776232e-14 0.587785243988 -0.809017002583 1.4344772657e-13 0.809017002583 0.587785243988 1.0 -4.29343382678e-14 -5.81362689651e-14 54.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -55 55.0 1 5 1 1 0.5 0.5 0.5 0.0447415113323 0.142851829529 0.179176211357 0.190176308155 -0.00116179022007 -0.00190604047384 0.00699571380392 1.0 7.42489294873e-14 7.42488617247e-14 -2.27610458421e-14 0.573576450348 -0.819152057171 1.43440909649e-13 0.819152057171 0.573576450348 1.0 -4.22339470525e-14 -5.92136542165e-14 55.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -56 56.0 1 5 1 1 0.5 0.5 0.5 0.0481736416751 0.152466788888 0.192468911409 0.203372821212 -0.00128960516304 -0.00210840022191 0.00700309127569 1.0 7.4552309584e-14 7.45522418214e-14 -2.53872833536e-14 0.559192895889 -0.829037547112 1.43614029631e-13 0.829037547112 0.559192895889 1.0 -4.1651784696e-14 -6.02744647271e-14 56.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -57 57.0 1 5 1 1 0.5 0.5 0.5 0.0514957040887 0.16164894402 0.205184012651 0.215988025069 -0.00141807645559 -0.00230375886895 0.00701119331643 1.0 7.48891373177e-14 7.48890627788e-14 -2.80182744139e-14 0.544639050961 -0.838670551777 1.43800837665e-13 0.838670551777 0.544639050961 1.0 -4.10839371963e-14 -6.13515111652e-14 57.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -58 58.0 1 5 1 1 0.5 0.5 0.5 0.0546568840541 0.170429125428 0.217311233282 0.228001371026 -0.00154578115325 -0.00251251878217 0.00702094798908 1.0 7.5259866698e-14 7.52597921591e-14 -3.06018773689e-14 0.529919266701 -0.848048090935 1.44034266393e-13 0.848048090935 0.529919266701 1.0 -4.05486903006e-14 -6.24149440898e-14 58.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -59 59.0 1 5 1 1 0.5 0.5 0.5 0.057665178562 0.178753256798 0.228810757399 0.239380404353 -0.00167655316181 -0.0027051072102 0.00703151477501 1.0 7.56650059448e-14 7.56649314059e-14 -3.3271399958e-14 0.515038073063 -0.857167303562 1.44284839068e-13 0.857167303562 0.515038073063 1.0 -4.00271416218e-14 -6.35444252555e-14 59.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -60 60.0 1 5 1 1 0.5 0.5 0.5 0.0604909854062 0.186547547579 0.239586278796 0.250017344952 -0.00180981971789 -0.00291019980796 0.00704179238528 1.0 7.61051039354e-14 7.61050361728e-14 -3.6004626201e-14 0.5 -0.866025388241 1.44513903882e-13 0.866025388241 0.5 1.0 -3.94958825573e-14 -6.47265850943e-14 60.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -61 61.0 1 5 1 1 0.5 0.5 0.5 0.0631217688617 0.193791866302 0.249607756734 0.259886533022 -0.00194548477884 -0.00310831447132 0.00705294730142 1.0 7.65807705336e-14 7.65806959947e-14 -3.87961283108e-14 0.48480963707 -0.874619722366 1.44762877358e-13 0.874619722366 0.48480963707 1.0 -3.89781861843e-14 -6.59583268537e-14 61.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -62 62.0 1 5 1 1 0.5 0.5 0.5 0.0655460742438 0.20045940578 0.258834958076 0.268953949213 -0.00208330713212 -0.00330717721954 0.00706291478127 1.0 7.70926562605e-14 7.70925749453e-14 -4.16352980467e-14 0.46947157383 -0.882947564125 1.44959158609e-13 0.882947564125 0.46947157383 1.0 -3.84318262164e-14 -6.72338636046e-14 62.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -63 63.0 1 5 1 1 0.5 0.5 0.5 0.0677412166974 0.206590846181 0.267280697823 0.277241885662 -0.00222166883759 -0.00350732635707 0.00707424012944 1.0 7.76414522952e-14 7.764137098e-14 -4.44629108651e-14 0.453990519047 -0.891006529331 1.45192844835e-13 0.891006529331 0.453990519047 1.0 -3.79073942375e-14 -6.85204659939e-14 63.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -64 64.0 1 5 1 1 0.5 0.5 0.5 0.0697129410434 0.212010905147 0.274793446064 0.284571915865 -0.00236255140044 -0.00370562658645 0.00708921952173 1.0 7.82279175791e-14 7.82278430402e-14 -4.73467022966e-14 0.438371151686 -0.898794054985 1.45545264751e-13 0.898794054985 0.438371151686 1.0 -3.74487496135e-14 -6.98572872725e-14 64.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -65 65.0 1 5 1 1 0.5 0.5 0.5 0.0714181561332 0.216807678342 0.281412482262 0.290993452072 -0.00250276038423 -0.00390887679532 0.00710331602022 1.0 7.88528652638e-14 7.88527839486e-14 -5.01717130298e-14 0.42261826992 -0.906307756901 1.45856701825e-13 0.906307756901 0.42261826992 1.0 -3.69653241935e-14 -7.11814369383e-14 65.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -66 66.0 1 5 1 1 0.5 0.5 0.5 0.0728654392243 0.220906943083 0.287071973085 0.296444416046 -0.00265323766507 -0.00410525733605 0.00711599038914 1.0 7.95171356061e-14 7.95170542909e-14 -5.33217404692e-14 0.406736671925 -0.913545429707 1.46108494227e-13 0.913545429707 0.406736671925 1.0 -3.64467062487e-14 -7.27051272377e-14 66.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -67 67.0 1 5 1 1 0.5 0.5 0.5 0.0740421446261 0.224261745811 0.291689932346 0.300876945257 -0.00280131306499 -0.00430715922266 0.00713248644024 1.0 8.0221656954e-14 8.02215688626e-14 -5.63473692618e-14 0.390731155872 -0.920504868031 1.46486108291e-13 0.920504868031 0.390731155872 1.0 -3.59935876677e-14 -7.41815937562e-14 67.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -68 68.0 1 5 1 1 0.5 0.5 0.5 0.0749262839347 0.22694632411 0.295370638371 0.30431458354 -0.00294701498933 -0.00449755322188 0.00714947842062 1.0 8.09673915371e-14 8.09673034456e-14 -5.92471696161e-14 0.374606609344 -0.927183866501 1.46872639918e-13 0.927183866501 0.374606609344 1.0 -3.55405978356e-14 -7.56131336471e-14 68.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -69 69.0 1 5 1 1 0.5 0.5 0.5 0.0755447188712 0.228792086244 0.297914654016 0.306645393372 -0.00310259847902 -0.00470214849338 0.00716820033267 1.0 8.17553557947e-14 8.17552677033e-14 -6.24511022323e-14 0.358367979527 -0.93358039856 1.47312107716e-13 0.93358039856 0.358367979527 1.0 -3.51104440118e-14 -7.7233013008e-14 69.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -70 70.0 1 5 1 1 0.5 0.5 0.5 0.0758345472717 0.229867011309 0.299378037453 0.307846367359 -0.00326239760034 -0.00490199634805 0.00718151498586 1.0 8.25866474817e-14 8.2586552614e-14 -6.57566788021e-14 0.342020153999 -0.939692616463 1.47553288489e-13 0.939692616463 0.342020153999 1.0 -3.45680752631e-14 -7.89318358395e-14 70.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -71 71.0 1 5 1 1 0.5 0.5 0.5 0.0758360864293 0.230157241225 0.299764603376 0.307952821255 -0.00342002091929 -0.00510233594105 0.00720483297482 1.0 8.34623914577e-14 8.34623033663e-14 -6.89357628598e-14 0.325568169355 -0.945518553257 1.48140492386e-13 0.945518553257 0.325568169355 1.0 -3.42024992312e-14 -8.05897232628e-14 71.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -72 72.0 1 5 1 1 0.5 0.5 0.5 0.075525141316 0.229602411389 0.298972666264 0.306899368763 -0.00358790112659 -0.0052975253202 0.00721790129319 1.0 8.43837938977e-14 8.438369903e-14 -7.24243798614e-14 0.309017002583 -0.951056480408 1.48359772276e-13 0.951056480408 0.309017002583 1.0 -3.36342078863e-14 -8.24389384882e-14 72.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -73 73.0 1 5 1 1 0.5 0.5 0.5 0.0749000000883 0.228239625692 0.29704400897 0.304708212614 -0.00375670660287 -0.00549271516502 0.00723527790979 1.0 8.5352121963e-14 8.53520203191e-14 -7.58904522341e-14 0.292371720076 -0.956304728985 1.48725527878e-13 0.956304728985 0.292371720076 1.0 -3.3134577032e-14 -8.43050130574e-14 73.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -74 74.0 1 5 1 1 0.5 0.5 0.5 0.0739484623657 0.225991547108 0.293922573328 0.301260143518 -0.00392613513395 -0.00569652067497 0.00725413672626 1.0 8.63686766962e-14 8.63685818285e-14 -7.93205019896e-14 0.275637388229 -0.961261689663 1.49138825747e-13 0.961261689663 0.275637388229 1.0 -3.26499251084e-14 -8.6183183257e-14 74.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -75 75.0 1 5 1 1 0.5 0.5 0.5 0.072654064954 0.22285503149 0.289548963308 0.296567112207 -0.00410118186846 -0.00588755588979 0.00727464165539 1.0 8.74348607838e-14 8.74347591399e-14 -8.2887859174e-14 0.258819073439 -0.965925812721 1.49606293066e-13 0.965925812721 0.258819073439 1.0 -3.21823527571e-14 -8.81655249567e-14 75.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -76 76.0 1 5 1 1 0.5 0.5 0.5 0.0710590306271 0.218880146742 0.284022808075 0.290706813335 -0.00428106123582 -0.00608264096081 0.00729729793966 1.0 8.85520972413e-14 8.85519955973e-14 -8.65618002082e-14 0.241921916604 -0.970295727253 1.50146700086e-13 0.970295727253 0.241921916604 1.0 -3.17401744536e-14 -9.02373878744e-14 76.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -77 77.0 1 5 1 1 0.5 0.5 0.5 0.0691430442849 0.214006558061 0.277257710695 0.283598601818 -0.00446529500186 -0.00628326507285 0.00731486734003 1.0 8.97219039515e-14 8.97218023076e-14 -9.03223757722e-14 0.224951073527 -0.974370062351 1.5050570653e-13 0.974370062351 0.224951073527 1.0 -3.11913851952e-14 -9.23900916167e-14 77.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -78 78.0 1 5 1 1 0.5 0.5 0.5 0.0668996797354 0.208257958293 0.269263744354 0.275259256363 -0.00465713022277 -0.00647377641872 0.00733389845118 1.0 9.09458462315e-14 9.09457378113e-14 -9.42809808631e-14 0.207911714911 -0.978147566319 1.50915440084e-13 0.978147566319 0.207911714911 1.0 -3.06547254486e-14 -9.46824541513e-14 78.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -79 79.0 1 5 1 1 0.5 0.5 0.5 0.0643428410009 0.201603919268 0.260032474995 0.265651851892 -0.00485096639022 -0.00666582910344 0.00735527323559 1.0 9.22255503845e-14 9.2225435188e-14 -9.82367805808e-14 0.190809011459 -0.981627166271 1.51408264181e-13 0.981627166271 0.190809011459 1.0 -3.0145265624e-14 -9.70135769136e-14 79.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -80 80.0 1 5 1 1 0.5 0.5 0.5 0.0614645414137 0.194048047066 0.249545291066 0.254766076803 -0.00505235884339 -0.00686362525448 0.00737208453938 1.0 9.35626901476e-14 9.35625817274e-14 -1.02382444428e-13 0.17364820838 -0.984807729721 1.51741778322e-13 0.984807729721 0.17364820838 1.0 -2.95383529648e-14 -9.94839518924e-14 80.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -81 81.0 1 5 1 1 0.5 0.5 0.5 0.0582718432416 0.185640856624 0.237853914499 0.242651328444 -0.00525587564334 -0.00704948464409 0.00739240786061 1.0 9.49590273492e-14 9.49589053765e-14 -1.06522917657e-13 0.156434491277 -0.987688362598 1.52202360958e-13 0.987688362598 0.156434491277 1.0 -2.89785014561e-14 -1.01996719176e-13 81.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -82 82.0 1 5 1 1 0.5 0.5 0.5 0.0548411210712 0.176334485412 0.224956199527 0.229332342744 -0.00546766957268 -0.00723874382675 0.00740870647132 1.0 9.64163441469e-14 9.64162289504e-14 -1.10871842306e-13 0.13917312026 -0.990268051624 1.52525670045e-13 0.990268051624 0.13917312026 1.0 -2.833043316e-14 -1.04662663898e-13 82.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -83 83.0 1 5 1 1 0.5 0.5 0.5 0.0511313149972 0.166156679392 0.210826560855 0.214756399393 -0.00568466819823 -0.00742362486199 0.00743296789005 1.0 9.79365040129e-14 9.79363888164e-14 -1.15317233844e-13 0.121869370341 -0.992546141148 1.53136387577e-13 0.992546141148 0.121869370341 1.0 -2.78072717305e-14 -1.07427616607e-13 83.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -84 84.0 1 5 1 1 0.5 0.5 0.5 0.0472034591648 0.155100286007 0.195493191481 0.198953047395 -0.00591072347015 -0.00760667771101 0.00744895776734 1.0 9.95214110774e-14 9.95212891047e-14 -1.19991419145e-13 0.104528486729 -0.994521915913 1.53463518477e-13 0.994521915913 0.104528486729 1.0 -2.7119679183e-14 -1.10360986571e-13 84.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -85 85.0 1 5 1 1 0.5 0.5 0.5 0.0431223359335 0.143299892545 0.179094478488 0.182078793645 -0.0061384961009 -0.00779581116512 0.00746519910172 1.0 1.01173003352e-13 1.01172881379e-13 -1.24631763785e-13 0.0871557667851 -0.996194720268 1.53809826204e-13 0.996194720268 0.0871557667851 1.0 -2.64190067528e-14 -1.13333658864e-13 85.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -86 86.0 1 5 1 1 0.5 0.5 0.5 0.0389558933784 0.130603894591 0.161492869258 0.163967981935 -0.00637407042086 -0.00797392893583 0.00748812500387 1.0 1.02893273058e-13 1.02893144309e-13 -1.29449253508e-13 0.069756500423 -0.997564077377 1.54404497543e-13 0.997564077377 0.069756500423 1.0 -2.58185688134e-14 -1.16454941393e-13 86.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -87 87.0 1 5 1 1 0.5 0.5 0.5 0.0348200893229 0.117140188813 0.142814710736 0.144770666957 -0.00661494443193 -0.00814818497747 0.0075002736412 1.0 1.04684239521e-13 1.04684103996e-13 -1.34351825997e-13 0.0523359812796 -0.998629510403 1.5463373854e-13 0.998629510403 0.0523359812796 1.0 -2.50090916129e-14 -1.19682055607e-13 87.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -88 88.0 1 5 1 1 0.5 0.5 0.5 0.0309165569603 0.102922193706 0.123093500733 0.124490439892 -0.00686429999769 -0.0083291567862 0.00751314265653 1.0 1.06547935622e-13 1.06547800097e-13 -1.39447996336e-13 0.0348995216191 -0.99939084053 1.54905873285e-13 0.99939084053 0.0348995216191 1.0 -2.41937732733e-14 -1.23072938559e-13 88.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -89 89.0 1 5 1 1 0.5 0.5 0.5 0.0275482477894 0.0879731550813 0.102374792099 0.103184834123 -0.00712391687557 -0.00850248057395 0.00752882473171 1.0 1.08486421344e-13 1.08486279042e-13 -1.44796799334e-13 0.0174524337053 -0.999847710133 1.55297460004e-13 0.999847710133 0.0174524337053 1.0 -2.34091547958e-14 -1.26660902361e-13 89.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 -90 90.0 1 5 1 1 0.5 0.5 0.5 0.0251206236511 0.0723270624876 0.0806358680129 0.0808931067586 -0.00738708348945 -0.00866825506091 0.00754283368587 1.0 1.10501756671e-13 1.10501614369e-13 -1.50157664081e-13 2.67917759089e-08 -1.0 1.55653268052e-13 1.0 2.67920814423e-08 1.0 -2.25758302298e-14 -1.30329706988e-13 90.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 31000000.0 diff --git a/examples/MSC.Marc/reference_postProc/rotation_90deg_inc90.txt b/examples/MSC.Marc/reference_postProc/rotation_90deg_inc90.txt deleted file mode 100644 index ebee6aed8..000000000 --- a/examples/MSC.Marc/reference_postProc/rotation_90deg_inc90.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 header -inc elem node ip grain ip.x ip.y ip.z 1_1_p 1_2_p 1_3_p 1_4_p 1_5_p 1_6_p 1_7_p 1_8_p 1_9_p 1_1_div(p) 1_2_div(p) 1_3_div(p) 1_norm(div(p)) -90 1 5 1 1 0.5 0.5 0.5 0.0723270624876 0.00754283322021 0.00738708395511 -0.00738708348945 -0.00866825319827 -0.0806358680129 0.00754283368587 0.0808931067586 0.00866825692356 0.000000 0.000000 0.000000 0.000000 diff --git a/examples/SpectralMethod/EshelbyInclusion/runAll.sh b/examples/SpectralMethod/EshelbyInclusion/runAll.sh deleted file mode 100755 index cef1128ef..000000000 --- a/examples/SpectralMethod/EshelbyInclusion/runAll.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -for geom in $(ls geom/*.geom) -do - base=${geom%.geom} - base=${base#geom/} - name=${base}_thermal - vtr=${base}.vtr - - [[ -f ${name}.spectralOut ]] || \ - DAMASK_spectral \ - --workingdir ./ \ - --load thermal.load \ - --geom $geom \ - > ${name}.out - - if [ ! -f postProc/${name}_inc10.txt ] - then - postResults ${name}.spectralOut \ - --ho temperature \ - --cr f,fe,fi,fp,p \ - --split \ - --separation x,y,z \ - - addCauchy postProc/${name}_inc*.txt \ - - addDeviator postProc/${name}_inc*.txt \ - --spherical \ - --tensor p,Cauchy \ - - addDisplacement postProc/${name}_inc*.txt \ - --nodal \ - - fi - - geom_check ${geom} - - for inc in {00..10} - do - echo "generating postProc/${name}_inc${inc}.vtr" - cp geom/${vtr} postProc/${name}_inc${inc}.vtr - vtk_addRectilinearGridData \ - postProc/${name}_inc${inc}.txt \ - --vtk postProc/${name}_inc${inc}.vtr \ - --data 'sph(p)','sph(Cauchy)',temperature \ - --tensor f,fe,fi,fp,p,Cauchy \ - - vtk_addRectilinearGridData \ - postProc/${name}_inc${inc}_nodal.txt \ - --vtk postProc/${name}_inc${inc}.vtr \ - --data 'avg(f).pos','fluct(f).pos' \ - - done -done From ce08571cd8f01b3db600f87827fb476209a40fdf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 13:39:52 +0100 Subject: [PATCH 25/75] documentation was outdated --- src/quit.f90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/quit.f90 b/src/quit.f90 index 146071600..bc4987c2d 100644 --- a/src/quit.f90 +++ b/src/quit.f90 @@ -2,8 +2,7 @@ !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief quit subroutine !> @details exits the program and reports current time and duration. Exit code 0 signals -!> everything is fine. Exit code 1 signals an error, message according to IO_error. Exit code -!> 2 signals no severe problems, but some increments did not converge +!> everything is fine. Exit code 1 signals an error, message according to IO_error. !-------------------------------------------------------------------------------------------------- subroutine quit(stop_id) #include From 27a6d1d682432ab35fef76ff4e18e13547c5f222 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 15:14:12 +0100 Subject: [PATCH 26/75] private functions do not need a prefix --- src/IO.f90 | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 9a0c94661..6d8506506 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -13,6 +13,8 @@ module IO private character(len=*), parameter, public :: & IO_EOF = '#EOF#' !< end of file string + character, parameter, public :: & + IO_EOL = new_line(' ') !< end of line str character(len=*), parameter, private :: & IO_DIVIDER = '───────────────────'//& '───────────────────'//& @@ -47,10 +49,6 @@ module IO #endif #endif - private :: & - IO_verifyFloatValue, & - IO_verifyIntValue - contains @@ -102,7 +100,7 @@ function IO_read_ASCII(fileName) result(fileContent) ! count lines to allocate string array myTotalLines = 1 do l=1, len(rawData) - if (rawData(l:l) == new_line('')) myTotalLines = myTotalLines+1 + if (rawData(l:l) == IO_EOL) myTotalLines = myTotalLines+1 enddo allocate(fileContent(myTotalLines)) @@ -112,7 +110,7 @@ function IO_read_ASCII(fileName) result(fileContent) startPos = 1 l = 1 do while (l <= myTotalLines) - endPos = merge(startPos + scan(rawData(startPos:),new_line('')) - 2,len(rawData),l /= myTotalLines) + endPos = merge(startPos + scan(rawData(startPos:),IO_EOL) - 2,len(rawData),l /= myTotalLines) if (endPos - startPos > pStringLen-1) then line = rawData(startPos:startPos+pStringLen-1) if (.not. warned) then @@ -418,7 +416,7 @@ real(pReal) function IO_floatValue (string,chunkPos,myChunk) call IO_warning(201,el=myChunk,ext_msg=MYNAME//trim(string)) else valuePresent IO_floatValue = & - IO_verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& + verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& VALIDCHARACTERS,MYNAME) endif valuePresent @@ -441,7 +439,7 @@ integer function IO_intValue(string,chunkPos,myChunk) valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1) then call IO_warning(201,el=myChunk,ext_msg=MYNAME//trim(string)) else valuePresent - IO_intValue = IO_verifyIntValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& + IO_intValue = verifyIntValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& VALIDCHARACTERS,MYNAME) endif valuePresent @@ -467,12 +465,12 @@ real(pReal) function IO_fixedNoEFloatValue (string,ends,myChunk) pos_exp = scan(string(ends(myChunk)+1:ends(myChunk+1)),'+-',back=.true.) hasExponent: if (pos_exp > 1) then - base = IO_verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk)+pos_exp-1))),& + base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk)+pos_exp-1))),& VALIDBASE,MYNAME//'(base): ') - expon = IO_verifyIntValue(trim(adjustl(string(ends(myChunk)+pos_exp:ends(myChunk+1)))),& + expon = verifyIntValue(trim(adjustl(string(ends(myChunk)+pos_exp:ends(myChunk+1)))),& VALIDEXP,MYNAME//'(exp): ') else hasExponent - base = IO_verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),& + base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),& VALIDBASE,MYNAME//'(base): ') expon = 0 endif hasExponent @@ -492,7 +490,7 @@ integer function IO_fixedIntValue(string,ends,myChunk) character(len=*), parameter :: MYNAME = 'IO_fixedIntValue: ' character(len=*), parameter :: VALIDCHARACTERS = '0123456789+-' - IO_fixedIntValue = IO_verifyIntValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),& + IO_fixedIntValue = verifyIntValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),& VALIDCHARACTERS,MYNAME) end function IO_fixedIntValue @@ -1128,34 +1126,34 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN) !-------------------------------------------------------------------------------------------------- !> @brief returns verified integer value in given string !-------------------------------------------------------------------------------------------------- -integer function IO_verifyIntValue (string,validChars,myName) +integer function verifyIntValue (string,validChars,myName) character(len=*), intent(in) :: string, & !< string for conversion to int value. Must not contain spaces! validChars, & !< valid characters in string myName !< name of caller function (for debugging) integer :: readStatus, invalidWhere - IO_verifyIntValue = 0 + verifyIntValue = 0 invalidWhere = verify(string,validChars) if (invalidWhere == 0) then - read(UNIT=string,iostat=readStatus,FMT=*) IO_verifyIntValue ! no offending chars found + read(UNIT=string,iostat=readStatus,FMT=*) verifyIntValue ! no offending chars found if (readStatus /= 0) & ! error during string to integer conversion call IO_warning(203,ext_msg=myName//'"'//string//'"') else call IO_warning(202,ext_msg=myName//'"'//string//'"') ! complain about offending characters - read(UNIT=string(1:invalidWhere-1),iostat=readStatus,FMT=*) IO_verifyIntValue ! interpret remaining string + read(UNIT=string(1:invalidWhere-1),iostat=readStatus,FMT=*) verifyIntValue ! interpret remaining string if (readStatus /= 0) & ! error during string to integer conversion call IO_warning(203,ext_msg=myName//'"'//string(1:invalidWhere-1)//'"') endif -end function IO_verifyIntValue +end function verifyIntValue !-------------------------------------------------------------------------------------------------- !> @brief returns verified float value in given string !-------------------------------------------------------------------------------------------------- -real(pReal) function IO_verifyFloatValue (string,validChars,myName) +real(pReal) function verifyFloatValue (string,validChars,myName) character(len=*), intent(in) :: string, & !< string for conversion to int value. Must not contain spaces! validChars, & !< valid characters in string @@ -1163,20 +1161,20 @@ real(pReal) function IO_verifyFloatValue (string,validChars,myName) integer :: readStatus, invalidWhere - IO_verifyFloatValue = 0.0_pReal + verifyFloatValue = 0.0_pReal invalidWhere = verify(string,validChars) if (invalidWhere == 0) then - read(UNIT=string,iostat=readStatus,FMT=*) IO_verifyFloatValue ! no offending chars found + read(UNIT=string,iostat=readStatus,FMT=*) verifyFloatValue ! no offending chars found if (readStatus /= 0) & ! error during string to float conversion call IO_warning(203,ext_msg=myName//'"'//string//'"') else call IO_warning(202,ext_msg=myName//'"'//string//'"') ! complain about offending characters - read(UNIT=string(1:invalidWhere-1),iostat=readStatus,FMT=*) IO_verifyFloatValue ! interpret remaining string + read(UNIT=string(1:invalidWhere-1),iostat=readStatus,FMT=*) verifyFloatValue ! interpret remaining string if (readStatus /= 0) & ! error during string to float conversion call IO_warning(203,ext_msg=myName//'"'//string(1:invalidWhere-1)//'"') endif -end function IO_verifyFloatValue +end function verifyFloatValue end module IO From 97e7f510e2160d366c622738bdc1c6203a8e1750 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 16:27:17 +0100 Subject: [PATCH 27/75] wrong time was reported in case of trailing inactive increments --- python/damask/dadf5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index edba4515c..f6ea959bd 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -102,7 +102,7 @@ class DADF5(): elif datasets is False: datasets = [] choice = [datasets] if isinstance(datasets,str) else datasets - + valid = [e for e_ in [glob.fnmatch.filter(getattr(self,what),s) for s in choice] for e in e_] existing = set(self.visible[what]) @@ -339,8 +339,8 @@ class DADF5(): """Return information on all active datasets in the file.""" message = '' with h5py.File(self.fname,'r') as f: - for s,i in enumerate(self.iter_visible('increments')): - message+='\n{} ({}s)\n'.format(i,self.times[s]) + for i in self.iter_visible('increments'): + message+='\n{} ({}s)\n'.format(i,self.times[self.increments.index(i)]) for o,p in zip(['constituents','materialpoints'],['con_physics','mat_physics']): for oo in self.iter_visible(o): message+=' {}\n'.format(oo) From a3664bbde183f82988ad675cdfbcceed2a9b2381 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 17:46:14 +0100 Subject: [PATCH 28/75] need to reverse F->C flip --- processing/pre/geom_toTable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/pre/geom_toTable.py b/processing/pre/geom_toTable.py index 53196e808..494bbaffa 100755 --- a/processing/pre/geom_toTable.py +++ b/processing/pre/geom_toTable.py @@ -40,7 +40,7 @@ for name in filenames: "homogenization\t{}".format(geom.homogenization)] table = damask.Table(coord0,{'pos':(3,)},comments) - table.add('microstructure',geom.microstructure.reshape((-1,1))) + table.add('microstructure',geom.microstructure.reshape((-1,1),order='F')) table.to_ASCII(sys.stdout if name is None else \ os.path.splitext(name)[0]+'.txt') From 49f3de44b9cf6e3448a5047dd3b9187312aa78dc Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 18:02:13 +0100 Subject: [PATCH 29/75] limit import statements (numpy already in use) --- python/damask/colormaps.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/python/damask/colormaps.py b/python/damask/colormaps.py index b38d47070..ad924325f 100644 --- a/python/damask/colormaps.py +++ b/python/damask/colormaps.py @@ -1,5 +1,3 @@ -import math - import numpy as np class Color(): @@ -328,11 +326,11 @@ class Color(): if self.model != 'CIELAB': return Msh = np.zeros(3,'d') - Msh[0] = math.sqrt(np.dot(self.color,self.color)) + Msh[0] = np.sqrt(np.dot(self.color,self.color)) if (Msh[0] > 0.001): - Msh[1] = math.acos(self.color[0]/Msh[0]) + Msh[1] = np.acos(self.color[0]/Msh[0]) if (self.color[1] != 0.0): - Msh[2] = math.atan2(self.color[2],self.color[1]) + Msh[2] = np.atan2(self.color[2],self.color[1]) converted = Color('MSH', Msh) self.model = converted.model @@ -349,9 +347,9 @@ class Color(): if self.model != 'MSH': return Lab = np.zeros(3,'d') - Lab[0] = self.color[0] * math.cos(self.color[1]) - Lab[1] = self.color[0] * math.sin(self.color[1]) * math.cos(self.color[2]) - Lab[2] = self.color[0] * math.sin(self.color[1]) * math.sin(self.color[2]) + Lab[0] = self.color[0] * np.cos(self.color[1]) + Lab[1] = self.color[0] * np.sin(self.color[1]) * np.cos(self.color[2]) + Lab[2] = self.color[0] * np.sin(self.color[1]) * np.sin(self.color[2]) converted = Color('CIELAB', Lab) self.model = converted.model @@ -476,14 +474,14 @@ class Colormap(): if Msh_sat[0] >= Msh_unsat[0]: return Msh_sat[2] else: - hSpin = Msh_sat[1]/math.sin(Msh_sat[1])*math.sqrt(Msh_unsat[0]**2.0-Msh_sat[0]**2)/Msh_sat[0] - if Msh_sat[2] < - math.pi/3.0: hSpin *= -1.0 + hSpin = Msh_sat[1]/np.sin(Msh_sat[1])*np.sqrt(Msh_unsat[0]**2.0-Msh_sat[0]**2)/Msh_sat[0] + if Msh_sat[2] < - np.pi/3.0: hSpin *= -1.0 return Msh_sat[2] + hSpin Msh1 = np.array(lo[:]) Msh2 = np.array(hi[:]) - if (Msh1[1] > 0.05 and Msh2[1] > 0.05 and rad_diff(Msh1,Msh2) > math.pi/3.0): + if (Msh1[1] > 0.05 and Msh2[1] > 0.05 and rad_diff(Msh1,Msh2) > np.pi/3.0): M_mid = max(Msh1[0],Msh2[0],88.0) if frac < 0.5: Msh2 = np.array([M_mid,0.0,0.0],'d') From e0110c676ec4ab36ec699a7205ecf83c23039000 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 18:44:51 +0100 Subject: [PATCH 30/75] avoid long lines --- src/prec.f90 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/prec.f90 b/src/prec.f90 index 2f0f20a00..4c4449551 100644 --- a/src/prec.f90 +++ b/src/prec.f90 @@ -79,9 +79,12 @@ module prec real(pReal), private, parameter :: PREAL_EPSILON = epsilon(0.0_pReal) !< minimum positive number such that 1.0 + EPSILON /= 1.0. real(pReal), private, parameter :: PREAL_MIN = tiny(0.0_pReal) !< smallest normalized floating point number - integer, dimension(0), parameter, public :: emptyIntArray = [integer::] - real(pReal), dimension(0), parameter, public :: emptyRealArray = [real(pReal)::] - character(len=pStringLen), dimension(0), parameter, public :: emptyStringArray = [character(len=pStringLen)::] + integer, dimension(0), parameter, public :: & + emptyIntArray = [integer::] + real(pReal), dimension(0), parameter, public :: & + emptyRealArray = [real(pReal)::] + character(len=pStringLen), dimension(0), parameter, public :: & + emptyStringArray = [character(len=pStringLen)::] private :: & unitTest From 6a0593bf9e27e709e3efd3f55aab63a3c4dab2e6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 19:47:48 +0100 Subject: [PATCH 31/75] everything is anyway public --- src/geometry_plastic_nonlocal.f90 | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/geometry_plastic_nonlocal.f90 b/src/geometry_plastic_nonlocal.f90 index b69ab2eff..7890af5aa 100644 --- a/src/geometry_plastic_nonlocal.f90 +++ b/src/geometry_plastic_nonlocal.f90 @@ -10,32 +10,24 @@ module geometry_plastic_nonlocal use results implicit none - private + public - integer, public, protected :: & + integer, protected :: & geometry_plastic_nonlocal_nIPneighbors - integer, dimension(:,:,:,:), allocatable, public, protected :: & + integer, dimension(:,:,:,:), allocatable, protected :: & geometry_plastic_nonlocal_IPneighborhood !< 6 or less neighboring IPs as [element ID, IP ID, face ID that point to me] - real(pReal), dimension(:,:), allocatable, public, protected :: & + real(pReal), dimension(:,:), allocatable, protected :: & geometry_plastic_nonlocal_IPvolume0 !< volume associated with IP (initially!) - real(pReal), dimension(:,:,:), allocatable, public, protected :: & + real(pReal), dimension(:,:,:), allocatable, protected :: & geometry_plastic_nonlocal_IParea0 !< area of interface to neighboring IP (initially!) - real(pReal), dimension(:,:,:,:), allocatable, public, protected :: & + real(pReal), dimension(:,:,:,:), allocatable, protected :: & geometry_plastic_nonlocal_IPareaNormal0 !< area normal of interface to neighboring IP (initially!) - public :: & - geometry_plastic_nonlocal_setIPneighborhood, & - geometry_plastic_nonlocal_setIPvolume, & - geometry_plastic_nonlocal_setIParea, & - geometry_plastic_nonlocal_setIPareaNormal, & - geometry_plastic_nonlocal_results, & - geometry_plastic_nonlocal_disable - contains !--------------------------------------------------------------------------------------------------- @@ -96,7 +88,7 @@ end subroutine geometry_plastic_nonlocal_setIPareaNormal !--------------------------------------------------------------------------------------------------- -!> @brief Frees memory used by variables only needed by plastic_nonlocal +!> @brief Free memory used by variables only needed by plastic_nonlocal !--------------------------------------------------------------------------------------------------- subroutine geometry_plastic_nonlocal_disable @@ -116,7 +108,7 @@ end subroutine geometry_plastic_nonlocal_disable !--------------------------------------------------------------------------------------------------- -!> @brief Writes geometry data to results file +!> @brief Write geometry data to results file !--------------------------------------------------------------------------------------------------- subroutine geometry_plastic_nonlocal_results From 1ad846482106044ec91095e96cb8471cf6c73303 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 20:38:40 +0100 Subject: [PATCH 32/75] not needed object-oriented mesh did not work out nicely --- src/commercialFEM_fileList.f90 | 3 +- src/mesh_FEM.f90 | 33 --------------- src/mesh_abaqus.f90 | 1 - src/mesh_base.f90 | 74 ---------------------------------- src/mesh_marc.f90 | 1 - 5 files changed, 1 insertion(+), 111 deletions(-) delete mode 100644 src/mesh_base.f90 diff --git a/src/commercialFEM_fileList.f90 b/src/commercialFEM_fileList.f90 index 79a385818..31bddd141 100644 --- a/src/commercialFEM_fileList.f90 +++ b/src/commercialFEM_fileList.f90 @@ -1,7 +1,7 @@ !-------------------------------------------------------------------------------------------------- !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief all DAMASK files without solver -!> @details List of files needed by MSC.Marc, Abaqus/Explicit, and Abaqus/Standard +!> @details List of files needed by MSC.Marc and Abaqus/Standard !-------------------------------------------------------------------------------------------------- #include "IO.f90" #include "numerics.f90" @@ -15,7 +15,6 @@ #include "rotations.f90" #include "FEsolving.f90" #include "element.f90" -#include "mesh_base.f90" #include "HDF5_utilities.f90" #include "results.f90" #include "geometry_plastic_nonlocal.f90" diff --git a/src/mesh_FEM.f90 b/src/mesh_FEM.f90 index 4b4ff18aa..28d09a9f5 100644 --- a/src/mesh_FEM.f90 +++ b/src/mesh_FEM.f90 @@ -20,7 +20,6 @@ module mesh use FEsolving use FEM_Zoo use prec - use mesh_base implicit none private @@ -53,18 +52,6 @@ module mesh PetscInt, dimension(:), allocatable, public, protected :: & mesh_boundaries - - type, public, extends(tMesh) :: tMesh_FEM - - - contains - procedure, pass(self) :: tMesh_FEM_init - generic, public :: init => tMesh_FEM_init - end type tMesh_FEM - - type(tMesh_FEM), public, protected :: theMesh - - public :: & mesh_init, & mesh_FEM_build_ipVolumes, & @@ -72,24 +59,6 @@ module mesh contains -subroutine tMesh_FEM_init(self,dimen,order,nodes) - - integer, intent(in) :: dimen - integer, intent(in) :: order - real(pReal), intent(in), dimension(:,:) :: nodes - class(tMesh_FEM) :: self - - if (dimen == 2) then - if (order == 1) call self%tMesh%init('mesh',1,nodes) - if (order == 2) call self%tMesh%init('mesh',2,nodes) - elseif(dimen == 3) then - if (order == 1) call self%tMesh%init('mesh',6,nodes) - if (order == 2) call self%tMesh%init('mesh',8,nodes) - endif - - end subroutine tMesh_FEM_init - - !-------------------------------------------------------------------------------------------------- !> @brief initializes the mesh by calling all necessary private routines the mesh module @@ -217,8 +186,6 @@ subroutine mesh_init forall (j = 1:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal) - call theMesh%init(dimplex,integrationOrder,mesh_node0) - call theMesh%setNelems(mesh_NcpElems) call discretization_init(mesh_element(3,:),mesh_element(4,:),& reshape(mesh_ipCoordinates,[3,mesh_maxNips*mesh_NcpElems]), & diff --git a/src/mesh_abaqus.f90 b/src/mesh_abaqus.f90 index 15332b3fb..f4f5113e8 100644 --- a/src/mesh_abaqus.f90 +++ b/src/mesh_abaqus.f90 @@ -7,7 +7,6 @@ !-------------------------------------------------------------------------------------------------- module mesh use prec - use mesh_base use geometry_plastic_nonlocal use discretization use math diff --git a/src/mesh_base.f90 b/src/mesh_base.f90 deleted file mode 100644 index dab7059ee..000000000 --- a/src/mesh_base.f90 +++ /dev/null @@ -1,74 +0,0 @@ -!-------------------------------------------------------------------------------------------------- -!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH -!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH -!> @author Christoph Koords, Max-Planck-Institut für Eisenforschung GmbH -!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH -!> @brief Sets up the mesh for the solvers MSC.Marc,FEM, Abaqus and the spectral solver -!-------------------------------------------------------------------------------------------------- -module mesh_base - - use prec - use element - - implicit none - -!--------------------------------------------------------------------------------------------------- -!> Properties of a whole mesh (consisting of one type of elements) -!--------------------------------------------------------------------------------------------------- - type, public :: tMesh - type(tElement) :: & - elem - real(pReal), dimension(:,:), allocatable, public :: & - ipVolume, & !< volume associated with each IP (initially!) - node_0, & !< node x,y,z coordinates (initially) - node !< node x,y,z coordinates (deformed) - integer(pInt), dimension(:,:), allocatable, public :: & - cellnodeParent !< cellnode's parent element ID, cellnode's intra-element ID - character(pStringLen) :: type = "n/a" - integer(pInt) :: & - Nnodes, & !< total number of nodes in mesh - Nelems = -1_pInt, & - elemType, & - Ncells, & - nIPneighbors, & - NcellNodes - integer(pInt), dimension(:,:), allocatable, public :: & - connectivity - contains - procedure, pass(self) :: tMesh_base_init - procedure :: setNelems => tMesh_base_setNelems ! not needed once we compute the cells from the connectivity - generic, public :: init => tMesh_base_init - end type tMesh - -contains - -subroutine tMesh_base_init(self,meshType,elemType,nodes) - - class(tMesh) :: self - character(len=*), intent(in) :: meshType - integer(pInt), intent(in) :: elemType - real(pReal), dimension(:,:), intent(in) :: nodes - - write(6,'(/,a)') ' <<<+- mesh_base_init -+>>>' - - write(6,*)' mesh type ',meshType - write(6,*)' # node ',size(nodes,2) - - self%type = meshType - call self%elem%init(elemType) - self%node_0 = nodes - self%nNodes = size(nodes,2) - -end subroutine tMesh_base_init - - -subroutine tMesh_base_setNelems(self,Nelems) - - class(tMesh) :: self - integer(pInt), intent(in) :: Nelems - - self%Nelems = Nelems - -end subroutine tMesh_base_setNelems - -end module mesh_base diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index cebe844e7..8de8ee96c 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -9,7 +9,6 @@ module mesh use IO use prec use math - use mesh_base use DAMASK_interface use IO use debug From f633c67fe4647d12c26edb0241aec6ddd6692def Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 20:49:02 +0100 Subject: [PATCH 33/75] polishing --- src/math.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index 0b06c9186..d6d87d30a 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -411,9 +411,9 @@ pure function math_exp33(A,n) endif do i = 1, order - invFac = invFac/real(i,pReal) ! invfac = 1/i! + invFac = invFac/real(i,pReal) ! invfac = 1/(i!) B = matmul(B,A) - math_exp33 = math_exp33 + invFac*B ! exp = SUM (A^i)/i! + math_exp33 = math_exp33 + invFac*B ! exp = SUM (A^i)/(i!) enddo end function math_exp33 @@ -489,8 +489,8 @@ function math_invSym3333(A) real(pReal), dimension(6*(64+2)) :: work logical :: error external :: & - dgetrf, & - dgetri + dgetrf, & + dgetri temp66 = math_sym3333to66(A) call dgetrf(6,6,temp66,6,ipiv6,ierr) @@ -519,8 +519,8 @@ subroutine math_invert(InvA, error, A) real(pReal), dimension(size(A,1)*(64+2)) :: work integer :: ierr external :: & - dgetrf, & - dgetri + dgetrf, & + dgetri invA = A call dgetrf(size(A,1),size(A,1),invA,size(A,1),ipiv,ierr) From c919237998866a09d8fdaf1584a7b6ffba6b4d85 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 21:00:23 +0100 Subject: [PATCH 34/75] one loop is enough --- src/lattice.f90 | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 4aab12fc9..050c7ed87 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -491,13 +491,12 @@ contains !-------------------------------------------------------------------------------------------------- subroutine lattice_init - integer :: Nphases + integer :: Nphases, p character(len=pStringLen) :: & tag = '' - integer :: i,p + real(pReal) :: CoverA real(pReal), dimension(:), allocatable :: & - temp, & - CoverA !< c/a ratio for low symmetry type lattice + temp write(6,'(/,a)') ' <<<+- lattice init -+>>>' @@ -515,15 +514,13 @@ subroutine lattice_init allocate(lattice_specificHeat ( Nphases), source=0.0_pReal) allocate(lattice_referenceTemperature ( Nphases), source=300.0_pReal) - allocate(lattice_mu(Nphases), source=0.0_pReal) - allocate(lattice_nu(Nphases), source=0.0_pReal) + allocate(lattice_mu(Nphases), source=0.0_pReal) + allocate(lattice_nu(Nphases), source=0.0_pReal) allocate(lattice_Scleavage(3,3,3,lattice_maxNcleavage,Nphases),source=0.0_pReal) allocate(lattice_NcleavageSystem(lattice_maxNcleavageFamily,Nphases),source=0) - allocate(CoverA(Nphases),source=0.0_pReal) - do p = 1, size(config_phase) tag = config_phase(p)%getString('lattice_structure') select case(trim(tag(1:3))) @@ -553,7 +550,7 @@ subroutine lattice_init lattice_C66(6,6,p) = config_phase(p)%getFloat('c66',defaultVal=0.0_pReal) - CoverA(p) = config_phase(p)%getFloat('c/a',defaultVal=0.0_pReal) + CoverA = config_phase(p)%getFloat('c/a',defaultVal=0.0_pReal) lattice_thermalConductivity33(1,1,p) = config_phase(p)%getFloat('thermal_conductivity11',defaultVal=0.0_pReal) lattice_thermalConductivity33(2,2,p) = config_phase(p)%getFloat('thermal_conductivity22',defaultVal=0.0_pReal) @@ -573,14 +570,12 @@ subroutine lattice_init lattice_DamageDiffusion33(2,2,p) = config_phase(p)%getFloat( 'damage_diffusion22',defaultVal=0.0_pReal) lattice_DamageDiffusion33(3,3,p) = config_phase(p)%getFloat( 'damage_diffusion33',defaultVal=0.0_pReal) lattice_DamageMobility(p) = config_phase(p)%getFloat( 'damage_mobility',defaultVal=0.0_pReal) - enddo - do i = 1,Nphases - if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) & - .and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131,el=i) ! checking physical significance of c/a - if ((CoverA(i) > 2.0_pReal) & - .and. lattice_structure(i) == LATTICE_bct_ID) call IO_error(131,el=i) ! checking physical significance of c/a - call lattice_initializeStructure(i, CoverA(i)) + if ((CoverA < 1.0_pReal .or. CoverA > 2.0_pReal) & + .and. lattice_structure(p) == LATTICE_hex_ID) call IO_error(131,el=p) ! checking physical significance of c/a + if ((CoverA > 2.0_pReal) & + .and. lattice_structure(p) == LATTICE_bct_ID) call IO_error(131,el=p) ! checking physical significance of c/a + call lattice_initializeStructure(p, CoverA) enddo end subroutine lattice_init From e1168c09b9336a748df5e3b677b9cd4c5356c03e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 21:18:56 +0100 Subject: [PATCH 35/75] use specialized functions --- src/CPFEM2.f90 | 1 - src/constitutive.f90 | 5 ++- src/quit.f90 | 2 +- src/results.f90 | 75 ++++++++++++++++++++++++++++---------------- 4 files changed, 51 insertions(+), 32 deletions(-) diff --git a/src/CPFEM2.f90 b/src/CPFEM2.f90 index 52b96cf70..6b4479b89 100644 --- a/src/CPFEM2.f90 +++ b/src/CPFEM2.f90 @@ -17,7 +17,6 @@ module CPFEM2 use DAMASK_interface use results use discretization - use HDF5 use HDF5_utilities use homogenization use constitutive diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 977c80337..697275367 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -11,7 +11,6 @@ module constitutive use config use material use results - use HDF5_utilities use lattice use discretization use plastic_none @@ -587,11 +586,11 @@ subroutine constitutive_results character(len=pStringLen) :: group do p=1,size(config_name_phase) group = trim('current/constituent')//'/'//trim(config_name_phase(p)) - call HDF5_closeGroup(results_addGroup(group)) + call results_closeGroup(results_addGroup(group)) group = trim(group)//'/plastic' - call HDF5_closeGroup(results_addGroup(group)) + call results_closeGroup(results_addGroup(group)) select case(phase_plasticity(p)) case(PLASTICITY_ISOTROPIC_ID) diff --git a/src/quit.f90 b/src/quit.f90 index bc4987c2d..5c421c86a 100644 --- a/src/quit.f90 +++ b/src/quit.f90 @@ -10,7 +10,7 @@ subroutine quit(stop_id) #ifdef _OPENMP use MPI #endif - use hdf5 + use HDF5 implicit none integer, intent(in) :: stop_id diff --git a/src/results.f90 b/src/results.f90 index d38e629ec..73c5d7dbb 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -68,14 +68,14 @@ subroutine results_init write(6,'(a)') ' https://doi.org/10.1007/s40192-017-0084-5' resultsFile = HDF5_openFile(trim(getSolverJobName())//'.hdf5','w',.true.) - call HDF5_addAttribute(resultsFile,'DADF5_version_major',0) - call HDF5_addAttribute(resultsFile,'DADF5_version_minor',5) - call HDF5_addAttribute(resultsFile,'DAMASK_version',DAMASKVERSION) + call results_addAttribute('DADF5_version_major',0) + call results_addAttribute('DADF5_version_minor',5) + call results_addAttribute('DAMASK_version',DAMASKVERSION) call get_command(commandLine) - call HDF5_addAttribute(resultsFile,'call',trim(commandLine)) - call HDF5_closeGroup(results_addGroup('mapping')) - call HDF5_closeGroup(results_addGroup('mapping/cellResults')) - call HDF5_closeFile(resultsFile) + call results_addAttribute('call',trim(commandLine)) + call results_closeGroup(results_addGroup('mapping')) + call results_closeGroup(results_addGroup('mapping/cellResults')) + call results_closeJobFile end subroutine results_init @@ -110,12 +110,11 @@ subroutine results_addIncrement(inc,time) character(len=pStringLen) :: incChar write(incChar,'(i10)') inc - call HDF5_closeGroup(results_addGroup(trim('inc'//trim(adjustl(incChar))))) + call results_closeGroup(results_addGroup(trim('inc'//trim(adjustl(incChar))))) call results_setLink(trim('inc'//trim(adjustl(incChar))),'current') - call HDF5_addAttribute(resultsFile,'time/s',time,trim('inc'//trim(adjustl(incChar)))) - - call HDF5_closeGroup(results_addGroup('current/constituent')) - call HDF5_closeGroup(results_addGroup('current/materialpoint')) + call results_addAttribute('time/s',time,trim('inc'//trim(adjustl(incChar)))) + call results_closeGroup(results_addGroup('current/constituent')) + call results_closeGroup(results_addGroup('current/materialpoint')) end subroutine results_addIncrement @@ -173,9 +172,14 @@ end subroutine results_setLink !-------------------------------------------------------------------------------------------------- subroutine results_addAttribute_str(attrLabel,attrValue,path) - character(len=*), intent(in) :: attrLabel, attrValue, path + character(len=*), intent(in) :: attrLabel, attrValue + character(len=*), intent(in), optional :: path - call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + if (present(path)) then + call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + else + call HDF5_addAttribute(resultsFile,attrLabel, attrValue) + endif end subroutine results_addAttribute_str @@ -185,10 +189,15 @@ end subroutine results_addAttribute_str !-------------------------------------------------------------------------------------------------- subroutine results_addAttribute_int(attrLabel,attrValue,path) - character(len=*), intent(in) :: attrLabel, path - integer, intent(in) :: attrValue + character(len=*), intent(in) :: attrLabel + integer, intent(in) :: attrValue + character(len=*), intent(in), optional :: path - call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + if (present(path)) then + call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + else + call HDF5_addAttribute(resultsFile,attrLabel, attrValue) + endif end subroutine results_addAttribute_int @@ -198,10 +207,15 @@ end subroutine results_addAttribute_int !-------------------------------------------------------------------------------------------------- subroutine results_addAttribute_real(attrLabel,attrValue,path) - character(len=*), intent(in) :: attrLabel, path - real(pReal), intent(in) :: attrValue + character(len=*), intent(in) :: attrLabel + real(pReal), intent(in) :: attrValue + character(len=*), intent(in), optional :: path - call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + if (present(path)) then + call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + else + call HDF5_addAttribute(resultsFile,attrLabel, attrValue) + endif end subroutine results_addAttribute_real @@ -211,10 +225,15 @@ end subroutine results_addAttribute_real !-------------------------------------------------------------------------------------------------- subroutine results_addAttribute_int_array(attrLabel,attrValue,path) - character(len=*), intent(in) :: attrLabel, path + character(len=*), intent(in) :: attrLabel integer, intent(in), dimension(:) :: attrValue + character(len=*), intent(in), optional :: path - call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + if (present(path)) then + call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + else + call HDF5_addAttribute(resultsFile,attrLabel, attrValue) + endif end subroutine results_addAttribute_int_array @@ -224,10 +243,15 @@ end subroutine results_addAttribute_int_array !-------------------------------------------------------------------------------------------------- subroutine results_addAttribute_real_array(attrLabel,attrValue,path) - character(len=*), intent(in) :: attrLabel, path + character(len=*), intent(in) :: attrLabel real(pReal), intent(in), dimension(:) :: attrValue + character(len=*), intent(in), optional :: path - call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + if (present(path)) then + call HDF5_addAttribute(resultsFile,attrLabel, attrValue, path) + else + call HDF5_addAttribute(resultsFile,attrLabel, attrValue) + endif end subroutine results_addAttribute_real_array @@ -720,7 +744,6 @@ end subroutine results_mapping_materialpoint !!> @brief adds the backward mapping from spatial position and constituent ID to results !!-------------------------------------------------------------------------------------------------- !subroutine HDF5_backwardMappingPhase(material_phase,phasememberat,phase_name,dataspace_size,mpiOffset,mpiOffset_phase) -! use hdf5 ! integer(pInt), intent(in), dimension(:,:,:) :: material_phase, phasememberat ! character(len=*), intent(in), dimension(:) :: phase_name @@ -834,7 +857,6 @@ end subroutine results_mapping_materialpoint !!> @brief adds the backward mapping from spatial position and constituent ID to results !!-------------------------------------------------------------------------------------------------- !subroutine HDF5_backwardMappingHomog(material_homog,homogmemberat,homogenization_name,dataspace_size,mpiOffset,mpiOffset_homog) -! use hdf5 ! integer(pInt), intent(in), dimension(:,:) :: material_homog, homogmemberat ! character(len=*), intent(in), dimension(:) :: homogenization_name @@ -941,7 +963,6 @@ end subroutine results_mapping_materialpoint !!> @brief adds the unique cell to node mapping !!-------------------------------------------------------------------------------------------------- !subroutine HDF5_mappingCells(mapping) -! use hdf5 ! integer(pInt), intent(in), dimension(:) :: mapping From b2d5fc4dc552ad26b35d84801679b0b398d59e1c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 21:35:05 +0100 Subject: [PATCH 36/75] 2020! --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 1ab20178c..3ffc3b9e3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2011-19 Max-Planck-Institut für Eisenforschung GmbH +Copyright 2011-20 Max-Planck-Institut für Eisenforschung GmbH DAMASK is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From 18fc41f33f34767eda1fa7b5f67d475ca7012f9a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 21:36:43 +0100 Subject: [PATCH 37/75] not needed anymore (only python3 and HDF5) --- installation/patch/disable_HDF5 | 57 --------- installation/patch/disable_old_output | 178 -------------------------- installation/patch/python2to3.sh | 8 -- 3 files changed, 243 deletions(-) delete mode 100644 installation/patch/disable_HDF5 delete mode 100644 installation/patch/disable_old_output delete mode 100755 installation/patch/python2to3.sh diff --git a/installation/patch/disable_HDF5 b/installation/patch/disable_HDF5 deleted file mode 100644 index bbba30c4a..000000000 --- a/installation/patch/disable_HDF5 +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/src/DAMASK_grid.f90 b/src/DAMASK_grid.f90 -index 496bfd0d..7b0f499c 100644 ---- a/src/DAMASK_grid.f90 -+++ b/src/DAMASK_grid.f90 -@@ -75,7 +75,6 @@ program DAMASK_spectral - use grid_mech_spectral_polarisation - use grid_damage_spectral - use grid_thermal_spectral -- use results - - implicit none - -@@ -153,8 +152,6 @@ program DAMASK_spectral - write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, 2019' - write(6,'(a)') ' https://doi.org/10.1007/978-981-10-6855-3_80' - -- call results_openJobFile() -- call results_closeJobFile() - !-------------------------------------------------------------------------------------------------- - ! initialize field solver information - nActiveFields = 1 -@@ -595,7 +592,6 @@ program DAMASK_spectral - if(ierr /=0_pInt) call IO_error(894_pInt, ext_msg='MPI_file_write') - enddo - fileOffset = fileOffset + sum(outputSize) ! forward to current file position -- call CPFEM_results(totalIncsCounter,time) - endif - if ( loadCases(currentLoadCase)%restartFrequency > 0_pInt & ! writing of restart info requested ... - .and. mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0_pInt) then ! ... and at frequency of writing restart information -diff --git a/src/HDF5_utilities.f90 b/src/HDF5_utilities.f90 -index a81aaee0..3d3cdee3 100644 ---- a/src/HDF5_utilities.f90 -+++ b/src/HDF5_utilities.f90 -@@ -197,7 +197,6 @@ integer(HID_T) function HDF5_addGroup(fileHandle,groupName) - !------------------------------------------------------------------------------------------------- - ! setting I/O mode to collective - #ifdef PETSc -- call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr) - if (hdferr < 0) call IO_error(1_pInt,ext_msg = 'HDF5_addGroup: h5pset_all_coll_metadata_ops_f ('//trim(groupName)//')') - #endif - -@@ -232,7 +231,6 @@ integer(HID_T) function HDF5_openGroup(fileHandle,groupName) - !------------------------------------------------------------------------------------------------- - ! setting I/O mode to collective - #ifdef PETSc -- call h5pget_all_coll_metadata_ops_f(aplist_id, is_collective, hdferr) - if (hdferr < 0) call IO_error(1_pInt,ext_msg = 'HDF5_openGroup: h5pset_all_coll_metadata_ops_f ('//trim(groupName)//')') - #endif - -@@ -1646,7 +1644,6 @@ subroutine initialize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_ - call h5pcreate_f(H5P_DATASET_ACCESS_F, aplist_id, hdferr) - if (hdferr < 0) call IO_error(1_pInt,ext_msg='initialize_read: h5pcreate_f') - #ifdef PETSc -- call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr) - if (hdferr < 0) call IO_error(1_pInt,ext_msg='initialize_read: h5pset_all_coll_metadata_ops_f') - #endif - diff --git a/installation/patch/disable_old_output b/installation/patch/disable_old_output deleted file mode 100644 index 732dfc83e..000000000 --- a/installation/patch/disable_old_output +++ /dev/null @@ -1,178 +0,0 @@ -From 6dbd904a4cfc28add3c39bb2a4ec9e2dbb2442b6 Mon Sep 17 00:00:00 2001 -From: Martin Diehl -Date: Thu, 18 Apr 2019 18:25:32 +0200 -Subject: [PATCH] to create patch - ---- - src/DAMASK_grid.f90 | 81 +----------------------------------------- - src/homogenization.f90 | 2 ++ - 2 files changed, 3 insertions(+), 80 deletions(-) - -diff --git a/src/DAMASK_grid.f90 b/src/DAMASK_grid.f90 -index f2f52bb2..a7543f4d 100644 ---- a/src/DAMASK_grid.f90 -+++ b/src/DAMASK_grid.f90 -@@ -18,7 +18,6 @@ program DAMASK_spectral - use DAMASK_interface, only: & - DAMASK_interface_init, & - loadCaseFile, & -- geometryFile, & - getSolverJobName, & - interface_restartInc - use IO, only: & -@@ -49,14 +48,9 @@ program DAMASK_spectral - restartInc - use numerics, only: & - worldrank, & -- worldsize, & - stagItMax, & - maxCutBack, & - continueCalculation -- use homogenization, only: & -- materialpoint_sizeResults, & -- materialpoint_results, & -- materialpoint_postResults - use material, only: & - thermal_type, & - damage_type, & -@@ -131,12 +125,6 @@ program DAMASK_spectral - type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases - type(tLoadCase) :: newLoadCase - type(tSolutionState), allocatable, dimension(:) :: solres -- integer(MPI_OFFSET_KIND) :: fileOffset -- integer(MPI_OFFSET_KIND), dimension(:), allocatable :: outputSize -- integer(pInt), parameter :: maxByteOut = 2147483647-4096 !< limit of one file output write https://trac.mpich.org/projects/mpich/ticket/1742 -- integer(pInt), parameter :: maxRealOut = maxByteOut/pReal -- integer(pLongInt), dimension(2) :: outputIndex -- PetscErrorCode :: ierr - procedure(grid_mech_spectral_basic_init), pointer :: & - mech_init - procedure(grid_mech_spectral_basic_forward), pointer :: & -@@ -384,22 +372,6 @@ program DAMASK_spectral - ! write header of output file - if (worldrank == 0) then - writeHeader: if (interface_restartInc < 1_pInt) then -- open(newunit=fileUnit,file=trim(getSolverJobName())//& -- '.spectralOut',form='UNFORMATTED',status='REPLACE') -- write(fileUnit) 'load:', trim(loadCaseFile) ! ... and write header -- write(fileUnit) 'workingdir:', 'n/a' -- write(fileUnit) 'geometry:', trim(geometryFile) -- write(fileUnit) 'grid:', grid -- write(fileUnit) 'size:', geomSize -- write(fileUnit) 'materialpoint_sizeResults:', materialpoint_sizeResults -- write(fileUnit) 'loadcases:', size(loadCases) -- write(fileUnit) 'frequencies:', loadCases%outputfrequency ! one entry per LoadCase -- write(fileUnit) 'times:', loadCases%time ! one entry per LoadCase -- write(fileUnit) 'logscales:', loadCases%logscale -- write(fileUnit) 'increments:', loadCases%incs ! one entry per LoadCase -- write(fileUnit) 'startingIncrement:', restartInc ! start with writing out the previous inc -- write(fileUnit) 'eoh' -- close(fileUnit) ! end of header - open(newunit=statUnit,file=trim(getSolverJobName())//& - '.sta',form='FORMATTED',status='REPLACE') - write(statUnit,'(a)') 'Increment Time CutbackLevel Converged IterationsNeeded' ! statistics file -@@ -412,39 +384,6 @@ program DAMASK_spectral - endif writeHeader - endif - --!-------------------------------------------------------------------------------------------------- --! prepare MPI parallel out (including opening of file) -- allocate(outputSize(worldsize), source = 0_MPI_OFFSET_KIND) -- outputSize(worldrank+1) = size(materialpoint_results,kind=MPI_OFFSET_KIND)*int(pReal,MPI_OFFSET_KIND) -- call MPI_allreduce(MPI_IN_PLACE,outputSize,worldsize,MPI_LONG,MPI_SUM,PETSC_COMM_WORLD,ierr) ! get total output size over each process -- if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_allreduce') -- call MPI_file_open(PETSC_COMM_WORLD, trim(getSolverJobName())//'.spectralOut', & -- MPI_MODE_WRONLY + MPI_MODE_APPEND, & -- MPI_INFO_NULL, & -- fileUnit, & -- ierr) -- if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_open') -- call MPI_file_get_position(fileUnit,fileOffset,ierr) ! get offset from header -- if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_get_position') -- fileOffset = fileOffset + sum(outputSize(1:worldrank)) ! offset of my process in file (header + processes before me) -- call MPI_file_seek (fileUnit,fileOffset,MPI_SEEK_SET,ierr) -- if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_seek') -- -- writeUndeformed: if (interface_restartInc < 1_pInt) then -- write(6,'(1/,a)') ' ... writing initial configuration to file ........................' -- call CPFEM_results(0_pInt,0.0_pReal) -- do i = 1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output -- outputIndex = int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, & ! QUESTION: why not starting i at 0 instead of murky 1? -- min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt) -- call MPI_file_write(fileUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)), & -- [(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), & -- int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)), & -- MPI_DOUBLE, MPI_STATUS_IGNORE, ierr) -- if (ierr /= 0_pInt) call IO_error(error_ID=894_pInt, ext_msg='MPI_file_write') -- enddo -- fileOffset = fileOffset + sum(outputSize) ! forward to current file position -- endif writeUndeformed -- - - loadCaseLooping: do currentLoadCase = 1_pInt, size(loadCases) - time0 = time ! load case start time -@@ -574,7 +513,6 @@ program DAMASK_spectral - write(6,'(/,a)') ' cutting back ' - else ! no more options to continue - call IO_warning(850_pInt) -- call MPI_file_close(fileUnit,ierr) - close(statUnit) - call quit(-1_pInt*(lastRestartWritten+1_pInt)) ! quit and provide information about last restart inc written - endif -@@ -593,24 +531,8 @@ program DAMASK_spectral - ' increment ', totalIncsCounter, ' NOT converged' - endif; flush(6) - -- if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0_pInt) then ! at output frequency -- write(6,'(1/,a)') ' ... writing results to file ......................................' -- flush(6) -- call materialpoint_postResults() -- call MPI_file_seek (fileUnit,fileOffset,MPI_SEEK_SET,ierr) -- if (ierr /= 0_pInt) call IO_error(894_pInt, ext_msg='MPI_file_seek') -- do i=1, size(materialpoint_results,3)/(maxByteOut/(materialpoint_sizeResults*pReal))+1 ! slice the output of my process in chunks not exceeding the limit for one output -- outputIndex=int([(i-1_pInt)*((maxRealOut)/materialpoint_sizeResults)+1_pInt, & -- min(i*((maxRealOut)/materialpoint_sizeResults),size(materialpoint_results,3))],pLongInt) -- call MPI_file_write(fileUnit,reshape(materialpoint_results(:,:,outputIndex(1):outputIndex(2)),& -- [(outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)]), & -- int((outputIndex(2)-outputIndex(1)+1)*int(materialpoint_sizeResults,pLongInt)),& -- MPI_DOUBLE, MPI_STATUS_IGNORE, ierr) -- if(ierr /=0_pInt) call IO_error(894_pInt, ext_msg='MPI_file_write') -- enddo -- fileOffset = fileOffset + sum(outputSize) ! forward to current file position -+ if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0_pInt) & ! at output frequency - call CPFEM_results(totalIncsCounter,time) -- endif - if ( loadCases(currentLoadCase)%restartFrequency > 0_pInt & ! writing of restart info requested ... - .and. mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0_pInt) then ! ... and at frequency of writing restart information - restartWrite = .true. ! set restart parameter for FEsolving -@@ -633,7 +555,6 @@ program DAMASK_spectral - real(convergedCounter, pReal)/& - real(notConvergedCounter + convergedCounter,pReal)*100.0_pReal, ' %) increments converged!' - flush(6) -- call MPI_file_close(fileUnit,ierr) - close(statUnit) - - if (notConvergedCounter > 0_pInt) call quit(2_pInt) ! error if some are not converged -diff --git a/src/homogenization.f90 b/src/homogenization.f90 -index 06da6ab2..0743d545 100644 ---- a/src/homogenization.f90 -+++ b/src/homogenization.f90 -@@ -269,6 +269,7 @@ subroutine homogenization_init - + homogenization_maxNgrains * (1 + crystallite_maxSizePostResults & ! crystallite size & crystallite results - + 1 + constitutive_plasticity_maxSizePostResults & ! constitutive size & constitutive results - + constitutive_source_maxSizePostResults) -+ materialpoint_sizeResults = 0 - allocate(materialpoint_results(materialpoint_sizeResults,theMesh%elem%nIPs,theMesh%nElems)) - - write(6,'(/,a)') ' <<<+- homogenization init -+>>>' -@@ -682,6 +683,7 @@ subroutine materialpoint_postResults - i, & !< integration point number - e !< element number - -+ return - !$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,thePos,theSize) - elementLooping: do e = FEsolving_execElem(1),FEsolving_execElem(2) - myNgrains = homogenization_Ngrains(mesh_element(3,e)) --- -2.21.0 - diff --git a/installation/patch/python2to3.sh b/installation/patch/python2to3.sh deleted file mode 100755 index 255e62781..000000000 --- a/installation/patch/python2to3.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /usr/bin/env bash -if [ $1x != 3to2x ]; then - echo 'python2.7 to python3' - find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python2.7/usr\/bin\/env python3/g' -else - echo 'python3 to python2.7' - find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python3/usr\/bin\/env python2.7/g' -fi From cba7114dff26afbc38839e4cc25439e9c2a4a699 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 2 Jan 2020 21:42:28 +0100 Subject: [PATCH 38/75] there is also an FEM solver that operates on regular grids --- CMakeLists.txt | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d53000d2..24079457a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ if (DAMASK_SOLVER STREQUAL "grid") elseif (DAMASK_SOLVER STREQUAL "fem" OR DAMASK_SOLVER STREQUAL "mesh") project (damask-mesh Fortran C) add_definitions (-DFEM) - message ("Building FEM Solver\n") + message ("Building Mesh Solver\n") else () message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined") endif () diff --git a/Makefile b/Makefile index b24e3d36b..0d9374fad 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ build/grid: .PHONY: build/mesh build/mesh: @mkdir -p build/mesh - @(cd build/mesh; cmake -Wno-dev -DDAMASK_SOLVER=FEM -DCMAKE_INSTALL_PREFIX=${DAMASK_ROOT} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;) + @(cd build/mesh; cmake -Wno-dev -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${DAMASK_ROOT} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDCMD_POST=${BUILDCMD_POST} -DBUILDCMD_PRE=${BUILDCMD_PRE} -DOPTIMIZATION=${OPTIMIZATION} -DOPENMP=${OPENMP} ../../;) .PHONY: clean clean: From d81dc01ce0dbd3408e98066be1453e577d06b3b0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 12:00:19 +0100 Subject: [PATCH 39/75] we consider indvidual systems, not families --- src/lattice.f90 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 050c7ed87..d351079fb 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -2114,8 +2114,8 @@ end function buildInteraction function buildCoordinateSystem(active,potential,system,structure,cOverA) integer, dimension(:), intent(in) :: & - active, & - potential + active, & !< # of active systems per family + potential !< # of potential systems per family real(pReal), dimension(:,:), intent(in) :: & system character(len=*), intent(in) :: & @@ -2308,12 +2308,12 @@ end subroutine buildTransformationSystem !-------------------------------------------------------------------------------------------------- function getlabels(active,potential,system,structure) result(labels) - integer, dimension(:), intent(in) :: & - active, & - potential - real(pReal), dimension(:,:), intent(in) :: & + integer, dimension(:), intent(in) :: & + active, & !< # of active systems per family + potential !< # of potential systems per family + real(pReal), dimension(:,:), intent(in) :: & system - character(len=*), intent(in) :: structure !< lattice structure + character(len=*), intent(in) :: structure !< lattice structure character(len=:), dimension(:), allocatable :: labels character(len=:), allocatable :: label @@ -2335,15 +2335,16 @@ function getlabels(active,potential,system,structure) result(labels) p = sum(potential(1:f-1))+s i = 1 - label(i:i) = merge('[','<',structure(1:3) /= 'bct') + label(i:i) = '[' direction: do j = 1, size(system,1)/2 write(label(i+1:i+2),"(I2.1)") int(system(j,p)) label(i+3:i+3) = ' ' i = i + 3 enddo direction label(i:i) = ']' + i = i +1 - label(i:i) = merge('(','{',structure(1:3) /= 'bct') + label(i:i) = '(' normal: do j = size(system,1)/2+1, size(system,1) write(label(i+1:i+2),"(I2.1)") int(system(j,p)) label(i+3:i+3) = ' ' From a6ddbbd70c1c6c4bf1033e7e1cbc4650010615e2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 12:40:25 +0100 Subject: [PATCH 40/75] cleaning --- src/DAMASK_interface.f90 | 2 +- src/lattice.f90 | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/DAMASK_interface.f90 b/src/DAMASK_interface.f90 index ee8f220ae..4cf155ac1 100644 --- a/src/DAMASK_interface.f90 +++ b/src/DAMASK_interface.f90 @@ -10,7 +10,7 @@ !> and working directory. !-------------------------------------------------------------------------------------------------- #define GCC_MIN 6 -#define INTEL_MIN 1600 +#define INTEL_MIN 1700 #define PETSC_MAJOR 3 #define PETSC_MINOR_MIN 10 #define PETSC_MINOR_MAX 12 diff --git a/src/lattice.f90 b/src/lattice.f90 index d351079fb..a6c88dd34 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -483,9 +483,11 @@ module lattice lattice_slip_normal, & lattice_slip_direction, & lattice_slip_transverse, & - lattice_labels_slip + lattice_labels_slip, & + lattice_labels_twin contains + !-------------------------------------------------------------------------------------------------- !> @brief Module initialization !-------------------------------------------------------------------------------------------------- @@ -2306,14 +2308,13 @@ end subroutine buildTransformationSystem !-------------------------------------------------------------------------------------------------- !> @brief select active systems as strings !-------------------------------------------------------------------------------------------------- -function getlabels(active,potential,system,structure) result(labels) +function getlabels(active,potential,system) result(labels) integer, dimension(:), intent(in) :: & active, & !< # of active systems per family potential !< # of potential systems per family real(pReal), dimension(:,:), intent(in) :: & system - character(len=*), intent(in) :: structure !< lattice structure character(len=:), dimension(:), allocatable :: labels character(len=:), allocatable :: label From 4ebd89c04058df0d20b2b2695e300573bf003359 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 13:33:32 +0100 Subject: [PATCH 41/75] shape is known (no need for automatic allocation) --- src/crystallite.f90 | 2 +- src/lattice.f90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index d33e774e9..f2eadd776 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -118,7 +118,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine crystallite_init - logical, dimension(:,:), allocatable :: devNull + logical, dimension(discretization_nIP,discretization_nElem) :: devNull integer :: & c, & !< counter in integration point component loop i, & !< counter in integration point loop diff --git a/src/lattice.f90 b/src/lattice.f90 index a6c88dd34..36a682ab3 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -1952,7 +1952,7 @@ function lattice_labels_slip(Nslip,structure) result(labels) if (any(Nslip < 0)) & call IO_error(144,ext_msg='Nslip '//trim(structure)) - labels = getLabels(Nslip,NslipMax,slipSystems,structure) + labels = getLabels(Nslip,NslipMax,slipSystems) end function lattice_labels_slip @@ -1993,7 +1993,7 @@ function lattice_labels_twin(Ntwin,structure) result(labels) if (any(Ntwin < 0)) & call IO_error(144,ext_msg='Ntwin '//trim(structure)) - labels = getLabels(Ntwin,NtwinMax,twinSystems,structure) + labels = getLabels(Ntwin,NtwinMax,twinSystems) end function lattice_labels_twin From 2975e46ca1c38c42e4dd581a9c51b82492cbaf4c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 13:52:06 +0100 Subject: [PATCH 42/75] not needed --- src/grid/grid_mech_FEM.f90 | 2 -- src/grid/grid_mech_spectral_basic.f90 | 2 -- src/grid/grid_mech_spectral_polarisation.f90 | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index a34d880f7..5133d577a 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -12,8 +12,6 @@ module grid_mech_FEM use PETScdmda use PETScsnes use prec - use CPFEM2 - use IO use debug use FEsolving use numerics diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index f05f9bc93..b34034fa3 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -15,13 +15,11 @@ module grid_mech_spectral_basic use HDF5_utilities use math use spectral_utilities - use IO use FEsolving use config use numerics use homogenization use mesh_grid - use CPFEM2 use debug implicit none diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 33c3e4e72..4986a3457 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -16,13 +16,11 @@ module grid_mech_spectral_polarisation use math use rotations use spectral_utilities - use IO use FEsolving use config use numerics use homogenization use mesh_grid - use CPFEM2 use debug implicit none From 886e1110644d23e11b3bae76e8225dfe294dff48 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 13:53:23 +0100 Subject: [PATCH 43/75] not needed --- src/grid/grid_damage_spectral.f90 | 1 - src/grid/grid_thermal_spectral.f90 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/grid/grid_damage_spectral.f90 b/src/grid/grid_damage_spectral.f90 index 1fb91b49b..e2ce28c0e 100644 --- a/src/grid/grid_damage_spectral.f90 +++ b/src/grid/grid_damage_spectral.f90 @@ -15,7 +15,6 @@ module grid_damage_spectral use mesh_grid use damage_nonlocal use numerics - use damage_nonlocal implicit none private diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index c7f886f13..c381d837d 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -14,8 +14,8 @@ module grid_thermal_spectral use spectral_utilities use mesh_grid use thermal_conduction - use material use numerics + use material implicit none private From 326e3d082443d017481ae806d9691d3bbc394201 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 14:02:14 +0100 Subject: [PATCH 44/75] polishing --- src/grid/grid_mech_FEM.f90 | 25 ++++++++++++------------- src/grid/grid_mech_spectral_basic.f90 | 4 ++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 5133d577a..b2ea20f16 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -7,20 +7,20 @@ module grid_mech_FEM #include #include - use DAMASK_interface - use HDF5_utilities use PETScdmda use PETScsnes + use prec - use debug + use DAMASK_interface + use HDF5_utilities + use math + use spectral_utilities use FEsolving use numerics use homogenization - use DAMASK_interface - use spectral_utilities use discretization use mesh_grid - use math + use debug implicit none private @@ -50,7 +50,7 @@ module grid_mech_FEM F_aimDot = 0.0_pReal, & !< assumed rate of average deformation gradient F_aim = math_I3, & !< current prescribed deformation gradient F_aim_lastIter = math_I3, & - F_aim_lastInc = math_I3, & !< previous average deformation gradient + F_aim_lastInc = math_I3, & !< previous average deformation gradient P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress character(len=1024), private :: incInfo !< time and increment information @@ -80,8 +80,8 @@ contains !-------------------------------------------------------------------------------------------------- subroutine grid_mech_FEM_init - real(pReal) :: HGCoeff = 0e-2_pReal - PetscInt, dimension(:), allocatable :: localK + real(pReal) :: HGCoeff = 0.0e-2_pReal + PetscInt, dimension(worldsize) :: localK real(pReal), dimension(3,3) :: & temp33_Real = 0.0_pReal real(pReal), dimension(4,8) :: & @@ -121,10 +121,9 @@ subroutine grid_mech_FEM_init ! initialize solver specific parts of PETSc call SNESCreate(PETSC_COMM_WORLD,mech_snes,ierr); CHKERRQ(ierr) call SNESSetOptionsPrefix(mech_snes,'mech_',ierr);CHKERRQ(ierr) - allocate(localK(worldsize), source = 0); localK(worldrank+1) = grid3 - do rank = 1, worldsize - call MPI_Bcast(localK(rank),1,MPI_INTEGER,rank-1,PETSC_COMM_WORLD,ierr) - enddo + localK = 0 + localK(worldrank+1) = grid3 + call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr) call DMDACreate3d(PETSC_COMM_WORLD, & DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, & DMDA_STENCIL_BOX, & diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index b34034fa3..9fcd3d563 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -282,7 +282,7 @@ subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,lo F_aimDot = merge(stress_BC%maskFloat*(F_aim-F_aim_lastInc)/timeinc_old, 0.0_pReal, guess) F_aim_lastInc = F_aim - !-------------------------------------------------------------------------------------------------- + !----------------------------------------------------------------------------------------------- ! calculate rate for aim if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F F_aimDot = & @@ -362,7 +362,7 @@ subroutine grid_mech_spectral_basic_restartWrite if (num%update_gamma) call utilities_saveReferenceStiffness call DMDAVecRestoreArrayF90(da,solution_vec,F,ierr); CHKERRQ(ierr) - + end subroutine grid_mech_spectral_basic_restartWrite From b5e4e42505095c70af3186e53159e20d159661e1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 14:44:31 +0100 Subject: [PATCH 45/75] splitext includes leading dot --- python/damask/geom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/geom.py b/python/damask/geom.py index 63ce20115..bfe475730 100644 --- a/python/damask/geom.py +++ b/python/damask/geom.py @@ -422,7 +422,7 @@ class Geom(): ext = os.path.splitext(fname)[1] if ext == '': name = fname + '.' + writer.GetDefaultFileExtension() - elif ext == writer.GetDefaultFileExtension(): + elif ext[1:] == writer.GetDefaultFileExtension(): name = fname else: raise ValueError("unknown extension {}".format(ext)) From e692118ec5c412347dc40e34036f1fce814f11f8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 15:41:15 +0100 Subject: [PATCH 46/75] easier to use for single output label --- python/damask/dadf5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index f6ea959bd..73e785b10 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -855,7 +855,7 @@ class DADF5(): Parameters ---------- - labels : list of str + labels : str or list of Labels of the datasets to be exported. mode : str, either 'Cell' or 'Point' Export in cell format or point format. @@ -908,7 +908,7 @@ class DADF5(): materialpoints_backup = self.visible['materialpoints'].copy() self.set_visible('materialpoints',False) - for label in labels: + for label in (labels if isinstance(labels,list) else [labels]): for p in self.iter_visible('con_physics'): if p != 'generic': for c in self.iter_visible('constituents'): @@ -939,7 +939,7 @@ class DADF5(): constituents_backup = self.visible['constituents'].copy() self.set_visible('constituents',False) - for label in labels: + for label in (labels if isinstance(labels,list) else [labels]): for p in self.iter_visible('mat_physics'): if p != 'generic': for m in self.iter_visible('materialpoints'): From e1b35be23a0182785d43c64c16ad3f2daabddcb2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 3 Jan 2020 15:41:46 +0100 Subject: [PATCH 47/75] not used anymore --- src/mesh_marc.f90 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 8de8ee96c..1d7fd09c3 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -36,12 +36,6 @@ module mesh mesh_mapFEtoCPelem, & !< [sorted FEid, corresponding CPid] mesh_mapFEtoCPnode !< [sorted FEid, corresponding CPid] -!-------------------------------------------------------------------------------------------------- -! DEPRECATED - real(pReal), dimension(:,:,:), allocatable, public :: & - mesh_ipCoordinates !< IP x,y,z coordinates (after deformation!) -!-------------------------------------------------------------------------------------------------- - public :: & mesh_init, & mesh_FEasCP @@ -96,8 +90,6 @@ subroutine mesh_init(ip,el) calcMode(ip,mesh_FEasCP('elem',el)) = .true. ! first ip,el needs to be already pingponged to "calc" - allocate(mesh_ipCoordinates(3,elem%nIPs,nElems),source=0.0_pReal) ! deprecated - allocate(cellNodeDefinition(elem%nNodes-1)) allocate(connectivity_cell(elem%NcellNodesPerCell,elem%nIPs,nElems)) call buildCells(connectivity_cell,cellNodeDefinition,& From 385085de7333b9ab5e0fec47b620c5487600ba55 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 4 Jan 2020 01:05:40 +0100 Subject: [PATCH 48/75] correct names for numpy (differ from math) --- python/damask/colormaps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/colormaps.py b/python/damask/colormaps.py index ad924325f..e4183e830 100644 --- a/python/damask/colormaps.py +++ b/python/damask/colormaps.py @@ -328,9 +328,9 @@ class Color(): Msh = np.zeros(3,'d') Msh[0] = np.sqrt(np.dot(self.color,self.color)) if (Msh[0] > 0.001): - Msh[1] = np.acos(self.color[0]/Msh[0]) + Msh[1] = np.arccos(self.color[0]/Msh[0]) if (self.color[1] != 0.0): - Msh[2] = np.atan2(self.color[2],self.color[1]) + Msh[2] = np.arctan2(self.color[2],self.color[1]) converted = Color('MSH', Msh) self.model = converted.model From bd5f96326092c33402c3b07f1132c468108312c0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 4 Jan 2020 14:37:09 +0100 Subject: [PATCH 49/75] polishing --- CMakeLists.txt | 11 +++-------- src/IO.f90 | 17 ++++++++--------- src/grid/grid_mech_FEM.f90 | 1 - 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24079457a..e44f5eab2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,9 +117,7 @@ elseif (DAMASK_SOLVER STREQUAL "fem" OR DAMASK_SOLVER STREQUAL "mesh") else () message (FATAL_ERROR "Build target (DAMASK_SOLVER) is not defined") endif () - -# set linker commands (needs to be done after defining the project) -set (CMAKE_LINKER "${PETSC_LINKER}") +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) if (CMAKE_BUILD_TYPE STREQUAL "") set (CMAKE_BUILD_TYPE "RELEASE") @@ -168,9 +166,6 @@ add_definitions (-DDAMASKVERSION="${DAMASK_V}") # definition of other macros add_definitions (-DPETSc) -set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}") -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) - if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") include(Compiler-Intel) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") @@ -183,14 +178,14 @@ endif () set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}") -set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}") +set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${PETSC_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}") if (CMAKE_BUILD_TYPE STREQUAL "DEBUG") set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}") set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}") endif () -set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}") +set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${PETSC_INCLUDES} ${BUILDCMD_POST}") set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} -o ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}") message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}\n") diff --git a/src/IO.f90 b/src/IO.f90 index 6d8506506..6c6c3b7c7 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -384,7 +384,7 @@ function IO_stringValue(string,chunkPos,myChunk,silent) logical :: warn if (present(silent)) then - warn = silent + warn = .not. silent else warn = .false. endif @@ -414,11 +414,10 @@ real(pReal) function IO_floatValue (string,chunkPos,myChunk) valuePresent: if (myChunk > chunkPos(1) .or. myChunk < 1) then call IO_warning(201,el=myChunk,ext_msg=MYNAME//trim(string)) - else valuePresent - IO_floatValue = & - verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& - VALIDCHARACTERS,MYNAME) - endif valuePresent + else valuePresent + IO_floatValue = verifyFloatValue(trim(adjustl(string(chunkPos(myChunk*2):chunkPos(myChunk*2+1)))),& + VALIDCHARACTERS,MYNAME) + endif valuePresent end function IO_floatValue @@ -466,12 +465,12 @@ real(pReal) function IO_fixedNoEFloatValue (string,ends,myChunk) pos_exp = scan(string(ends(myChunk)+1:ends(myChunk+1)),'+-',back=.true.) hasExponent: if (pos_exp > 1) then base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk)+pos_exp-1))),& - VALIDBASE,MYNAME//'(base): ') + VALIDBASE,MYNAME//'(base): ') expon = verifyIntValue(trim(adjustl(string(ends(myChunk)+pos_exp:ends(myChunk+1)))),& - VALIDEXP,MYNAME//'(exp): ') + VALIDEXP,MYNAME//'(exp): ') else hasExponent base = verifyFloatValue(trim(adjustl(string(ends(myChunk)+1:ends(myChunk+1)))),& - VALIDBASE,MYNAME//'(base): ') + VALIDBASE,MYNAME//'(base): ') expon = 0 endif hasExponent IO_fixedNoEFloatValue = base*10.0_pReal**real(expon,pReal) diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index b2ea20f16..713e83029 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -94,7 +94,6 @@ subroutine grid_mech_FEM_init 1.0_pReal,-1.0_pReal,-1.0_pReal,-1.0_pReal, & 1.0_pReal, 1.0_pReal, 1.0_pReal, 1.0_pReal], [4,8]) PetscErrorCode :: ierr - integer :: rank integer(HID_T) :: fileHandle, groupHandle character(len=pStringLen) :: fileName real(pReal), dimension(3,3,3,3) :: devNull From 3999c0b63079bed881902f47a9f269269a612dda Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 4 Jan 2020 17:15:12 +0100 Subject: [PATCH 50/75] is not used anymore (and IO_fixedXXXvalue seem to be superfluous) --- src/IO.f90 | 43 ++----------------------------------------- src/mesh_marc.f90 | 7 +++---- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 6c6c3b7c7..2d45a8add 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -23,7 +23,7 @@ module IO public :: & IO_init, & IO_read_ASCII, & - IO_open_file, & + IO_open_file, & ! deprecated, use IO_read_ASCII IO_open_jobFile_binary, & IO_isBlank, & IO_getTag, & @@ -44,8 +44,7 @@ module IO IO_countDataLines #elif defined(Marc4DAMASK) IO_fixedNoEFloatValue, & - IO_fixedIntValue, & - IO_countNumericalDataLines + IO_fixedIntValue #endif #endif @@ -549,14 +548,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg) msg = 'could not read file:' case (103) msg = 'could not assemble input files' - case (104) - msg = '{input} recursion limit reached' - case (105) - msg = 'unknown output:' case (106) msg = 'working directory does not exist:' - case (107) - msg = 'line length exceeds limit of 256' !-------------------------------------------------------------------------------------------------- ! lattice error messages @@ -923,38 +916,6 @@ end function IO_countDataLines #endif -#ifdef Marc4DAMASK -!-------------------------------------------------------------------------------------------------- -!> @brief count lines containig data up to next *keyword -!-------------------------------------------------------------------------------------------------- -integer function IO_countNumericalDataLines(fileUnit) - - integer, intent(in) :: fileUnit !< file handle - - - integer, allocatable, dimension(:) :: chunkPos - character(len=pStringLen) :: line, & - tmp - - IO_countNumericalDataLines = 0 - line = '' - - do while (trim(line) /= IO_EOF) - line = IO_read(fileUnit) - chunkPos = IO_stringPos(line) - tmp = IO_lc(IO_stringValue(line,chunkPos,1)) - if (verify(trim(tmp),'0123456789') == 0) then ! numerical values - IO_countNumericalDataLines = IO_countNumericalDataLines + 1 - else - exit - endif - enddo - backspace(fileUnit) - -end function IO_countNumericalDataLines -#endif - - !-------------------------------------------------------------------------------------------------- !> @brief count items in consecutive lines depending on lines !> @details Marc: ints concatenated by "c" as last char or range of values a "to" b diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 1d7fd09c3..00fd76326 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -488,8 +488,7 @@ subroutine inputRead_mapNodes(fileContent) chunkPos = IO_stringPos(fileContent(l)) if( IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates' ) then do i = 1,size(mesh_mapFEtoCPnode,2) - mesh_mapFEtoCPnode(1,i) = IO_fixedIntValue (fileContent(l+1+i),[0,10],1) - mesh_mapFEtoCPnode(2,i) = i + mesh_mapFEtoCPnode(1:2,i) = [IO_fixedIntValue (fileContent(l+1+i),[0,10],1),i] ! ToDo: use IO_intValue enddo exit endif @@ -520,9 +519,9 @@ subroutine inputRead_elemNodes(nodes, & chunkPos = IO_stringPos(fileContent(l)) if( IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates' ) then do i=1,nNode - m = mesh_FEasCP('node',IO_fixedIntValue(fileContent(l+1+i),node_ends,1)) + m = mesh_FEasCP('node',IO_fixedIntValue(fileContent(l+1+i),node_ends,1)) !ToDo: use IO_intValue do j = 1,3 - nodes(j,m) = mesh_unitlength * IO_fixedNoEFloatValue(fileContent(l+1+i),node_ends,j+1) + nodes(j,m) = mesh_unitlength * IO_fixedNoEFloatValue(fileContent(l+1+i),node_ends,j+1) !ToDo: use IO_floatValue enddo enddo exit From 6b6ad5235535d8dbf9dcb4154f854269d49c51d8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 4 Jan 2020 18:25:59 +0100 Subject: [PATCH 51/75] use variable string as return (no need for trim) --- src/DAMASK_interface.f90 | 37 ++++++++++++++++++++----------------- src/system_routines.f90 | 14 ++++++++++---- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/DAMASK_interface.f90 b/src/DAMASK_interface.f90 index 4cf155ac1..27a0084f5 100644 --- a/src/DAMASK_interface.f90 +++ b/src/DAMASK_interface.f90 @@ -269,10 +269,10 @@ subroutine DAMASK_interface_init write(6,'(a,a)') ' Working dir argument: ', trim(workingDirArg) write(6,'(a,a)') ' Geometry argument: ', trim(geometryArg) write(6,'(a,a)') ' Load case argument: ', trim(loadcaseArg) - write(6,'(a,a)') ' Working directory: ', trim(getCWD()) + write(6,'(a,a)') ' Working directory: ', getCWD() write(6,'(a,a)') ' Geometry file: ', trim(geometryFile) write(6,'(a,a)') ' Loadcase file: ', trim(loadCaseFile) - write(6,'(a,a)') ' Solver job name: ', trim(getSolverJobName()) + write(6,'(a,a)') ' Solver job name: ', getSolverJobName() if (interface_restartInc > 0) & write(6,'(a,i6.6)') ' Restart from increment: ', interface_restartInc @@ -308,7 +308,7 @@ subroutine setWorkingDirectory(workingDirectoryArg) workingDirectory = trim(rectifyPath(workingDirectory)) error = setCWD(trim(workingDirectory)) if(error) then - write(6,'(/,a)') ' ERROR: Working directory "'//trim(workingDirectory)//'" does not exist' + write(6,'(/,a)') ' ERROR: Invalid Working directory: '//trim(workingDirectory) call quit(1) endif @@ -318,8 +318,9 @@ end subroutine setWorkingDirectory !-------------------------------------------------------------------------------------------------- !> @brief solver job name (no extension) as combination of geometry and load case name !-------------------------------------------------------------------------------------------------- -character(len=1024) function getSolverJobName() +function getSolverJobName() + character(len=:), allocatable :: getSolverJobName integer :: posExt,posSep posExt = scan(geometryFile,'.',back=.true.) @@ -330,7 +331,7 @@ character(len=1024) function getSolverJobName() posExt = scan(loadCaseFile,'.',back=.true.) posSep = scan(loadCaseFile,'/',back=.true.) - getSolverJobName = trim(getSolverJobName)//'_'//loadCaseFile(posSep+1:posExt-1) + getSolverJobName = getSolverJobName//'_'//loadCaseFile(posSep+1:posExt-1) end function getSolverJobName @@ -338,15 +339,16 @@ end function getSolverJobName !-------------------------------------------------------------------------------------------------- !> @brief basename of geometry file with extension from command line arguments !-------------------------------------------------------------------------------------------------- -character(len=1024) function getGeometryFile(geometryParameter) +function getGeometryFile(geometryParameter) - character(len=1024), intent(in) :: geometryParameter - logical :: file_exists - external :: quit + character(len=:), allocatable :: getGeometryFile + character(len=*), intent(in) :: geometryParameter + logical :: file_exists + external :: quit getGeometryFile = trim(geometryParameter) - if (scan(getGeometryFile,'/') /= 1) getGeometryFile = trim(getCWD())//'/'//trim(getGeometryFile) - getGeometryFile = makeRelativePath(trim(getCWD()), getGeometryFile) + if (scan(getGeometryFile,'/') /= 1) getGeometryFile = getCWD()//'/'//trim(getGeometryFile) + getGeometryFile = makeRelativePath(getCWD(), getGeometryFile) inquire(file=trim(getGeometryFile), exist=file_exists) if (.not. file_exists) then @@ -360,15 +362,16 @@ end function getGeometryFile !-------------------------------------------------------------------------------------------------- !> @brief relative path of loadcase from command line arguments !-------------------------------------------------------------------------------------------------- -character(len=1024) function getLoadCaseFile(loadCaseParameter) +function getLoadCaseFile(loadCaseParameter) - character(len=1024), intent(in) :: loadCaseParameter - logical :: file_exists - external :: quit + character(len=:), allocatable :: getLoadCaseFile + character(len=*), intent(in) :: loadCaseParameter + logical :: file_exists + external :: quit getLoadCaseFile = trim(loadCaseParameter) - if (scan(getLoadCaseFile,'/') /= 1) getLoadCaseFile = trim(getCWD())//'/'//trim(getLoadCaseFile) - getLoadCaseFile = makeRelativePath(trim(getCWD()), getLoadCaseFile) + if (scan(getLoadCaseFile,'/') /= 1) getLoadCaseFile = getCWD()//'/'//trim(getLoadCaseFile) + getLoadCaseFile = makeRelativePath(getCWD(), getLoadCaseFile) inquire(file=trim(getLoadCaseFile), exist=file_exists) if (.not. file_exists) then diff --git a/src/system_routines.f90 b/src/system_routines.f90 index 0611c96db..932eefeb6 100644 --- a/src/system_routines.f90 +++ b/src/system_routines.f90 @@ -93,21 +93,24 @@ end function isDirectory !-------------------------------------------------------------------------------------------------- !> @brief gets the current working directory !-------------------------------------------------------------------------------------------------- -character(len=1024) function getCWD() +function getCWD() character(kind=C_CHAR), dimension(1024) :: charArray ! C string is an array + character(len=:), allocatable :: getCWD integer(C_INT) :: stat integer :: i call getCurrentWorkDir_C(charArray,stat) + if (stat /= 0_C_INT) then getCWD = 'Error occured when getting currend working directory' else - getCWD = repeat('',len(getCWD)) + allocate(character(len=1024)::getCWD) arrayToString: do i=1,len(getCWD) if (charArray(i) /= C_NULL_CHAR) then getCWD(i:i)=charArray(i) else + getCWD = getCWD(:i-1) exit endif enddo arrayToString @@ -119,21 +122,24 @@ end function getCWD !-------------------------------------------------------------------------------------------------- !> @brief gets the current host name !-------------------------------------------------------------------------------------------------- -character(len=1024) function getHostName() +function getHostName() character(kind=C_CHAR), dimension(1024) :: charArray ! C string is an array + character(len=:), allocatable :: getHostName integer(C_INT) :: stat integer :: i call getHostName_C(charArray,stat) + if (stat /= 0_C_INT) then getHostName = 'Error occured when getting host name' else - getHostName = repeat('',len(getHostName)) + allocate(character(len=1024)::getHostName) arrayToString: do i=1,len(getHostName) if (charArray(i) /= C_NULL_CHAR) then getHostName(i:i)=charArray(i) else + getHostName = getHostName(:i-1) exit endif enddo arrayToString From bd6f2a6b5c0b26adbce7129df25d854160f46834 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 4 Jan 2020 19:01:36 +0100 Subject: [PATCH 52/75] consistent string length --- src/IO.f90 | 8 ++++---- src/grid/grid_mech_FEM.f90 | 2 +- src/grid/grid_mech_spectral_basic.f90 | 2 +- src/grid/grid_mech_spectral_polarisation.f90 | 2 +- src/grid/spectral_utilities.f90 | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/IO.f90 b/src/IO.f90 index 2d45a8add..1e39daa1e 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -528,8 +528,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg) character(len=*), optional, intent(in) :: ext_msg external :: quit - character(len=1024) :: msg - character(len=1024) :: formatString + character(len=pStringLen) :: msg + character(len=pStringLen) :: formatString select case (error_ID) @@ -769,8 +769,8 @@ subroutine IO_warning(warning_ID,el,ip,g,ext_msg) integer, optional, intent(in) :: el,ip,g character(len=*), optional, intent(in) :: ext_msg - character(len=1024) :: msg - character(len=1024) :: formatString + character(len=pStringLen) :: msg + character(len=pStringLen) :: formatString select case (warning_ID) case (1) diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 713e83029..05fc3520a 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -53,7 +53,7 @@ module grid_mech_FEM F_aim_lastInc = math_I3, & !< previous average deformation gradient P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress - character(len=1024), private :: incInfo !< time and increment information + character(len=pStringLen), private :: incInfo !< time and increment information real(pReal), private, dimension(3,3,3,3) :: & C_volAvg = 0.0_pReal, & !< current volume average stiffness diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index 9fcd3d563..af8cbc377 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -55,7 +55,7 @@ module grid_mech_spectral_basic F_aim_lastInc = math_I3, & !< previous average deformation gradient P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress - character(len=1024), private :: incInfo !< time and increment information + character(len=pStringLen), private :: incInfo !< time and increment information real(pReal), private, dimension(3,3,3,3) :: & C_volAvg = 0.0_pReal, & !< current volume average stiffness C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 4986a3457..59ab84869 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -59,7 +59,7 @@ module grid_mech_spectral_polarisation F_av = 0.0_pReal, & !< average incompatible def grad field P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress - character(len=1024), private :: incInfo !< time and increment information + character(len=pStringLen), private :: incInfo !< time and increment information real(pReal), private, dimension(3,3,3,3) :: & C_volAvg = 0.0_pReal, & !< current volume average stiffness C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 04a24e877..68c372b26 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -700,7 +700,7 @@ function utilities_maskedCompliance(rot_BC,mask_stress,C) c_reduced, & !< reduced stiffness (depending on number of stress BC) sTimesC !< temp variable to check inversion logical :: errmatinv - character(len=1024):: formatString + character(len=pStringLen):: formatString mask_stressVector = reshape(transpose(mask_stress), [9]) size_reduced = count(mask_stressVector) From 09f42a399136df4747c807544fc624bd5dfcd539 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 8 Jan 2020 15:34:21 +0100 Subject: [PATCH 53/75] ang files might have more columns --- python/damask/table.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/damask/table.py b/python/damask/table.py index 28ce3efe0..ef8a84276 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -138,9 +138,12 @@ class Table(): break data = np.loadtxt(content) + for c in range(data.shape[1]-10): + shapes['user_defined{}'.format(c+1)] = (1,) return Table(data,shapes,comments) + @property def labels(self): return list(self.shapes.keys()) From 70e23fea9365c74efefcc58c0199f984286595c6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 01:28:32 +0100 Subject: [PATCH 54/75] polishing --- src/kinematics_cleavage_opening.f90 | 2 +- src/kinematics_slipplane_opening.f90 | 29 ++++++++++------------------ src/kinematics_thermal_expansion.f90 | 2 +- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/kinematics_cleavage_opening.f90 b/src/kinematics_cleavage_opening.f90 index eec8a1986..6b060a8d9 100644 --- a/src/kinematics_cleavage_opening.f90 +++ b/src/kinematics_cleavage_opening.f90 @@ -65,7 +65,7 @@ subroutine kinematics_cleavage_opening_init integer :: maxNinstance,p,instance - write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_cleavage_opening_LABEL//' init -+>>>' + write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_cleavage_opening_LABEL//' init -+>>>'; flush(6) maxNinstance = count(phase_kinematics == KINEMATICS_cleavage_opening_ID) if (maxNinstance == 0) return diff --git a/src/kinematics_slipplane_opening.f90 b/src/kinematics_slipplane_opening.f90 index c0f198985..018a5b4b5 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/kinematics_slipplane_opening.f90 @@ -51,7 +51,7 @@ subroutine kinematics_slipplane_opening_init integer :: maxNinstance,p,instance - write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_slipplane_opening_LABEL//' init -+>>>' + write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_slipplane_opening_LABEL//' init -+>>>'; flush(6) maxNinstance = count(phase_kinematics == KINEMATICS_slipplane_opening_ID) if (maxNinstance == 0) return @@ -144,40 +144,31 @@ subroutine kinematics_slipplane_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, traction_crit = prm%critLoad(i)* damage(homog)%p(damageOffset) ! degrading critical load carrying capacity by damage - udotd = sign(1.0_pReal,traction_d)* & - prm%sdot0* & - (abs(traction_d)/traction_crit - & - abs(traction_d)/prm%critLoad(i))**prm%n + udotd = sign(1.0_pReal,traction_d)* prm%sdot0* ( abs(traction_d)/traction_crit & + - abs(traction_d)/prm%critLoad(i))**prm%n if (abs(udotd) > tol_math_check) then Ld = Ld + udotd*projection_d dudotd_dt = udotd*prm%n/traction_d forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + & - dudotd_dt*projection_d(k,l)*projection_d(m,n) + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotd_dt*projection_d(k,l)*projection_d(m,n) endif - udott = sign(1.0_pReal,traction_t)* & - prm%sdot0* & - (abs(traction_t)/traction_crit - & - abs(traction_t)/prm%critLoad(i))**prm%n + udott = sign(1.0_pReal,traction_t)* prm%sdot0* ( abs(traction_t)/traction_crit & + - abs(traction_t)/prm%critLoad(i))**prm%n if (abs(udott) > tol_math_check) then Ld = Ld + udott*projection_t dudott_dt = udott*prm%n/traction_t forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + & - dudott_dt*projection_t(k,l)*projection_t(m,n) + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudott_dt*projection_t(k,l)*projection_t(m,n) endif - udotn = & - prm%sdot0* & - (max(0.0_pReal,traction_n)/traction_crit - & - max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n + udotn = prm%sdot0* ( max(0.0_pReal,traction_n)/traction_crit & + - max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n if (abs(udotn) > tol_math_check) then Ld = Ld + udotn*projection_n dudotn_dt = udotn*prm%n/traction_n forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + & - dudotn_dt*projection_n(k,l)*projection_n(m,n) + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotn_dt*projection_n(k,l)*projection_n(m,n) endif enddo diff --git a/src/kinematics_thermal_expansion.f90 b/src/kinematics_thermal_expansion.f90 index 814d604ed..7f7994959 100644 --- a/src/kinematics_thermal_expansion.f90 +++ b/src/kinematics_thermal_expansion.f90 @@ -42,7 +42,7 @@ subroutine kinematics_thermal_expansion_init real(pReal), dimension(:), allocatable :: & temp - write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_thermal_expansion_LABEL//' init -+>>>' + write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_thermal_expansion_LABEL//' init -+>>>'; flush(6) Ninstance = count(phase_kinematics == KINEMATICS_thermal_expansion_ID) From 7d2012f492021243e3d8c2bd8f1f51369150c075 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 01:29:35 +0100 Subject: [PATCH 55/75] no need to exclude small values no danger of division by zero --- src/kinematics_slipplane_opening.f90 | 30 +++++++++++----------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/kinematics_slipplane_opening.f90 b/src/kinematics_slipplane_opening.f90 index 018a5b4b5..a736338f9 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/kinematics_slipplane_opening.f90 @@ -146,30 +146,24 @@ subroutine kinematics_slipplane_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, udotd = sign(1.0_pReal,traction_d)* prm%sdot0* ( abs(traction_d)/traction_crit & - abs(traction_d)/prm%critLoad(i))**prm%n - if (abs(udotd) > tol_math_check) then - Ld = Ld + udotd*projection_d - dudotd_dt = udotd*prm%n/traction_d - forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotd_dt*projection_d(k,l)*projection_d(m,n) - endif + Ld = Ld + udotd*projection_d + dudotd_dt = udotd*prm%n/traction_d + forall (k=1:3,l=1:3,m=1:3,n=1:3) & + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotd_dt*projection_d(k,l)*projection_d(m,n) udott = sign(1.0_pReal,traction_t)* prm%sdot0* ( abs(traction_t)/traction_crit & - abs(traction_t)/prm%critLoad(i))**prm%n - if (abs(udott) > tol_math_check) then - Ld = Ld + udott*projection_t - dudott_dt = udott*prm%n/traction_t - forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudott_dt*projection_t(k,l)*projection_t(m,n) - endif + Ld = Ld + udott*projection_t + dudott_dt = udott*prm%n/traction_t + forall (k=1:3,l=1:3,m=1:3,n=1:3) & + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudott_dt*projection_t(k,l)*projection_t(m,n) udotn = prm%sdot0* ( max(0.0_pReal,traction_n)/traction_crit & - max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n - if (abs(udotn) > tol_math_check) then - Ld = Ld + udotn*projection_n - dudotn_dt = udotn*prm%n/traction_n - forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotn_dt*projection_n(k,l)*projection_n(m,n) - endif + Ld = Ld + udotn*projection_n + dudotn_dt = udotn*prm%n/traction_n + forall (k=1:3,l=1:3,m=1:3,n=1:3) & + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotn_dt*projection_n(k,l)*projection_n(m,n) enddo end associate From 0771411cd82a66ff7504748a731f1035bf4bf8f3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 01:33:03 +0100 Subject: [PATCH 56/75] group similar operations --- src/kinematics_slipplane_opening.f90 | 29 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/kinematics_slipplane_opening.f90 b/src/kinematics_slipplane_opening.f90 index a736338f9..2c94448bd 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/kinematics_slipplane_opening.f90 @@ -134,36 +134,35 @@ subroutine kinematics_slipplane_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, dLd_dTstar = 0.0_pReal do i = 1, prm%totalNslip - projection_d = math_outer(prm%slip_direction(1:3,i),prm%slip_normal(1:3,i)) + projection_d = math_outer(prm%slip_direction(1:3,i), prm%slip_normal(1:3,i)) projection_t = math_outer(prm%slip_transverse(1:3,i),prm%slip_normal(1:3,i)) - projection_n = math_outer(prm%slip_normal(1:3,i),prm%slip_normal(1:3,i)) + projection_n = math_outer(prm%slip_normal(1:3,i), prm%slip_normal(1:3,i)) traction_d = math_mul33xx33(S,projection_d) traction_t = math_mul33xx33(S,projection_t) traction_n = math_mul33xx33(S,projection_n) - traction_crit = prm%critLoad(i)* damage(homog)%p(damageOffset) ! degrading critical load carrying capacity by damage + traction_crit = prm%critLoad(i)* damage(homog)%p(damageOffset) ! degrading critical load carrying capacity by damage udotd = sign(1.0_pReal,traction_d)* prm%sdot0* ( abs(traction_d)/traction_crit & - abs(traction_d)/prm%critLoad(i))**prm%n - Ld = Ld + udotd*projection_d - dudotd_dt = udotd*prm%n/traction_d - forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotd_dt*projection_d(k,l)*projection_d(m,n) - udott = sign(1.0_pReal,traction_t)* prm%sdot0* ( abs(traction_t)/traction_crit & - abs(traction_t)/prm%critLoad(i))**prm%n - Ld = Ld + udott*projection_t - dudott_dt = udott*prm%n/traction_t - forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudott_dt*projection_t(k,l)*projection_t(m,n) - udotn = prm%sdot0* ( max(0.0_pReal,traction_n)/traction_crit & - max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n - Ld = Ld + udotn*projection_n + + dudotd_dt = udotd*prm%n/traction_d + dudott_dt = udott*prm%n/traction_t dudotn_dt = udotn*prm%n/traction_n + forall (k=1:3,l=1:3,m=1:3,n=1:3) & - dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotn_dt*projection_n(k,l)*projection_n(m,n) + dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + dudotd_dt*projection_d(k,l)*projection_d(m,n) & + + dudott_dt*projection_t(k,l)*projection_t(m,n) & + + dudotn_dt*projection_n(k,l)*projection_n(m,n) + + Ld = Ld + udotd*projection_d & + + udott*projection_t & + + udotn*projection_n enddo end associate From 5d2802f6c98eb952b6d5af69d610fc11234d7acd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 01:36:48 +0100 Subject: [PATCH 57/75] no patches available at the moment --- installation/patch/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/installation/patch/README.md b/installation/patch/README.md index 0b8251510..95f377691 100644 --- a/installation/patch/README.md +++ b/installation/patch/README.md @@ -9,14 +9,6 @@ cd DAMASK_ROOT patch -p1 < installation/patch/nameOfPatch ``` -## Available patches - - * **disable_HDF5** disables all HDF5 output. - HDF5 output is an experimental feature. Also, some routines not present in HDF5 1.8.x are removed to allow compilation of DAMASK with HDF5 < 1.10.x - - * **disable_old_output** disables all non-HDF5 output. - Saves some memory when using only HDF5 output - ## Create patch commit your changes From 8f43f054375b4689fbf19389baf343c8efc6a262 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 01:45:00 +0100 Subject: [PATCH 58/75] stronger encapsulation --- src/CPFEM.f90 | 2 +- src/CPFEM2.f90 | 2 +- src/results.f90 | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/CPFEM.f90 b/src/CPFEM.f90 index 3a7f35633..d74155703 100644 --- a/src/CPFEM.f90 +++ b/src/CPFEM.f90 @@ -377,7 +377,7 @@ subroutine CPFEM_results(inc,time) call constitutive_results call crystallite_results call homogenization_results - call results_removeLink('current') ! ToDo: put this into closeJobFile + call results_finalizeIncrement call results_closeJobFile end subroutine CPFEM_results diff --git a/src/CPFEM2.f90 b/src/CPFEM2.f90 index 6b4479b89..bc3a424e3 100644 --- a/src/CPFEM2.f90 +++ b/src/CPFEM2.f90 @@ -201,7 +201,7 @@ subroutine CPFEM_results(inc,time) call crystallite_results call homogenization_results call discretization_results - call results_removeLink('current') ! ToDo: put this into closeJobFile? + call results_finalizeIncrement call results_closeJobFile end subroutine CPFEM_results diff --git a/src/results.f90 b/src/results.f90 index 73c5d7dbb..ca2a868fb 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -47,6 +47,7 @@ module results results_openJobFile, & results_closeJobFile, & results_addIncrement, & + results_finalizeIncrement, & results_addGroup, & results_openGroup, & results_closeGroup, & @@ -119,6 +120,17 @@ subroutine results_addIncrement(inc,time) end subroutine results_addIncrement +!-------------------------------------------------------------------------------------------------- +!> @brief finalize increment +!> @details remove soft link +!-------------------------------------------------------------------------------------------------- +subroutine results_finalizeIncrement + + call results_removeLink('current') + +end subroutine results_finalizeIncrement + + !-------------------------------------------------------------------------------------------------- !> @brief open a group from the results file !-------------------------------------------------------------------------------------------------- From 87c7a5d5a32fbd810f8d3800f0ed7f43cb12ba80 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 02:11:19 +0100 Subject: [PATCH 59/75] polishing --- src/math.f90 | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index d6d87d30a..62c22b6d8 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -398,19 +398,19 @@ pure function math_exp33(A,n) real(pReal), dimension(3,3), intent(in) :: A real(pReal), dimension(3,3) :: B, math_exp33 real(pReal) :: invFac - integer :: order - - B = math_I3 ! init - invFac = 1.0_pReal ! 0! - math_exp33 = B ! A^0 = eye2 + integer :: n_ if (present(n)) then - order = n + n_ = n else - order = 5 + n_ = 5 endif - - do i = 1, order + + invFac = 1.0_pReal ! 0! + B = math_I3 + math_exp33 = math_I3 ! A^0 = I + + do i = 1, n_ invFac = invFac/real(i,pReal) ! invfac = 1/(i!) B = matmul(B,A) math_exp33 = math_exp33 + invFac*B ! exp = SUM (A^i)/(i!) @@ -882,16 +882,20 @@ real(pReal) function math_sampleGaussVar(meanvalue, stddev, width) real(pReal), intent(in), optional :: width ! width of considered values as multiples of standard deviation real(pReal), dimension(2) :: rnd ! random numbers real(pReal) :: scatter, & ! normalized scatter around meanvalue - myWidth + width_ if (abs(stddev) < tol_math_check) then math_sampleGaussVar = meanvalue else - myWidth = merge(width,3.0_pReal,present(width)) ! use +-3*sigma as default value for scatter if not given - + if (present(width)) then + width_ = width + else + width_ = 3.0_pReal ! use +-3*sigma as default scatter + endif + do call random_number(rnd) - scatter = myWidth * (2.0_pReal * rnd(1) - 1.0_pReal) + scatter = width_ * (2.0_pReal * rnd(1) - 1.0_pReal) if (rnd(2) <= exp(-0.5_pReal * scatter ** 2.0_pReal)) exit ! test if scattered value is drawn enddo From 115a2552f8f0b2fd3b5eda8b983ae880bacdfc44 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 Jan 2020 03:19:39 +0100 Subject: [PATCH 60/75] 4 newer versions are out --- src/element.f90 | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/element.f90 b/src/element.f90 index 02f5fb762..3a1e3f5a3 100644 --- a/src/element.f90 +++ b/src/element.f90 @@ -39,7 +39,7 @@ module element integer, parameter, private :: & NELEMTYPE = 13 - integer, dimension(NelemType), parameter, private :: NNODE = & + integer, dimension(NELEMTYPE), parameter, private :: NNODE = & [ & 3, & ! 2D 3node 1ip 6, & ! 2D 6node 3ip @@ -57,7 +57,7 @@ module element 20 & ! 3D 20node 27ip ] !< number of nodes that constitute a specific type of element - integer, dimension(NelemType), parameter, public :: GEOMTYPE = & + integer, dimension(NELEMTYPE), parameter, public :: GEOMTYPE = & [ & 1, & 2, & @@ -74,8 +74,7 @@ module element 10 & ] !< geometry type of particular element type - !integer, dimension(maxval(geomType)), parameter, private :: NCELLNODE = & ! Intel 16.0 complains - integer, dimension(10), parameter, private :: NCELLNODE = & + integer, dimension(maxval(GEOMTYPE)), parameter, private :: NCELLNODE = & [ & 3, & 7, & @@ -89,8 +88,7 @@ module element 64 & ] !< number of cell nodes in a specific geometry type - !integer, dimension(maxval(geomType)), parameter, private :: NIP = & ! Intel 16.0 complains - integer, dimension(10), parameter, private :: NIP = & + integer, dimension(maxval(GEOMTYPE)), parameter, private :: NIP = & [ & 1, & 3, & @@ -104,8 +102,7 @@ module element 27 & ] !< number of IPs in a specific geometry type - !integer, dimension(maxval(geomType)), parameter, private :: CELLTYPE = & ! Intel 16.0 complains - integer, dimension(10), parameter, private :: CELLTYPE = & + integer, dimension(maxval(GEOMTYPE)), parameter, private :: CELLTYPE = & [ & 1, & ! 2D 3node 2, & ! 2D 4node @@ -119,8 +116,7 @@ module element 4 & ! 3D 8node ] !< cell type that is used by each geometry type - !integer, dimension(maxval(cellType)), parameter, private :: nIPNeighbor = & ! Intel 16.0 complains - integer, dimension(4), parameter, private :: NIPNEIGHBOR = & + integer, dimension(maxval(CELLTYPE)), parameter, private :: NIPNEIGHBOR = & [ & 3, & ! 2D 3node 4, & ! 2D 4node @@ -128,8 +124,7 @@ module element 6 & ! 3D 8node ] !< number of ip neighbors / cell faces in a specific cell type - !integer, dimension(maxval(cellType)), parameter, private :: NCELLNODESPERCELLFACE = & ! Intel 16.0 complains - integer, dimension(4), parameter, private :: NCELLNODEPERCELLFACE = & + integer, dimension(maxval(CELLTYPE)), parameter, private :: NCELLNODEPERCELLFACE = & [ & 2, & ! 2D 3node 2, & ! 2D 4node @@ -137,8 +132,7 @@ module element 4 & ! 3D 8node ] !< number of cell nodes in a specific cell type - !integer, dimension(maxval(CELLTYPE)), parameter, private :: NCELLNODEPERCELL = & ! Intel 16.0 complains - integer, dimension(4), parameter, private :: NCELLNODEPERCELL = & + integer, dimension(maxval(CELLTYPE)), parameter, private :: NCELLNODEPERCELL = & [ & 3, & ! 2D 3node 4, & ! 2D 4node From d9afdaed165984d5a03d376ae37494c4bd61d900 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 11 Jan 2020 23:43:03 +0100 Subject: [PATCH 61/75] using updated tests (no crystallite anymore) --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index cda69f9a5..3eeffba15 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit cda69f9a59fe64223439a2c725e1a78cf22b28aa +Subproject commit 3eeffba1513c0495032d0f33522e3aaa1ed77465 From 97ddd56540d82bdad9c12a1ba6c166423928b5fb Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 11 Jan 2020 23:43:31 +0100 Subject: [PATCH 62/75] avoid strange deformation gradients otherwise, the test fails in a few cases (determinants were in the range 1e-5 to 1e16) --- python/tests/test_mechanics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tests/test_mechanics.py b/python/tests/test_mechanics.py index 1ea1f2bba..9e1d9bc0c 100644 --- a/python/tests/test_mechanics.py +++ b/python/tests/test_mechanics.py @@ -113,7 +113,7 @@ class TestMechanics: def test_strain_tensor_rotation_equivalence(self): """Ensure that left and right strain differ only by a rotation.""" - F = np.random.random((self.n,3,3)) + F = np.broadcast_to(np.eye(3),[self.n,3,3]) + (np.random.random((self.n,3,3))*0.5 - 0.25) m = np.random.random()*5.0-2.5 assert np.allclose(np.linalg.det(mechanics.strain_tensor(F,'U',m)), np.linalg.det(mechanics.strain_tensor(F,'V',m))) From ddd8027b8a354c0ad7535ac10bdaa96e41599cf3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 00:10:42 +0100 Subject: [PATCH 63/75] autodetect string length --- src/FEsolving.f90 | 4 ++-- src/IO.f90 | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/FEsolving.f90 b/src/FEsolving.f90 index 38788a065..8c9683266 100644 --- a/src/FEsolving.f90 +++ b/src/FEsolving.f90 @@ -46,10 +46,10 @@ subroutine FE_init call IO_open_inputFile(FILEUNIT) rewind(FILEUNIT) do - read (FILEUNIT,'(a256)',END=100) line + read (FILEUNIT,'(A)',END=100) line chunkPos = IO_stringPos(line) if(IO_lc(IO_stringValue(line,chunkPos,1)) == 'solver') then - read (FILEUNIT,'(a256)',END=100) line ! next line + read (FILEUNIT,'(A)',END=100) line ! next line chunkPos = IO_stringPos(line) symmetricSolver = (IO_intValue(line,chunkPos,2) /= 1) endif diff --git a/src/IO.f90 b/src/IO.f90 index 1e39daa1e..0436e9b19 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -244,7 +244,7 @@ subroutine IO_open_inputFile(fileUnit) do - read(unit2,'(A256)',END=220) line + read(unit2,'(A)',END=220) line chunkPos = IO_stringPos(line) if (IO_lc(IO_StringValue(line,chunkPos,1))=='*include') then @@ -1000,7 +1000,7 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN) #if defined(Marc4DAMASK) do - read(fileUnit,'(A256)',end=100) line + read(fileUnit,'(A)',end=100) line chunkPos = IO_stringPos(line) if (chunkPos(1) < 1) then ! empty line exit @@ -1041,14 +1041,14 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN) !-------------------------------------------------------------------------------------------------- ! check if the element values in the elset are auto generated backspace(fileUnit) - read(fileUnit,'(A256)',end=100) line + read(fileUnit,'(A)',end=100) line chunkPos = IO_stringPos(line) do i = 1,chunkPos(1) if (IO_lc(IO_stringValue(line,chunkPos,i)) == 'generate') rangeGeneration = .true. enddo do l = 1,c - read(fileUnit,'(A256)',end=100) line + read(fileUnit,'(A)',end=100) line chunkPos = IO_stringPos(line) if (verify(IO_stringValue(line,chunkPos,1),'0123456789') > 0) then ! a non-int, i.e. set names follow on this line do i = 1,chunkPos(1) ! loop over set names in line From 1bb94f03b8f15387918439deae6c79ee57ebda1b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 00:14:35 +0100 Subject: [PATCH 64/75] polishing (prospector was complaining) --- processing/post/addStrainTensors.py | 3 +-- processing/post/addTable.py | 1 + processing/post/averageDown.py | 1 + processing/post/blowUp.py | 1 + processing/post/growTable.py | 3 +-- python/damask/table.py | 9 ++++++--- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/processing/post/addStrainTensors.py b/processing/post/addStrainTensors.py index 756761e46..77015a91f 100755 --- a/processing/post/addStrainTensors.py +++ b/processing/post/addStrainTensors.py @@ -2,10 +2,9 @@ import os import sys +from io import StringIO from optparse import OptionParser -import numpy as np - import damask diff --git a/processing/post/addTable.py b/processing/post/addTable.py index c7d34f1e8..944214e69 100755 --- a/processing/post/addTable.py +++ b/processing/post/addTable.py @@ -2,6 +2,7 @@ import os import sys +from io import StringIO from optparse import OptionParser import damask diff --git a/processing/post/averageDown.py b/processing/post/averageDown.py index 817000dfa..cbd1f9637 100755 --- a/processing/post/averageDown.py +++ b/processing/post/averageDown.py @@ -2,6 +2,7 @@ import os import sys +from io import StringIO from optparse import OptionParser import numpy as np diff --git a/processing/post/blowUp.py b/processing/post/blowUp.py index ec42e2365..9cb6347ab 100755 --- a/processing/post/blowUp.py +++ b/processing/post/blowUp.py @@ -2,6 +2,7 @@ import os import sys +from io import StringIO from optparse import OptionParser from scipy import ndimage diff --git a/processing/post/growTable.py b/processing/post/growTable.py index 4fd647b1e..1dbfa8423 100755 --- a/processing/post/growTable.py +++ b/processing/post/growTable.py @@ -2,10 +2,9 @@ import os import sys +from io import StringIO from optparse import OptionParser -import numpy as np - import damask scriptName = os.path.splitext(os.path.basename(__file__))[0] diff --git a/python/damask/table.py b/python/damask/table.py index ef8a84276..343ba638d 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -274,7 +274,9 @@ class Table(): def append(self,other): """ - Append other table vertically (similar to numpy.vstack). Requires matching shapes and order. + Append other table vertically (similar to numpy.vstack). + + Requires matching labels/shapes and order. Parameters ---------- @@ -290,8 +292,9 @@ class Table(): def join(self,other): """ - Append other table horizontally (similar to numpy.hstack). Requires matching number of rows - and no common lables + Append other table horizontally (similar to numpy.hstack). + + Requires matching number of rows and no common labels. Parameters ---------- From 5bc1c98da7f520b218da6014f22d64442ad3e2e6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 00:49:03 +0100 Subject: [PATCH 65/75] use 0-based indexing for worldrank --- src/grid/grid_damage_spectral.f90 | 6 +++--- src/grid/grid_mech_FEM.f90 | 6 +++--- src/grid/grid_mech_spectral_polarisation.f90 | 6 +++--- src/grid/grid_thermal_spectral.f90 | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/grid/grid_damage_spectral.f90 b/src/grid/grid_damage_spectral.f90 index e2ce28c0e..97b20a6db 100644 --- a/src/grid/grid_damage_spectral.f90 +++ b/src/grid/grid_damage_spectral.f90 @@ -54,7 +54,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine grid_damage_spectral_init - PetscInt, dimension(worldsize) :: localK + PetscInt, dimension(0:worldsize-1) :: localK integer :: i, j, k, cell DM :: damage_grid Vec :: uBound, lBound @@ -78,8 +78,8 @@ subroutine grid_damage_spectral_init ! initialize solver specific parts of PETSc call SNESCreate(PETSC_COMM_WORLD,damage_snes,ierr); CHKERRQ(ierr) call SNESSetOptionsPrefix(damage_snes,'damage_',ierr);CHKERRQ(ierr) - localK = 0 - localK(worldrank+1) = grid3 + localK = 0 + localK(worldrank) = grid3 call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr) call DMDACreate3D(PETSC_COMM_WORLD, & DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, & ! cut off stencil at boundary diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 05fc3520a..b51ebb56a 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -81,7 +81,7 @@ contains subroutine grid_mech_FEM_init real(pReal) :: HGCoeff = 0.0e-2_pReal - PetscInt, dimension(worldsize) :: localK + PetscInt, dimension(0:worldsize-1) :: localK real(pReal), dimension(3,3) :: & temp33_Real = 0.0_pReal real(pReal), dimension(4,8) :: & @@ -120,8 +120,8 @@ subroutine grid_mech_FEM_init ! initialize solver specific parts of PETSc call SNESCreate(PETSC_COMM_WORLD,mech_snes,ierr); CHKERRQ(ierr) call SNESSetOptionsPrefix(mech_snes,'mech_',ierr);CHKERRQ(ierr) - localK = 0 - localK(worldrank+1) = grid3 + localK = 0 + localK(worldrank) = grid3 call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr) call DMDACreate3d(PETSC_COMM_WORLD, & DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, & diff --git a/src/grid/grid_mech_spectral_polarisation.f90 b/src/grid/grid_mech_spectral_polarisation.f90 index 59ab84869..bdc65a8c5 100644 --- a/src/grid/grid_mech_spectral_polarisation.f90 +++ b/src/grid/grid_mech_spectral_polarisation.f90 @@ -100,7 +100,7 @@ subroutine grid_mech_spectral_polarisation_init FandF_tau, & ! overall pointer to solution data F, & ! specific (sub)pointer F_tau ! specific (sub)pointer - PetscInt, dimension(worldsize) :: localK + PetscInt, dimension(0:worldsize-1) :: localK integer(HID_T) :: fileHandle, groupHandle integer :: fileUnit character(len=pStringLen) :: fileName @@ -130,8 +130,8 @@ subroutine grid_mech_spectral_polarisation_init ! initialize solver specific parts of PETSc call SNESCreate(PETSC_COMM_WORLD,snes,ierr); CHKERRQ(ierr) call SNESSetOptionsPrefix(snes,'mech_',ierr);CHKERRQ(ierr) - localK = 0 - localK(worldrank+1) = grid3 + localK = 0 + localK(worldrank) = grid3 call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr) call DMDACreate3d(PETSC_COMM_WORLD, & DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, & ! cut off stencil at boundary diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index c381d837d..2d69f075e 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -55,7 +55,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine grid_thermal_spectral_init - PetscInt, dimension(worldsize) :: localK + PetscInt, dimension(0:worldsize-1) :: localK integer :: i, j, k, cell DM :: thermal_grid PetscScalar, dimension(:,:,:), pointer :: x_scal @@ -77,8 +77,8 @@ subroutine grid_thermal_spectral_init ! initialize solver specific parts of PETSc call SNESCreate(PETSC_COMM_WORLD,thermal_snes,ierr); CHKERRQ(ierr) call SNESSetOptionsPrefix(thermal_snes,'thermal_',ierr);CHKERRQ(ierr) - localK = 0 - localK(worldrank+1) = grid3 + localK = 0 + localK(worldrank) = grid3 call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr) call DMDACreate3D(PETSC_COMM_WORLD, & DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, & ! cut off stencil at boundary From 13150291966c96d8f02aeef7bbb267e5a2513688 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 02:06:53 +0100 Subject: [PATCH 66/75] do not clutter comments --- python/damask/table.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/damask/table.py b/python/damask/table.py index 343ba638d..c40baa23c 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -22,7 +22,7 @@ class Table(): Additional, human-readable information. """ - self.comments = ['table.py v {}'.format(version)] if not comments else [c for c in comments] + self.comments = [c for c in comments] self.data = pd.DataFrame(data=data) self.shapes = shapes self.__label_condensed() @@ -79,8 +79,7 @@ class Table(): else: raise Exception - comments = ['table.py:from_ASCII v {}'.format(version)] - comments+= [f.readline()[:-1] for i in range(1,header)] + comments = [f.readline()[:-1] for i in range(1,header)] labels = f.readline().split() shapes = {} From 19e88df57131af9a82bce7d8da995e36bc21cb74 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 07:53:41 +0100 Subject: [PATCH 67/75] polishing --- python/damask/table.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/damask/table.py b/python/damask/table.py index c40baa23c..a3c0a8af0 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -3,7 +3,6 @@ import re import pandas as pd import numpy as np -from . import version class Table(): """Store spreadsheet-like data.""" @@ -22,7 +21,7 @@ class Table(): Additional, human-readable information. """ - self.comments = [c for c in comments] + self.comments = [] if comments is None else [c for c in comments] self.data = pd.DataFrame(data=data) self.shapes = shapes self.__label_condensed() @@ -77,8 +76,8 @@ class Table(): if keyword == 'header': header = int(header) else: - raise Exception - + raise TypeError + comments = [f.readline()[:-1] for i in range(1,header)] labels = f.readline().split() @@ -138,7 +137,7 @@ class Table(): data = np.loadtxt(content) for c in range(data.shape[1]-10): - shapes['user_defined{}'.format(c+1)] = (1,) + shapes['n/a_{}'.format(c+1)] = (1,) return Table(data,shapes,comments) From 70b73762edc4b3c2e7a6831724c86e8fbe169a2b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 19:21:16 +0100 Subject: [PATCH 68/75] avoid warning due to change in default parameter --- python/damask/dadf5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 73e785b10..5c9ebe08e 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -880,7 +880,7 @@ class DADF5(): else: nodes = vtk.vtkPoints() - with h5py.File(self.fname) as f: + with h5py.File(self.fname,'r') as f: nodes.SetData(numpy_support.numpy_to_vtk(f['/geometry/x_n'][()],deep=True)) vtk_geom = vtk.vtkUnstructuredGrid() From 26442ee7838b801caf2238a607c02e0315720868 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jan 2020 19:35:45 +0100 Subject: [PATCH 69/75] bugfixes missing import/outdated test --- PRIVATE | 2 +- python/damask/table.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 3eeffba15..99b076706 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 3eeffba1513c0495032d0f33522e3aaa1ed77465 +Subproject commit 99b076706a186ec7deb051ae181c2d9697c799fc diff --git a/python/damask/table.py b/python/damask/table.py index a3c0a8af0..b3dfc2433 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -3,6 +3,7 @@ import re import pandas as pd import numpy as np +from . import version class Table(): """Store spreadsheet-like data.""" From f9772a3df85bb7dbb2a5b3308c1443206e1650ca Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 13 Jan 2020 02:51:49 +0100 Subject: [PATCH 70/75] more descriptive name --- processing/post/addCompatibilityMismatch.py | 2 +- processing/post/addCurl.py | 2 +- processing/post/addDisplacement.py | 2 +- processing/post/addDivergence.py | 2 +- processing/post/addEuclideanDistance.py | 2 +- processing/post/addGradient.py | 2 +- processing/post/averageDown.py | 2 +- processing/post/blowUp.py | 2 +- processing/pre/geom_fromTable.py | 2 +- python/damask/grid_filters.py | 6 +++--- python/tests/test_grid_filters.py | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/processing/post/addCompatibilityMismatch.py b/processing/post/addCompatibilityMismatch.py index 29e874614..c7c5086ca 100755 --- a/processing/post/addCompatibilityMismatch.py +++ b/processing/post/addCompatibilityMismatch.py @@ -176,7 +176,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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) F = table.get(options.defgrad).reshape(grid[2],grid[1],grid[0],3,3) nodes = damask.grid_filters.node_coord(size,F) diff --git a/processing/post/addCurl.py b/processing/post/addCurl.py index 25639dc7c..f106054b3 100755 --- a/processing/post/addCurl.py +++ b/processing/post/addCurl.py @@ -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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) for label in options.labels: field = table.get(label) diff --git a/processing/post/addDisplacement.py b/processing/post/addDisplacement.py index 59630a6c6..faabc795f 100755 --- a/processing/post/addDisplacement.py +++ b/processing/post/addDisplacement.py @@ -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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) F = table.get(options.f).reshape(np.append(grid[::-1],(3,3))) if options.nodal: diff --git a/processing/post/addDivergence.py b/processing/post/addDivergence.py index 585ebb5a5..cb9486990 100755 --- a/processing/post/addDivergence.py +++ b/processing/post/addDivergence.py @@ -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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) for label in options.labels: field = table.get(label) diff --git a/processing/post/addEuclideanDistance.py b/processing/post/addEuclideanDistance.py index eaf91b894..be820220a 100755 --- a/processing/post/addEuclideanDistance.py +++ b/processing/post/addEuclideanDistance.py @@ -143,7 +143,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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) neighborhood = neighborhoods[options.neighborhood] diffToNeighbor = np.empty(list(grid+2)+[len(neighborhood)],'i') diff --git a/processing/post/addGradient.py b/processing/post/addGradient.py index 54b80ed26..8620c123b 100755 --- a/processing/post/addGradient.py +++ b/processing/post/addGradient.py @@ -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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) for label in options.labels: field = table.get(label) diff --git a/processing/post/averageDown.py b/processing/post/averageDown.py index cbd1f9637..0d3948251 100755 --- a/processing/post/averageDown.py +++ b/processing/post/averageDown.py @@ -65,7 +65,7 @@ for name in filenames: table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) if (options.grid is None or options.size is None): - grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) else: grid = np.array(options.grid,'i') size = np.array(options.size,'d') diff --git a/processing/post/blowUp.py b/processing/post/blowUp.py index 9cb6347ab..718858e1c 100755 --- a/processing/post/blowUp.py +++ b/processing/post/blowUp.py @@ -54,7 +54,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,origin = damask.grid_filters.cell_coord0_2_DNA(table.get(options.pos)) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos)) packing = np.array(options.packing,'i') outSize = grid*packing diff --git a/processing/pre/geom_fromTable.py b/processing/pre/geom_fromTable.py index 40fd17437..0879f8812 100755 --- a/processing/pre/geom_fromTable.py +++ b/processing/pre/geom_fromTable.py @@ -86,7 +86,7 @@ for name in filenames: if options.phase is None: table.data = np.column_stack((table.data,np.ones(len(table.data)))) # add single phase if no phase column given - grid,size,origin = damask.grid_filters.cell_coord0_2_DNA(table.data[:,0:3]) + grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.data[:,0:3]) indices = np.lexsort((table.data[:,0],table.data[:,1],table.data[:,2])) # indices of position when sorting x fast, z slow microstructure = np.empty(grid,dtype = int) # initialize empty microstructure diff --git a/python/damask/grid_filters.py b/python/damask/grid_filters.py index 9c8b1b88e..36ce3b8e2 100644 --- a/python/damask/grid_filters.py +++ b/python/damask/grid_filters.py @@ -181,7 +181,7 @@ def cell_coord(size,F,origin=np.zeros(3)): """ return cell_coord0(F.shape[:3][::-1],size,origin) + cell_displacement(size,F) -def cell_coord0_2_DNA(coord0,ordered=True): +def cell_coord0_gridSizeOrigin(coord0,ordered=True): """ Return grid 'DNA', i.e. grid, size, and origin from array of cell positions. @@ -231,7 +231,7 @@ def coord0_check(coord0): array of undeformed cell coordinates. """ - cell_coord0_2_DNA(coord0,ordered=True) + cell_coord0_gridSizeOrigin(coord0,ordered=True) @@ -331,7 +331,7 @@ def node_2_cell(node_data): return c[:-1,:-1,:-1] -def node_coord0_2_DNA(coord0,ordered=False): +def node_coord0_gridSizeOrigin(coord0,ordered=False): """ Return grid 'DNA', i.e. grid, size, and origin from array of nodal positions. diff --git a/python/tests/test_grid_filters.py b/python/tests/test_grid_filters.py index fdddaf3a1..a5455e1ae 100644 --- a/python/tests/test_grid_filters.py +++ b/python/tests/test_grid_filters.py @@ -26,12 +26,12 @@ class TestGridFilters: @pytest.mark.parametrize('mode',[('cell'),('node')]) def test_grid_DNA(self,mode): - """Ensure that xx_coord0_2_DNA is the inverse of xx_coord0.""" + """Ensure that xx_coord0_gridSizeOrigin is the inverse of xx_coord0.""" grid = np.random.randint(8,32,(3)) size = np.random.random(3) origin = np.random.random(3) coord0 = eval('grid_filters.{}_coord0(grid,size,origin)'.format(mode)) # noqa - _grid,_size,_origin = eval('grid_filters.{}_coord0_2_DNA(coord0.reshape((-1,3)))'.format(mode)) + _grid,_size,_origin = eval('grid_filters.{}_coord0_gridSizeOrigin(coord0.reshape((-1,3)))'.format(mode)) assert np.allclose(grid,_grid) and np.allclose(size,_size) and np.allclose(origin,_origin) def test_displacement_fluct_equivalence(self): From ff60cf0b6730e2ceffcc15a14af84e658561752c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 13 Jan 2020 03:40:37 +0100 Subject: [PATCH 71/75] use new table class --- processing/post/addAPS34IDEstrainCoords.py | 59 ++++++---------------- 1 file changed, 16 insertions(+), 43 deletions(-) diff --git a/processing/post/addAPS34IDEstrainCoords.py b/processing/post/addAPS34IDEstrainCoords.py index fe834cf38..c14983799 100755 --- a/processing/post/addAPS34IDEstrainCoords.py +++ b/processing/post/addAPS34IDEstrainCoords.py @@ -2,6 +2,7 @@ import os import sys +from io import StringIO from optparse import OptionParser import numpy as np @@ -24,61 +25,33 @@ Transform X,Y,Z,F APS BeamLine 34 coordinates to x,y,z APS strain coordinates. parser.add_option('-f','--frame',dest='frame', metavar='string', help='label of APS X,Y,Z coords') -parser.add_option('--depth', dest='depth', metavar='string', +parser.add_option('--depth', dest='depth', metavar='string', help='depth') (options,filenames) = parser.parse_args() +if filenames == []: filenames = [None] if options.frame is None: parser.error('frame not specified') if options.depth is None: parser.error('depth not specified') -# --- loop over input files ------------------------------------------------------------------------ -if filenames == []: filenames = [None] +theta=-0.75*np.pi +RotMat2TSL=np.array([[1., 0., 0.], + [0., np.cos(theta), np.sin(theta)], # Orientation to account for -135 deg + [0., -np.sin(theta), np.cos(theta)]]) # rotation for TSL convention for name in filenames: - try: table = damask.ASCIItable(name = name, - buffered = False) - except: continue - damask.util.report(scriptName,name) + damask.util.report(scriptName,name) -# ------------------------------------------ read header ------------------------------------------ + table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name) + + coord = - table.get(options.frame) + coord[:,2] += table.get(options.depth)[:,0] - table.head_read() + table.add('coord', + np.einsum('ijk,ik->ij',np.broadcast_to(RotMat2TSL,(coord.shape[0],3,3)),coord), + scriptID+' '+' '.join(sys.argv[1:])) -# ------------------------------------------ sanity checks ----------------------------------------- - errors = [] - if table.label_dimension(options.frame) != 3: - errors.append('input {} does not have dimension 3.'.format(options.frame)) - if table.label_dimension(options.depth) != 1: - errors.append('input {} does not have dimension 1.'.format(options.depth)) - if errors != []: - damask.util.croak(errors) - table.close(dismiss = True) - continue - - table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - -# ------------------------------------------ assemble header --------------------------------------- - table.labels_append(['%i_coord'%(i+1) for i in range(3)]) # extend ASCII header with new labels - table.head_write() - -# ------------------------------------------ process data ------------------------------------------ - theta=-0.75*np.pi - RotMat2TSL=np.array([[1., 0., 0.], - [0., np.cos(theta), np.sin(theta)], # Orientation to account for -135 deg - [0., -np.sin(theta), np.cos(theta)]]) # rotation for TSL convention - outputAlive = True - while outputAlive and table.data_read(): # read next data line of ASCII table - coord = list(map(float,table.data[table.label_index(options.frame):table.label_index(options.frame)+3])) - depth = float(table.data[table.label_index(options.depth)]) - - table.data_append(np.dot(RotMat2TSL,np.array([-coord[0],-coord[1],-coord[2]+depth]))) - - outputAlive = table.data_write() # output processed line - -# ------------------------------------------ output finalization ----------------------------------- - - table.close() # close ASCII tables + table.to_ASCII(sys.stdout if name is None else name) From a0a99afa97e44e3eace5f53d637cb92ee797b48c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 13 Jan 2020 09:56:43 +0100 Subject: [PATCH 72/75] [skip ci] obsolete material.config features --- PRIVATE | 2 +- examples/FEM/polyXtal/material.config | 210 +----------------- examples/MSC.Marc/material.config | 5 - .../EshelbyInclusion/material.config | 53 +++-- 4 files changed, 36 insertions(+), 234 deletions(-) diff --git a/PRIVATE b/PRIVATE index 99b076706..66d562c75 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 99b076706a186ec7deb051ae181c2d9697c799fc +Subproject commit 66d562c755cd9aa4bbb8280c509383014acd52db diff --git a/examples/FEM/polyXtal/material.config b/examples/FEM/polyXtal/material.config index 197890821..71e5350dc 100644 --- a/examples/FEM/polyXtal/material.config +++ b/examples/FEM/polyXtal/material.config @@ -4,14 +4,6 @@ [SX] mech none -#-------------------# - -#-------------------# - -[aLittleSomething] -(output) f -(output) p - #-------------------# #-------------------# @@ -50,408 +42,212 @@ interaction_twinslip 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 interaction_twintwin 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 atol_resistance 1 +(output) f +(output) p + #-------------------# #-------------------# [Grain001] -crystallite 1 (constituent) phase 1 texture 1 fraction 1.0 - [Grain002] -crystallite 1 (constituent) phase 1 texture 2 fraction 1.0 - [Grain003] -crystallite 1 (constituent) phase 1 texture 3 fraction 1.0 - [Grain004] -crystallite 1 (constituent) phase 1 texture 4 fraction 1.0 - [Grain005] -crystallite 1 (constituent) phase 1 texture 5 fraction 1.0 - [Grain006] -crystallite 1 (constituent) phase 1 texture 6 fraction 1.0 - [Grain007] -crystallite 1 (constituent) phase 1 texture 7 fraction 1.0 - [Grain008] -crystallite 1 (constituent) phase 1 texture 8 fraction 1.0 - [Grain009] -crystallite 1 (constituent) phase 1 texture 9 fraction 1.0 - [Grain010] -crystallite 1 (constituent) phase 1 texture 10 fraction 1.0 - [Grain011] -crystallite 1 (constituent) phase 1 texture 11 fraction 1.0 - [Grain012] -crystallite 1 (constituent) phase 1 texture 12 fraction 1.0 - [Grain013] -crystallite 1 (constituent) phase 1 texture 13 fraction 1.0 - [Grain014] -crystallite 1 (constituent) phase 1 texture 14 fraction 1.0 - [Grain015] -crystallite 1 (constituent) phase 1 texture 15 fraction 1.0 - [Grain016] -crystallite 1 (constituent) phase 1 texture 16 fraction 1.0 - [Grain017] -crystallite 1 (constituent) phase 1 texture 17 fraction 1.0 - [Grain018] -crystallite 1 (constituent) phase 1 texture 18 fraction 1.0 - [Grain019] -crystallite 1 (constituent) phase 1 texture 19 fraction 1.0 - [Grain020] -crystallite 1 (constituent) phase 1 texture 20 fraction 1.0 - [Grain021] -crystallite 1 (constituent) phase 1 texture 21 fraction 1.0 - [Grain022] -crystallite 1 (constituent) phase 1 texture 22 fraction 1.0 - [Grain023] -crystallite 1 (constituent) phase 1 texture 23 fraction 1.0 - [Grain024] -crystallite 1 (constituent) phase 1 texture 24 fraction 1.0 - [Grain025] -crystallite 1 (constituent) phase 1 texture 25 fraction 1.0 - [Grain026] -crystallite 1 (constituent) phase 1 texture 26 fraction 1.0 - [Grain027] -crystallite 1 (constituent) phase 1 texture 27 fraction 1.0 - [Grain028] -crystallite 1 (constituent) phase 1 texture 28 fraction 1.0 - [Grain029] -crystallite 1 (constituent) phase 1 texture 29 fraction 1.0 - [Grain030] -crystallite 1 (constituent) phase 1 texture 30 fraction 1.0 - [Grain031] -crystallite 1 (constituent) phase 1 texture 31 fraction 1.0 - [Grain032] -crystallite 1 (constituent) phase 1 texture 32 fraction 1.0 - [Grain033] -crystallite 1 (constituent) phase 1 texture 33 fraction 1.0 - [Grain034] -crystallite 1 (constituent) phase 1 texture 34 fraction 1.0 - [Grain035] -crystallite 1 (constituent) phase 1 texture 35 fraction 1.0 - [Grain036] -crystallite 1 (constituent) phase 1 texture 36 fraction 1.0 - [Grain037] -crystallite 1 (constituent) phase 1 texture 37 fraction 1.0 - [Grain038] -crystallite 1 (constituent) phase 1 texture 38 fraction 1.0 - [Grain039] -crystallite 1 (constituent) phase 1 texture 39 fraction 1.0 - [Grain040] -crystallite 1 (constituent) phase 1 texture 40 fraction 1.0 - [Grain041] -crystallite 1 (constituent) phase 1 texture 41 fraction 1.0 - [Grain042] -crystallite 1 (constituent) phase 1 texture 42 fraction 1.0 - [Grain043] -crystallite 1 (constituent) phase 1 texture 43 fraction 1.0 - [Grain044] -crystallite 1 (constituent) phase 1 texture 44 fraction 1.0 - [Grain045] -crystallite 1 (constituent) phase 1 texture 45 fraction 1.0 - [Grain046] -crystallite 1 (constituent) phase 1 texture 46 fraction 1.0 - [Grain047] -crystallite 1 (constituent) phase 1 texture 47 fraction 1.0 - [Grain048] -crystallite 1 (constituent) phase 1 texture 48 fraction 1.0 - [Grain049] -crystallite 1 (constituent) phase 1 texture 49 fraction 1.0 - [Grain050] -crystallite 1 (constituent) phase 1 texture 50 fraction 1.0 - [Grain051] -crystallite 1 (constituent) phase 1 texture 51 fraction 1.0 - [Grain052] -crystallite 1 (constituent) phase 1 texture 52 fraction 1.0 - [Grain053] -crystallite 1 (constituent) phase 1 texture 53 fraction 1.0 - [Grain054] -crystallite 1 (constituent) phase 1 texture 54 fraction 1.0 - [Grain055] -crystallite 1 (constituent) phase 1 texture 55 fraction 1.0 - [Grain056] -crystallite 1 (constituent) phase 1 texture 56 fraction 1.0 - [Grain057] -crystallite 1 (constituent) phase 1 texture 57 fraction 1.0 - [Grain058] -crystallite 1 (constituent) phase 1 texture 58 fraction 1.0 - [Grain059] -crystallite 1 (constituent) phase 1 texture 59 fraction 1.0 - [Grain060] -crystallite 1 (constituent) phase 1 texture 60 fraction 1.0 - [Grain061] -crystallite 1 (constituent) phase 1 texture 61 fraction 1.0 - [Grain062] -crystallite 1 (constituent) phase 1 texture 62 fraction 1.0 - [Grain063] -crystallite 1 (constituent) phase 1 texture 63 fraction 1.0 - [Grain064] -crystallite 1 (constituent) phase 1 texture 64 fraction 1.0 - [Grain065] -crystallite 1 (constituent) phase 1 texture 65 fraction 1.0 - [Grain066] -crystallite 1 (constituent) phase 1 texture 66 fraction 1.0 - [Grain067] -crystallite 1 (constituent) phase 1 texture 67 fraction 1.0 - [Grain068] -crystallite 1 (constituent) phase 1 texture 68 fraction 1.0 - [Grain069] -crystallite 1 (constituent) phase 1 texture 69 fraction 1.0 - [Grain070] -crystallite 1 (constituent) phase 1 texture 70 fraction 1.0 - [Grain071] -crystallite 1 (constituent) phase 1 texture 71 fraction 1.0 - [Grain072] -crystallite 1 (constituent) phase 1 texture 72 fraction 1.0 - [Grain073] -crystallite 1 (constituent) phase 1 texture 73 fraction 1.0 - [Grain074] -crystallite 1 (constituent) phase 1 texture 74 fraction 1.0 - [Grain075] -crystallite 1 (constituent) phase 1 texture 75 fraction 1.0 - [Grain076] -crystallite 1 (constituent) phase 1 texture 76 fraction 1.0 - [Grain077] -crystallite 1 (constituent) phase 1 texture 77 fraction 1.0 - [Grain078] -crystallite 1 (constituent) phase 1 texture 78 fraction 1.0 - [Grain079] -crystallite 1 (constituent) phase 1 texture 79 fraction 1.0 - [Grain080] -crystallite 1 (constituent) phase 1 texture 80 fraction 1.0 - [Grain081] -crystallite 1 (constituent) phase 1 texture 81 fraction 1.0 - [Grain082] -crystallite 1 (constituent) phase 1 texture 82 fraction 1.0 - [Grain083] -crystallite 1 (constituent) phase 1 texture 83 fraction 1.0 - [Grain084] -crystallite 1 (constituent) phase 1 texture 84 fraction 1.0 - [Grain085] -crystallite 1 (constituent) phase 1 texture 85 fraction 1.0 - [Grain086] -crystallite 1 (constituent) phase 1 texture 86 fraction 1.0 - [Grain087] -crystallite 1 (constituent) phase 1 texture 87 fraction 1.0 - [Grain088] -crystallite 1 (constituent) phase 1 texture 88 fraction 1.0 - [Grain089] -crystallite 1 (constituent) phase 1 texture 89 fraction 1.0 - [Grain090] -crystallite 1 (constituent) phase 1 texture 90 fraction 1.0 - [Grain091] -crystallite 1 (constituent) phase 1 texture 91 fraction 1.0 - [Grain092] -crystallite 1 (constituent) phase 1 texture 92 fraction 1.0 - [Grain093] -crystallite 1 (constituent) phase 1 texture 93 fraction 1.0 - [Grain094] -crystallite 1 (constituent) phase 1 texture 94 fraction 1.0 - [Grain095] -crystallite 1 (constituent) phase 1 texture 95 fraction 1.0 - [Grain096] -crystallite 1 (constituent) phase 1 texture 96 fraction 1.0 - [Grain097] -crystallite 1 (constituent) phase 1 texture 97 fraction 1.0 - [Grain098] -crystallite 1 (constituent) phase 1 texture 98 fraction 1.0 - [Grain099] -crystallite 1 (constituent) phase 1 texture 99 fraction 1.0 - [Grain100] -crystallite 1 (constituent) phase 1 texture 100 fraction 1.0 #-------------------# diff --git a/examples/MSC.Marc/material.config b/examples/MSC.Marc/material.config index 69b8412f4..46ea44367 100644 --- a/examples/MSC.Marc/material.config +++ b/examples/MSC.Marc/material.config @@ -419,11 +419,6 @@ [cube] (gauss) phi1 0 Phi 0 phi2 0 -#-------------------# - -#-------------------# - -{../ConfigFiles/Crystallite_All.config} #-------------------# diff --git a/examples/SpectralMethod/EshelbyInclusion/material.config b/examples/SpectralMethod/EshelbyInclusion/material.config index 6dda5c2dd..008c44f4b 100644 --- a/examples/SpectralMethod/EshelbyInclusion/material.config +++ b/examples/SpectralMethod/EshelbyInclusion/material.config @@ -3,25 +3,12 @@ #-------------------# [direct] -mech none # isostrain 1 grain +mech none -thermal adiabatic # thermal strain (stress) induced mass transport +thermal adiabatic t0 330.0 (output) temperature -#-------------------# - -#-------------------# - -[aLittleSomething] - -(output) texture -(output) f -(output) p -(output) fe -(output) fi -(output) fp - #-------------------# #-------------------# @@ -34,6 +21,12 @@ plasticity none {config/elastic_isotropic.config} {config/thermal.config} +(output) f +(output) p +(output) fe +(output) fi +(output) fp + #................. [Ti matrix] @@ -43,6 +36,12 @@ plasticity none {config/elastic_Ti.config} {config/thermal.config} +(output) f +(output) p +(output) fe +(output) fi +(output) fp + #................. [isotropic inclusion] @@ -52,6 +51,12 @@ plasticity none {config/thermal.config} {config/thermalExpansion_isotropic.config} +(output) f +(output) p +(output) fe +(output) fi +(output) fp + #................. [anisotropic inclusion] @@ -61,6 +66,12 @@ plasticity none {config/thermal.config} {config/thermalExpansion_fullyAnisotropic.config} +(output) f +(output) p +(output) fe +(output) fi +(output) fp + #................. [Ti inclusion] @@ -71,32 +82,32 @@ plasticity none {config/thermal.config} {config/thermalExpansion_Ti.config} +(output) f +(output) p +(output) fe +(output) fi +(output) fp + #--------------------------# #--------------------------# [isotropic matrix] -crystallite 1 (constituent) phase 1 texture 1 fraction 1.0 [Ti matrix] -crystallite 1 (constituent) phase 2 texture 1 fraction 1.0 [isotropic inclusion] -crystallite 1 (constituent) phase 3 texture 1 fraction 1.0 [anisotropic inclusion] -crystallite 1 (constituent) phase 4 texture 1 fraction 1.0 [rotated inclusion] -crystallite 1 (constituent) phase 4 texture 2 fraction 1.0 [Ti inclusion] -crystallite 1 (constituent) phase 5 texture 1 fraction 1.0 #--------------------------# From 7b3015c6bd9464ed83c714684cf4364db9e9f76a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 13 Jan 2020 18:44:50 +0100 Subject: [PATCH 73/75] relaxed tolerances. one out of multiple thousand tests failed ... --- python/tests/test_Rotation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tests/test_Rotation.py b/python/tests/test_Rotation.py index 08d543554..e352e1c26 100644 --- a/python/tests/test_Rotation.py +++ b/python/tests/test_Rotation.py @@ -45,17 +45,17 @@ class TestRotation: def test_Homochoric(self,default): for rot in default: assert np.allclose(rot.asRodrigues(), - Rotation.fromHomochoric(rot.asHomochoric()).asRodrigues()) + Rotation.fromHomochoric(rot.asHomochoric()).asRodrigues(),rtol=5.e-5) def test_Cubochoric(self,default): for rot in default: assert np.allclose(rot.asHomochoric(), - Rotation.fromCubochoric(rot.asCubochoric()).asHomochoric()) + Rotation.fromCubochoric(rot.asCubochoric()).asHomochoric(),rtol=5.e-5) def test_Quaternion(self,default): for rot in default: assert np.allclose(rot.asCubochoric(), - Rotation.fromQuaternion(rot.asQuaternion()).asCubochoric()) + Rotation.fromQuaternion(rot.asQuaternion()).asCubochoric(),rtol=5.e-5) @pytest.mark.parametrize('model',['Bain','KS','GT','GT_prime','NW','Pitsch']) From 93fca511e98fb2b5342333f5d68aaa9c81af08f1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 13 Jan 2020 21:40:22 +0100 Subject: [PATCH 74/75] used wrong PRIVATE (causing tests to fail) --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 66d562c75..99b076706 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 66d562c755cd9aa4bbb8280c509383014acd52db +Subproject commit 99b076706a186ec7deb051ae181c2d9697c799fc From 31788301e99165ec7afcdb84212fdaf67ffdce16 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 13 Jan 2020 23:55:20 +0100 Subject: [PATCH 75/75] [skip ci] updated version information after successful test of v2.0.3-1484-g93fca511 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a7308c0ee..c0a399148 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.3-1406-g5fc1abae +v2.0.3-1484-g93fca511