From 0d1dfc153e1d25fb878837715061fd56831156a1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 31 Jul 2016 21:30:23 +0200 Subject: [PATCH 1/7] without ticks, zsh expands ... to ../.. for some strange reasons --- DAMASK_env.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DAMASK_env.zsh b/DAMASK_env.zsh index 2ce2351cd..3bbab82df 100644 --- a/DAMASK_env.zsh +++ b/DAMASK_env.zsh @@ -41,7 +41,7 @@ if [ ! -z "$PS1" ]; then echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf echo https://damask.mpie.de echo - echo Using environment with ... + echo "Using environment with ..." echo "DAMASK $DAMASK_ROOT" echo "Spectral Solver $SOLVER" echo "Post Processing $PROCESSING" From 22d275b009b8b1f27f98ebbcdcdae504c877c4b6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 8 Aug 2016 10:36:34 +0200 Subject: [PATCH 2/7] initialization also needed for "empty" phase to allocate state arrays seems to be safe --- code/plastic_nonlocal.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/plastic_nonlocal.f90 b/code/plastic_nonlocal.f90 index cb2b31772..f7b36897a 100644 --- a/code/plastic_nonlocal.f90 +++ b/code/plastic_nonlocal.f90 @@ -1115,7 +1115,7 @@ allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNinstances), initializeInstances: do phase = 1_pInt, size(phase_plasticity) NofMyPhase=count(material_phase==phase) - myPhase2: if (phase_plasticity(phase) == PLASTICITY_NONLOCAL_ID .and. NofMyPhase/=0) then + myPhase2: if (phase_plasticity(phase) == PLASTICITY_NONLOCAL_ID) then instance = phase_plasticityInstance(phase) !*** Inverse lookup of my slip system family and the slip system in lattice From 535f8be76ac99c2ba68c955f9095e3269af2113f Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 8 Aug 2016 16:27:05 +0200 Subject: [PATCH 3/7] updated version information after successful test of v2.0.1-39-g22d275b --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1ec9fb2d4..5a316242f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.1-35-g6c82641 +v2.0.1-39-g22d275b From 6bdce9b3320fa3505c2d6e077a84f80ec9d526b0 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 11 Aug 2016 14:22:07 -0400 Subject: [PATCH 4/7] fixed error for completely empty label list in read_array --- lib/damask/asciitable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/damask/asciitable.py b/lib/damask/asciitable.py index 4fe4f9156..145b87974 100644 --- a/lib/damask/asciitable.py +++ b/lib/damask/asciitable.py @@ -501,10 +501,10 @@ class ASCIItable(): columns = [] for i,(c,d) in enumerate(zip(indices[present],dimensions[present])): # for all valid labels ... # ... transparently add all components unless column referenced by number or with explicit dimension - columns += range(c,c + \ - (d if str(c) != str(labels[present[i]]) else \ + columns += range(c,c + + (d if str(c) != str(labels[present[i]]) else 1)) - use = np.array(columns) + use = np.array(columns) if len(columns) > 0 else None self.tags = list(np.array(self.tags)[use]) # update labels with valid subset From 600731b15ca2fd90ffedbb5c284114082589a5b0 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 11 Aug 2016 14:23:29 -0400 Subject: [PATCH 5/7] modernized, gracefully add NaN for out-of-bounds mapping --- processing/post/addMapped.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/processing/post/addMapped.py b/processing/post/addMapped.py index c57e62d8b..f67d88d15 100755 --- a/processing/post/addMapped.py +++ b/processing/post/addMapped.py @@ -2,6 +2,7 @@ # -*- coding: UTF-8 no BOM -*- import os,sys +import numpy as np from optparse import OptionParser import damask @@ -28,7 +29,7 @@ parser.add_option('-o','--offset', parser.add_option('-l','--label', dest = 'label', action = 'extend', metavar = '', - help='heading of column(s) to be mapped') + help='column label(s) to be mapped') parser.add_option('-a','--asciitable', dest = 'asciitable', type = 'string', metavar = 'string', @@ -49,12 +50,13 @@ if options.map is None: if options.asciitable is not None and os.path.isfile(options.asciitable): mappedTable = damask.ASCIItable(name = options.asciitable, - buffered = False, readonly = True) + buffered = False, + readonly = True) mappedTable.head_read() # read ASCII header info of mapped table missing_labels = mappedTable.data_readArray(options.label) if len(missing_labels) > 0: - mappedTable.croak('column{} {} not found...'.format('s' if len(missing_labels) > 1 else '',', '.join(missing_labels))) + damask.util.croak('column{} {} not found...'.format('s' if len(missing_labels) > 1 else '',', '.join(missing_labels))) else: parser.error('no mapped ASCIItable given.') @@ -64,9 +66,8 @@ else: 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) @@ -96,7 +97,10 @@ for name in filenames: outputAlive = True while outputAlive and table.data_read(): # read next data line of ASCII table - table.data_append(mappedTable.data[int(round(float(table.data[mappedColumn])))+options.offset-1]) # add all mapped data types + try: + table.data_append(mappedTable.data[int(round(float(table.data[mappedColumn])))+options.offset-1]) # add all mapped data types + except IndexError: + table.data_append(np.nan*np.ones_like(mappedTable.data[0])) outputAlive = table.data_write() # output processed line # ------------------------------------------ output finalization ----------------------------------- From 64ac05fc26374c12b1dc46a35b82d842740eaf4f Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 11 Aug 2016 14:24:40 -0400 Subject: [PATCH 6/7] removed left-over debug output --- processing/post/addSchmidfactors.py | 1 - 1 file changed, 1 deletion(-) diff --git a/processing/post/addSchmidfactors.py b/processing/post/addSchmidfactors.py index 0bc529034..067c3036a 100755 --- a/processing/post/addSchmidfactors.py +++ b/processing/post/addSchmidfactors.py @@ -167,7 +167,6 @@ force = np.array(options.force) force /= np.linalg.norm(force) if options.normal: - damask.util.croak('got normal') normal = np.array(options.normal) normal /= np.linalg.norm(normal) if abs(np.dot(force,normal)) > 1e-3: From 49f94a1cb57e09ab23b6c0ff4abe08dc4784f62b Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 12 Aug 2016 04:27:00 +0200 Subject: [PATCH 7/7] updated version information after successful test of v2.0.1-43-g64ac05f --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5a316242f..921b19cbd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.1-39-g22d275b +v2.0.1-43-g64ac05f