From 22143ea02418adb7f6a043b5ecd3b56ca04a41f1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 5 Oct 2020 19:06:19 +0200 Subject: [PATCH 1/4] new tests --- .gitlab-ci.yml | 12 +++++++++++- PRIVATE | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e83757e5..722811446 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,6 +193,8 @@ grid_mech_compile_Intel: - module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel - cp -r grid_mech_compile grid_mech_compile_Intel - grid_mech_compile_Intel/test.py + - cd pytest + - pytest -k 'compile and grid' except: - master - release @@ -203,6 +205,8 @@ Compile_FEM_Intel: - module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel - cp -r FEM_compile FEM_compile_Intel - FEM_compile_Intel/test.py + - cd pytest + - pytest -k 'compile and mesh' except: - master - release @@ -213,6 +217,8 @@ grid_mech_compile_GNU: - module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU - cp -r grid_mech_compile grid_mech_compile_GNU - grid_mech_compile_GNU/test.py + - cd pytest + - pytest -k 'compile and grid' except: - master - release @@ -223,6 +229,8 @@ Compile_FEM_GNU: - module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU - cp -r FEM_compile FEM_compile_GNU - FEM_compile_GNU/test.py + - cd pytest + - pytest -k 'compile and mesh' except: - master - release @@ -244,7 +252,7 @@ Pytest_grid: script: - module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel - cd pytest - - pytest + - pytest -m 'not compile' except: - master - release @@ -320,6 +328,8 @@ Marc_compileIfort: script: - module load $IntelMarc $HDF5Marc $MSC - Marc_compileIfort/test.py + - cd pytest + - pytest -k 'compile and Marc' except: - master - release diff --git a/PRIVATE b/PRIVATE index 64e62f805..fc9172ede 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 64e62f805b5ad784e3397ee5f735aaeb3cc134c2 +Subproject commit fc9172ede32ba5609d494a03c1d11bcd60d48cb8 From 09ddbedb2140340f7dd1e42d0dc3276a11633166 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 5 Oct 2020 21:52:38 +0200 Subject: [PATCH 2/4] updated documentation in test --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index fc9172ede..3f0dae61d 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit fc9172ede32ba5609d494a03c1d11bcd60d48cb8 +Subproject commit 3f0dae61db57d33612507e2813ad222cca5ac790 From 9e0222db7139170dc51d8a8856c64a7c00af62cd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 5 Oct 2020 22:41:12 +0200 Subject: [PATCH 3/4] just a wrapper to scipy, requires special layout --- processing/post/addGaussian.py | 76 ---------------------------------- 1 file changed, 76 deletions(-) delete mode 100755 processing/post/addGaussian.py diff --git a/processing/post/addGaussian.py b/processing/post/addGaussian.py deleted file mode 100755 index f00122c63..000000000 --- a/processing/post/addGaussian.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -from io import StringIO -from optparse import OptionParser - -from scipy import ndimage - -import damask - - -scriptName = os.path.splitext(os.path.basename(__file__))[0] -scriptID = ' '.join([scriptName,damask.version]) - - -# -------------------------------------------------------------------- -# MAIN -# -------------------------------------------------------------------- - -parser = OptionParser(option_class=damask.extendableOption, usage='%prog option [ASCIItable(s)]', description = """ -Add column(s) containing Gaussian filtered values of requested column(s). -Operates on periodic and non-periodic ordered three-dimensional data sets. -For details see scipy.ndimage documentation. - -""", version = scriptID) - -parser.add_option('-p','--pos','--periodiccellcenter', - dest = 'pos', - type = 'string', metavar = 'string', - help = 'label of coordinates [%default]') -parser.add_option('-s','--scalar', - dest = 'labels', - action = 'extend', metavar = '', - help = 'label(s) of scalar field values') -parser.add_option('-o','--order', - dest = 'order', - type = int, - metavar = 'int', - help = 'order of the filter [%default]') -parser.add_option('--sigma', - dest = 'sigma', - type = float, - metavar = 'float', - help = 'standard deviation [%default]') -parser.add_option('--periodic', - dest = 'periodic', - action = 'store_true', - help = 'assume periodic grain structure') - - - -parser.set_defaults(pos = 'pos', - order = 0, - sigma = 1, - ) - -(options,filenames) = parser.parse_args() -if filenames == []: filenames = [None] - -if options.labels is None: parser.error('no data column specified.') - -for name in filenames: - damask.util.report(scriptName,name) - - table = damask.Table.load(StringIO(''.join(sys.stdin.read())) if name is None else name) - damask.grid_filters.coord0_check(table.get(options.pos)) - - for label in options.labels: - table = table.add('Gauss{}({})'.format(options.sigma,label), - ndimage.filters.gaussian_filter(table.get(label).reshape(-1), - options.sigma,options.order, - mode = 'wrap' if options.periodic else 'nearest'), - scriptID+' '+' '.join(sys.argv[1:])) - - table.save((sys.stdout if name is None else name), legacy=True) From 8f7ec3f2833d759155f4896b991627fdbef3cb41 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 6 Oct 2020 06:39:03 +0200 Subject: [PATCH 4/4] fix for MSC.Marc compilation test --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 3f0dae61d..226ea5596 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 3f0dae61db57d33612507e2813ad222cca5ac790 +Subproject commit 226ea55968c756ae1abbdf51230756bb80696cb0