From ced4d9d393b6a826dc91b1ef37e7e80c37f9a447 Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 28 Apr 2016 04:14:08 +0200 Subject: [PATCH 01/10] updated version information after successful test of v2.0.0-204-g426658e --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index aeeddb7fb..f68d35f60 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-201-gd497503 +v2.0.0-204-g426658e From b9021f3b3f61425040bb4026fc97d9a8d214c74b Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 28 Apr 2016 16:13:52 +0200 Subject: [PATCH 02/10] updated version information after successful test of v2.0.0-205-gced4d9d --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f68d35f60..7e9361c34 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-204-g426658e +v2.0.0-205-gced4d9d From d3a7ceff15236172ba65bae10a679f3bd222e9b0 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 28 Apr 2016 13:24:08 -0400 Subject: [PATCH 03/10] fixed serious bug regarding wrong reshaping order (was 'C' now 'F') of 3dim to 1dim and back. --- processing/post/addEuclideanDistance.py | 34 +++++++++++++++---------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/processing/post/addEuclideanDistance.py b/processing/post/addEuclideanDistance.py index 9181e3785..4b3f518d5 100755 --- a/processing/post/addEuclideanDistance.py +++ b/processing/post/addEuclideanDistance.py @@ -159,7 +159,9 @@ for name in filenames: if table.label_dimension(options.id) != 1: errors.append('grain identifier {} not found.'.format(options.id)) else: idCol = table.label_index(options.id) - if remarks != []: damask.util.croak(remarks) + if remarks != []: + damask.util.croak(remarks) + remarks = [] if errors != []: damask.util.croak(errors) table.close(dismiss = True) @@ -184,6 +186,8 @@ for name in filenames: N = grid.prod() if N != len(table.data): errors.append('data count {} does not match grid {}.'.format(N,'x'.join(map(str,grid)))) + else: remarks.append('grid: {}x{}x{}'.format(*grid)) + if remarks != []: damask.util.croak(remarks) if errors != []: damask.util.croak(errors) table.close(dismiss = True) @@ -194,33 +198,37 @@ for name in filenames: stack = [table.data] neighborhood = neighborhoods[options.neighborhood] - convoluted = np.empty([len(neighborhood)]+list(grid+2),'i') - microstructure = periodic_3Dpad(np.array(table.data[:,idCol].reshape(grid),'i')) - + diffToNeighbor = np.empty(list(grid+2)+[len(neighborhood)],'i') + microstructure = periodic_3Dpad(table.data[:,idCol].astype('i').reshape(grid,order='F')) + for i,p in enumerate(neighborhood): stencil = np.zeros((3,3,3),'i') stencil[1,1,1] = -1 stencil[p[0]+1, p[1]+1, p[2]+1] = 1 - convoluted[i,:,:,:] = ndimage.convolve(microstructure,stencil) + diffToNeighbor[:,:,:,i] = ndimage.convolve(microstructure,stencil) # compare ID at each point... + # ...to every one in the specified neighborhood + # for same IDs at both locations ==> 0 - distance = np.ones((len(feature_list),grid[0],grid[1],grid[2]),'d') - - convoluted = np.sort(convoluted,axis = 0) - uniques = np.where(convoluted[0,1:-1,1:-1,1:-1] != 0, 1,0) # initialize unique value counter (exclude myself [= 0]) + diffToNeighbor = np.sort(diffToNeighbor) # sort diff such that number of changes in diff (steps)... + # ...reflects number of unique neighbors + uniques = np.where(diffToNeighbor[1:-1,1:-1,1:-1,0] != 0, 1,0) # initialize unique value counter (exclude myself [= 0]) for i in xrange(1,len(neighborhood)): # check remaining points in neighborhood uniques += np.where(np.logical_and( - convoluted[i,1:-1,1:-1,1:-1] != convoluted[i-1,1:-1,1:-1,1:-1], # flip of ID difference detected? - convoluted[i,1:-1,1:-1,1:-1] != 0), # not myself? - 1,0) # count flip + diffToNeighbor[1:-1,1:-1,1:-1,i] != 0, # not myself? + diffToNeighbor[1:-1,1:-1,1:-1,i] != diffToNeighbor[1:-1,1:-1,1:-1,i-1], + ), # flip of ID difference detected? + 1,0) # count that flip + + distance = np.ones((len(feature_list),grid[0],grid[1],grid[2]),'d') for i,feature_id in enumerate(feature_list): distance[i,:,:,:] = np.where(uniques >= features[feature_id]['aliens'],0.0,1.0) # seed with 0.0 when enough unique neighbor IDs are present distance[i,:,:,:] = ndimage.morphology.distance_transform_edt(distance[i,:,:,:])*[options.scale]*3 - distance.shape = ([len(feature_list),grid.prod(),1]) + distance = distance.reshape([len(feature_list),grid.prod(),1],order='F') for i in xrange(len(feature_list)): stack.append(distance[i,:]) From 5089d86b3d3f205e902979122d1165e51de35d9d Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 28 Apr 2016 20:28:45 -0400 Subject: [PATCH 04/10] sorting labels are now optional. uses existing labels (from left to right) for sorting if none specified. --- processing/post/sortTable.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/processing/post/sortTable.py b/processing/post/sortTable.py index 92fe221ee..e4f3c8dd0 100755 --- a/processing/post/sortTable.py +++ b/processing/post/sortTable.py @@ -14,7 +14,7 @@ scriptID = ' '.join([scriptName,damask.version]) # -------------------------------------------------------------------- parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """ -Sort rows by given column label(s). +Sort rows by given (or all) column label(s). Examples: With coordinates in columns "x", "y", and "z"; sorting with x slowest and z fastest varying index: --label x,y,z. @@ -30,25 +30,19 @@ parser.add_option('-r','--reverse', action = 'store_true', help = 'sort in reverse') -parser.set_defaults(key = [], - reverse = False, +parser.set_defaults(reverse = False, ) (options,filenames) = parser.parse_args() -if options.keys is None: - parser.error('No sorting column(s) specified.') - -options.keys.reverse() # numpy sorts with most significant column as last # --- loop over input files ------------------------------------------------------------------------- if filenames == []: filenames = [None] for name in filenames: - try: - table = damask.ASCIItable(name = name, - buffered = False) + try: table = damask.ASCIItable(name = name, + buffered = False) except: continue damask.util.report(scriptName,name) @@ -61,15 +55,16 @@ for name in filenames: # ------------------------------------------ process data --------------------------------------- table.data_readArray() + + keys = table.labels[::-1] if options.keys is None else options.keys[::-1] # numpy sorts with most significant column as last + cols = [] remarks = [] - for i,column in enumerate(table.label_index(options.keys)): - if column < 0: - remarks.append("label {0} not present.".format(options.keys[i])) - else: - cols += [table.data[:,column]] + for i,column in enumerate(table.label_index(keys)): + if column < 0: remarks.append('label "{}" not present...'.format(keys[i])) + else: cols += [table.data[:,column]] if remarks != []: damask.util.croak(remarks) - + ind = np.lexsort(cols) if cols != [] else np.arange(table.data.shape[0]) if options.reverse: ind = ind[::-1] From 79fac183e3f96c003cbaeb429e7bf5021563afaa Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 29 Apr 2016 11:50:19 +0200 Subject: [PATCH 05/10] updated version information after successful test of v2.0.0-208-g5089d86 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7e9361c34..ed80b38eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-205-gced4d9d +v2.0.0-208-g5089d86 From f07f8e12ca3815349f75498accb1afd3ffc5b5e0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 29 Apr 2016 15:22:36 +0200 Subject: [PATCH 06/10] don't change line endings for real windows files --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 2de3643a1..92203c18d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,4 @@ *.png binary *.jpg binary *.cae binary +installation/mods_Abaqus/abaqus_v6_windows.env -crlf From 3aeda37a46acc23b5bb2fa1d243fedea1c0a565f Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 29 Apr 2016 16:13:50 +0200 Subject: [PATCH 07/10] updated version information after successful test of v2.0.0-209-g79fac18 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ed80b38eb..b0bc96787 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-208-g5089d86 +v2.0.0-209-g79fac18 From 9cae9b895eab9ac4f126baeb1b36cc91c0991e97 Mon Sep 17 00:00:00 2001 From: Test User Date: Sun, 1 May 2016 00:05:05 +0200 Subject: [PATCH 08/10] updated version information after successful test of v2.0.0-212-g58d7005 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b0bc96787..a79aba47e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-209-g79fac18 +v2.0.0-212-g58d7005 From 6b57eece6ac95cdbd14a56857064c9d941e88879 Mon Sep 17 00:00:00 2001 From: Test User Date: Sun, 1 May 2016 16:13:51 +0200 Subject: [PATCH 09/10] updated version information after successful test of v2.0.0-213-g9cae9b8 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a79aba47e..2593a6709 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-212-g58d7005 +v2.0.0-213-g9cae9b8 From c0b4bb6b44208b8ca2cebc257f70bd52faeef67f Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 2 May 2016 04:13:07 +0200 Subject: [PATCH 10/10] updated version information after successful test of v2.0.0-214-g6b57eec --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2593a6709..84bdaf784 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-213-g9cae9b8 +v2.0.0-214-g6b57eec