From bdda0eaebcbe890ca79492b818520384de369ae7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 31 Aug 2021 22:47:19 +0200 Subject: [PATCH 1/9] new name changed around the 4.5 branch (years ago) --- cmake/Compiler-GNU.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index d0e7d81a2..cafcfabca 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -25,7 +25,7 @@ set (LINKER_FLAGS "${LINKER_FLAGS},-undefined,dynamic_lookup" ) #------------------------------------------------------------------------------------------------ # Fine tuning compilation options -set (COMPILE_FLAGS "${COMPILE_FLAGS} -xf95-cpp-input") +set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp") # preprocessor set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -fPIE") From a038c4bbac6940a9d4991a34555a42f4d164d177 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 31 Aug 2021 22:51:49 +0200 Subject: [PATCH 2/9] shorter and 'standard' --- PRIVATE | 2 +- python/damask/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PRIVATE b/PRIVATE index 7276083d3..945cf906c 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 7276083d38816c4cfc336b7597aace3f447273dd +Subproject commit 945cf906c308192327841fd659dee6d55dcd4137 diff --git a/python/damask/util.py b/python/damask/util.py index b7d7e9bd0..a39a7b8c7 100644 --- a/python/damask/util.py +++ b/python/damask/util.py @@ -18,7 +18,7 @@ from . import version __all__=[ 'srepr', 'emph', 'deemph', 'warn', 'strikeout', - 'execute', 'run', + 'run', 'natural_sort', 'show_progress', 'scale_to_coprime', From ed2b1031c2a7da48f8e1bb8d98898bba10e526c5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 31 Aug 2021 22:54:23 +0200 Subject: [PATCH 3/9] standalone sphinx not needed any more --- .gitlab-ci.yml | 12 ------------ PRIVATE | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aedf7b3ec..bf75d619a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -224,24 +224,12 @@ source_distribution: - master - release -library_documentation: - stage: deploy - script: - - cd $DAMASKROOT/PRIVATE/documenting/sphinx - - make html - except: - - master - - release - ################################################################################################## backup_runtime_measurement: stage: backup script: - cd $LOCAL_HOME/performance # location of new runtime results - git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}" - - mkdir $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA} - - mv $LOCAL_HOME/performance/time.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/ - - mv $LOCAL_HOME/performance/memory.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/ only: - development diff --git a/PRIVATE b/PRIVATE index 945cf906c..8a6ab2d16 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 945cf906c308192327841fd659dee6d55dcd4137 +Subproject commit 8a6ab2d16b01ca6fa4cd8cef62f68cd1b4f0cadd From de72afe6eb886a4ed6655b1ef91b33ba55961b2f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 08:07:55 +0200 Subject: [PATCH 4/9] python(2) is not available on newer systems --- env/DAMASK.sh | 4 ++-- env/DAMASK.zsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/env/DAMASK.sh b/env/DAMASK.sh index c74c447ed..e26389257 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -60,7 +60,7 @@ if [ ! -z "$PS1" ]; then echo -n "heap size " [[ "$(ulimit -d)" == "unlimited" ]] \ && echo "unlimited" \ - || echo $(python -c \ + || echo $(python3 -c \ "import math; \ size=$(( 1024*$(ulimit -d) )); \ print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ @@ -68,7 +68,7 @@ if [ ! -z "$PS1" ]; then echo -n "stack size " [[ "$(ulimit -s)" == "unlimited" ]] \ && echo "unlimited" \ - || echo $(python -c \ + || echo $(python3 -c \ "import math; \ size=$(( 1024*$(ulimit -s) )); \ print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 5813d110a..57efa7667 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -50,7 +50,7 @@ if [ ! -z "$PS1" ]; then echo -n "heap size " [[ "$(ulimit -d)" == "unlimited" ]] \ && echo "unlimited" \ - || echo $(python -c \ + || echo $(python3 -c \ "import math; \ size=$(( 1024*$(ulimit -d) )); \ print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ @@ -58,7 +58,7 @@ if [ ! -z "$PS1" ]; then echo -n "stack size " [[ "$(ulimit -s)" == "unlimited" ]] \ && echo "unlimited" \ - || echo $(python -c \ + || echo $(python3 -c \ "import math; \ size=$(( 1024*$(ulimit -s) )); \ print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \ From 1eb96f49342cf93386488c3d11ccbbf03d40a09b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 08:31:25 +0200 Subject: [PATCH 5/9] avoid incompatibilities --- python/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/setup.py b/python/setup.py index c8026ce17..2da8b045a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -19,6 +19,7 @@ setuptools.setup( python_requires = '>=3.6', install_requires = [ 'pandas>=0.24', # requires numpy + 'numpy>=1.17', # needed for default_rng 'scipy>=1.2', 'h5py>=2.9', # requires numpy 'vtk>=8.1', From 949eea162400939b5701b71b3685c4ac114b5a7c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 11:07:39 +0200 Subject: [PATCH 6/9] bugfix: did not work with VTK 8 --- PRIVATE | 2 +- src/grid/discretization_grid.f90 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PRIVATE b/PRIVATE index 8a6ab2d16..65c453c46 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 8a6ab2d16b01ca6fa4cd8cef62f68cd1b4f0cadd +Subproject commit 65c453c46d157f6448ab48829d059b1d641fde47 diff --git a/src/grid/discretization_grid.f90 b/src/grid/discretization_grid.f90 index 1c88e5817..1758fd855 100644 --- a/src/grid/discretization_grid.f90 +++ b/src/grid/discretization_grid.f90 @@ -266,7 +266,8 @@ subroutine readVTI(grid,geomSize,origin,material, & integer :: i - if (getXMLValue(header,'Direction') /= '1 0 0 0 1 0 0 0 1') & + temp = getXMLValue(header,'Direction') + if (temp /= '1 0 0 0 1 0 0 0 1' .and. temp /= '') & ! https://discourse.vtk.org/t/vti-specification/6526 call IO_error(error_ID = 844, ext_msg = 'coordinate order') temp = getXMLValue(header,'WholeExtent') From 396974c7b20f9ff2ecf8308a4875956235187536 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 15:50:40 +0200 Subject: [PATCH 7/9] new address --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 81ea47599..543de378f 100644 --- a/README +++ b/README @@ -10,4 +10,4 @@ Germany damask@mpie.de https://damask.mpie.de -https://magit1.mpie.de +https://git.damask.mpie.de From a6842abebf9845a9a72b4565ac00f07a8ca58c7a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 19:33:06 +0200 Subject: [PATCH 8/9] give defaults ODF etc seem to use degrees as default but mostly we use radians. Should be discussed --- python/damask/_rotation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index 4eb52eb87..9c5884145 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -1026,7 +1026,7 @@ class Rotation: N : int, optional Number of samples, defaults to 500. degrees : boolean, optional - sigma is given in degrees. + sigma is given in degrees. Defaults to True. rng_seed : {None, int, array_like[ints], SeedSequence, BitGenerator, Generator}, optional A seed to initialize the BitGenerator. Defaults to None, i.e. unpredictable entropy will be pulled from the OS. From 68ac855f45b7376933d6b662ead900d569ff992d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Sep 2021 22:33:04 +0200 Subject: [PATCH 9/9] common help formulation --- python/damask/_rotation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index 9c5884145..7abfaa615 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -1055,10 +1055,10 @@ class Rotation: Parameters ---------- - alpha : numpy.ndarray of size 2 - Polar coordinates (phi from x,theta from z) of fiber direction in crystal frame. - beta : numpy.ndarray of size 2 - Polar coordinates (phi from x,theta from z) of fiber direction in sample frame. + alpha : numpy.ndarray of shape (2) + Polar coordinates (phi from x, theta from z) of fiber direction in crystal frame. + beta : numpy.ndarray of shape (2) + Polar coordinates (phi from x, theta from z) of fiber direction in sample frame. sigma : float, optional Standard deviation of (Gaussian) misorientation distribution. Defaults to 0.