From 9b4252da68628d6f3bf5644882cdee51bf35087c Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 29 Nov 2019 16:53:40 +0100 Subject: [PATCH 01/11] smart handling of leading zeros --- processing/post/DADF5_postResults.py | 5 ++++- processing/post/DADF5_vtk_cells.py | 6 ++++-- processing/post/DADF5_vtk_points.py | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/processing/post/DADF5_postResults.py b/processing/post/DADF5_postResults.py index a16ef147c..ab68fc76b 100755 --- a/processing/post/DADF5_postResults.py +++ b/processing/post/DADF5_postResults.py @@ -47,6 +47,8 @@ for filename in options.filenames: coords = np.concatenate((z[:,:,:,None],y[:,:,:,None],x[:,:,:,None]),axis = 3) + N_digits = int(np.floor(np.log10(int(results.increments[-1][3:]))))+1 + N_digits = 5 # hack to keep test intact for i,inc in enumerate(results.iter_visible('increments')): print('Output step {}/{}'.format(i+1,len(results.increments))) @@ -92,5 +94,6 @@ for filename in options.filenames: dirname = os.path.abspath(os.path.join(os.path.dirname(filename),options.dir)) if not os.path.isdir(dirname): os.mkdir(dirname,0o755) - file_out = '{}_{}.txt'.format(os.path.splitext(os.path.split(filename)[-1])[0],inc) + file_out = '{}_{}.txt'.format(os.path.splitext(os.path.split(filename)[-1])[0], + inc[3:].zfill(N_digits)) np.savetxt(os.path.join(dirname,file_out),data,header=header,comments='') diff --git a/processing/post/DADF5_vtk_cells.py b/processing/post/DADF5_vtk_cells.py index 1f5cc6686..58cb9771f 100755 --- a/processing/post/DADF5_vtk_cells.py +++ b/processing/post/DADF5_vtk_cells.py @@ -66,7 +66,7 @@ for filename in options.filenames: for i in f['/geometry/T_c']: grid.InsertNextCell(vtk.VTK_HEXAHEDRON,8,i-1) - + N_digits = int(np.floor(np.log10(int(results.increments[-1][3:]))))+1 for i,inc in enumerate(results.iter_visible('increments')): print('Output step {}/{}'.format(i+1,len(results.increments))) vtk_data = [] @@ -133,7 +133,9 @@ for filename in options.filenames: dirname = os.path.abspath(os.path.join(os.path.dirname(filename),options.dir)) if not os.path.isdir(dirname): os.mkdir(dirname,0o755) - file_out = '{}_{}.{}'.format(os.path.splitext(os.path.split(filename)[-1])[0],inc,writer.GetDefaultFileExtension()) + file_out = '{}_inc{}.{}'.format(os.path.splitext(os.path.split(filename)[-1])[0], + inc[3:].zfill(N_digits), + writer.GetDefaultFileExtension()) writer.SetCompressorTypeToZLib() writer.SetDataModeToBinary() diff --git a/processing/post/DADF5_vtk_points.py b/processing/post/DADF5_vtk_points.py index 87c1ad93e..9265cc3a0 100755 --- a/processing/post/DADF5_vtk_points.py +++ b/processing/post/DADF5_vtk_points.py @@ -52,6 +52,7 @@ for filename in options.filenames: Polydata.SetVerts(Vertices) Polydata.Modified() + N_digits = int(np.floor(np.log10(int(results.increments[-1][3:]))))+1 for i,inc in enumerate(results.iter_visible('increments')): print('Output step {}/{}'.format(i+1,len(results.increments))) vtk_data = [] @@ -111,7 +112,9 @@ for filename in options.filenames: dirname = os.path.abspath(os.path.join(os.path.dirname(filename),options.dir)) if not os.path.isdir(dirname): os.mkdir(dirname,0o755) - file_out = '{}_{}.{}'.format(os.path.splitext(os.path.split(filename)[-1])[0],inc,writer.GetDefaultFileExtension()) + file_out = '{}_inc{}.{}'.format(os.path.splitext(os.path.split(filename)[-1])[0], + inc[3:].zfill(N_digits), + writer.GetDefaultFileExtension()) writer.SetCompressorTypeToZLib() writer.SetDataModeToBinary() From dc3fc8f70cbd0fdb24af2d57d9bae294edba7366 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 29 Nov 2019 17:00:48 +0100 Subject: [PATCH 02/11] do not clutter with leading zeros --- python/damask/dadf5.py | 7 ++++--- src/results.f90 | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index d879946eb..ee497a9ae 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -30,7 +30,7 @@ class DADF5(): """ with h5py.File(filename,'r') as f: - if f.attrs['DADF5-major'] != 0 or not 2 <= f.attrs['DADF5-minor'] <= 3: + if f.attrs['DADF5-major'] != 0 or not 2 <= f.attrs['DADF5-minor'] <= 4: raise TypeError('Unsupported DADF5 version {} '.format(f.attrs['DADF5-version'])) self.structured = 'grid' in f['geometry'].attrs.keys() @@ -40,8 +40,9 @@ class DADF5(): self.size = f['geometry'].attrs['size'] r=re.compile('inc[0-9]+') - self.increments = [i for i in f.keys() if r.match(i)] - self.times = [round(f[i].attrs['time/s'],12) for i in self.increments] + increments_unsorted = {int(i[3:]):i for i in f.keys() if r.match(i)} + self.increments = [increments_unsorted[i] for i in sorted(increments_unsorted)] + self.times = [round(f[i].attrs['time/s'],12) for i in self.increments] self.Nmaterialpoints, self.Nconstituents = np.shape(f['mapping/cellResults/constituent']) self.materialpoints = [m.decode() for m in np.unique(f['mapping/cellResults/materialpoint']['Name'])] diff --git a/src/results.f90 b/src/results.f90 index 471f994d6..e77600d82 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -68,9 +68,9 @@ 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',0.3_pReal) + call HDF5_addAttribute(resultsFile,'DADF5-version',0.4_pReal) call HDF5_addAttribute(resultsFile,'DADF5-major',0) - call HDF5_addAttribute(resultsFile,'DADF5-minor',3) + call HDF5_addAttribute(resultsFile,'DADF5-minor',4) call HDF5_addAttribute(resultsFile,'DAMASK',DAMASKVERSION) call get_command(commandLine) call HDF5_addAttribute(resultsFile,'call',trim(commandLine)) @@ -110,7 +110,7 @@ subroutine results_addIncrement(inc,time) real(pReal), intent(in) :: time character(len=pStringLen) :: incChar - write(incChar,'(i5.5)') inc ! allow up to 99999 increments + write(incChar,'(i10)') inc call HDF5_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)))) From e2b13a5ca3bb10042edc591edf994ecd3bae80d8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 29 Nov 2019 19:32:18 +0100 Subject: [PATCH 03/11] using de-facto standard naming --- processing/post/DADF5_postResults.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/post/DADF5_postResults.py b/processing/post/DADF5_postResults.py index ab68fc76b..1d05289cb 100755 --- a/processing/post/DADF5_postResults.py +++ b/processing/post/DADF5_postResults.py @@ -94,6 +94,6 @@ for filename in options.filenames: dirname = os.path.abspath(os.path.join(os.path.dirname(filename),options.dir)) if not os.path.isdir(dirname): os.mkdir(dirname,0o755) - file_out = '{}_{}.txt'.format(os.path.splitext(os.path.split(filename)[-1])[0], - inc[3:].zfill(N_digits)) + file_out = '{}_inc{}.txt'.format(os.path.splitext(os.path.split(filename)[-1])[0], + inc[3:].zfill(N_digits)) np.savetxt(os.path.join(dirname,file_out),data,header=header,comments='') From 4185fcb4c3f3c8505dfae9ca2d0386668337a195 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 29 Nov 2019 21:40:54 +0100 Subject: [PATCH 04/11] adjust to new naming --- 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 ee497a9ae..77ac5458b 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -166,7 +166,7 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','set') + self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','set') def add_by_increment(self,start,end): @@ -181,7 +181,7 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','add') + self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','add') def del_by_increment(self,start,end): @@ -196,7 +196,7 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','del') + self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','del') def iter_visible(self,what): From 354c0123a1bb84f40443b03992c569e71201ead1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 30 Nov 2019 08:40:59 +0100 Subject: [PATCH 05/11] backward compatibility --- python/damask/dadf5.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 77ac5458b..7dddabfd4 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -30,7 +30,9 @@ class DADF5(): """ with h5py.File(filename,'r') as f: - if f.attrs['DADF5-major'] != 0 or not 2 <= f.attrs['DADF5-minor'] <= 4: + self.DADF5-major = f.attrs['DADF5-major'] + self.DADF5-minor = f.attrs['DADF5-minor'] + if self.DADF5-major != 0 or not 2 <= self.DADF5-minor <= 4: raise TypeError('Unsupported DADF5 version {} '.format(f.attrs['DADF5-version'])) self.structured = 'grid' in f['geometry'].attrs.keys() @@ -166,7 +168,10 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','set') + if self.DADF5-minor >= 4: + self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','set') + else: + self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','set') def add_by_increment(self,start,end): @@ -181,7 +186,10 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','add') + if self.DADF5-minor >= 4: + self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','add') + else: + self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','add') def del_by_increment(self,start,end): @@ -196,7 +204,10 @@ class DADF5(): end increment (included) """ - self.__manage_visible(['inc{}'.format(i) for i in range(start,end+1)],'increments','del') + if self.DADF5-minor >= 4: + self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','del') + else: + self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','del') def iter_visible(self,what): From 8f77843b0f207ecf731d0f79e730cb4573c4ec99 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 30 Nov 2019 09:01:37 +0100 Subject: [PATCH 06/11] improved naming - clearer variable names - no '-' in attributes - single source of truth --- python/damask/dadf5.py | 17 +++++++++++------ src/results.f90 | 7 +++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 7dddabfd4..d03617752 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -30,9 +30,14 @@ class DADF5(): """ with h5py.File(filename,'r') as f: - self.DADF5-major = f.attrs['DADF5-major'] - self.DADF5-minor = f.attrs['DADF5-minor'] - if self.DADF5-major != 0 or not 2 <= self.DADF5-minor <= 4: + try: + self.version_major = f.attrs['DADF5_version_major'] + self.version_minor = f.attrs['DADF5_version_minor'] + except KeyError: + self.version_major = f.attrs['DADF5-major'] + self.version_minor = f.attrs['DADF5-minor'] + + if self.version_major != 0 or not 2 <= self.version_minor <= 4: raise TypeError('Unsupported DADF5 version {} '.format(f.attrs['DADF5-version'])) self.structured = 'grid' in f['geometry'].attrs.keys() @@ -168,7 +173,7 @@ class DADF5(): end increment (included) """ - if self.DADF5-minor >= 4: + if self.version_minor >= 4: self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','set') else: self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','set') @@ -186,7 +191,7 @@ class DADF5(): end increment (included) """ - if self.DADF5-minor >= 4: + if self.version_minor >= 4: self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','add') else: self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','add') @@ -204,7 +209,7 @@ class DADF5(): end increment (included) """ - if self.DADF5-minor >= 4: + if self.version_minor >= 4: self.__manage_visible([ 'inc{}'.format(i) for i in range(start,end+1)],'increments','del') else: self.__manage_visible(['inc{:05d}'.format(i) for i in range(start,end+1)],'increments','del') diff --git a/src/results.f90 b/src/results.f90 index e77600d82..a6b01790d 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -68,10 +68,9 @@ 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',0.4_pReal) - call HDF5_addAttribute(resultsFile,'DADF5-major',0) - call HDF5_addAttribute(resultsFile,'DADF5-minor',4) - call HDF5_addAttribute(resultsFile,'DAMASK',DAMASKVERSION) + call HDF5_addAttribute(resultsFile,'DADF5_version_major',0) + call HDF5_addAttribute(resultsFile,'DADF5_version_minor',4) + call HDF5_addAttribute(resultsFile,'DAMASK_version',DAMASKVERSION) call get_command(commandLine) call HDF5_addAttribute(resultsFile,'call',trim(commandLine)) call HDF5_closeGroup(results_addGroup('mapping')) From fecd4632b45f9949542306cfd311d9c001269550 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Dec 2019 05:49:17 +0100 Subject: [PATCH 07/11] correct reporting of time --- python/damask/dadf5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index d03617752..4790a1b38 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -333,8 +333,8 @@ class DADF5(): """Return information on all active datasets in the file.""" message = '' with h5py.File(self.filename,'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 32ebcea207d23c10c76b8fa97a5fc1b0a281b500 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Dec 2019 05:49:43 +0100 Subject: [PATCH 08/11] more tests --- python/tests/test_DADF5.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/tests/test_DADF5.py b/python/tests/test_DADF5.py index 5a6478f03..37c5a9e87 100644 --- a/python/tests/test_DADF5.py +++ b/python/tests/test_DADF5.py @@ -42,6 +42,22 @@ class TestDADF5: in_file = default.read_dataset(loc['sigma'],0) assert np.allclose(in_memory,in_file) + def test_add_determinant(self,default): + default.add_determinant('P') + loc = {'P': default.get_dataset_location('P'), + 'det(P)':default.get_dataset_location('det(P)')} + in_memory = np.linalg.det(default.read_dataset(loc['P'],0)) + in_file = default.read_dataset(loc['det(P)'],0) + assert np.allclose(in_memory,in_file) + + def test_add_norm(self,default): + default.add_norm('F',1) + loc = {'F': default.get_dataset_location('F'), + '|F|_1':default.get_dataset_location('|F|_1')} + in_memory = np.linalg.norm(default.read_dataset(loc['F'],0),ord=1,axis=(1,2),keepdims=True) + in_file = default.read_dataset(loc['|F|_1'],0) + assert np.allclose(in_memory,in_file) + def test_add_absolute(self,default): default.add_absolute('Fe') loc = {'Fe': default.get_dataset_location('Fe'), From 6c31e228553a3c453fba8905ed70f12a939307ea Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Dec 2019 05:59:52 +0100 Subject: [PATCH 09/11] testing new style DADF5 file --- .../DADF5/12grains6x7x8_tensionY.hdf5 | Bin 1935952 -> 1935528 bytes python/tests/test_DADF5.py | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python/tests/reference/DADF5/12grains6x7x8_tensionY.hdf5 b/python/tests/reference/DADF5/12grains6x7x8_tensionY.hdf5 index caafce4784e2e9e3f29f8bd6dcad4e338a238153..39c17fadb5cc8fe724606eda02d7a62ac7ee8c6b 100644 GIT binary patch delta 19434 zcmc&+dz@3%ozJ}|6K;~p%$-MOk{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r&k^fYuM#oEz4R0V%GtiDsO>XlvFnF$pqB~>- zUz{Rm8*SS2LNCjfR%xk63q<7Ts64gA14Neonui~6jCz2`%p5KJi1-nXH^!(-X&RWl zgBBA{rx7h?M;zCjn+T^^vPB2K5&lbh0kOq@DA^DWi z)tuztkq+Df+IntlV22!UYoLc57jA+ZymA+l!z_66dFf^fI8LXK%u8~}(WX^}Kr|A? zrjxxhUF4;~J@?y!zI5Hu04x^&aRaazd1PcEQ|fq9eIwR@6T|qE4P?BKSDEoU8orRZ za(`$5<|11D*)rx|)UKx+Fmny&8i2V*|K4C^E-C#EI_~X;D>sa?h}pq**SItCyKVK5 zR*f^<2wV5$IBgvi-q+&{mtJO!)H;Twh$P?^3X!*rPiu_HiFcr!Kdo{25^VmbQSv|J zLcWD^lU-MhGH~m=4Gs309O!WWy#Zb|KGwN`GH?fW3}xUHgYtgqs!~gRV6Tvz(?qX0 zF3V(PE|f#B1tI;Ov0K9XAbUT=j~p0SR|LsaTT?#%&}=gBA%1-LcSdXh>QS4yZ4;jvZA&pZCpH2*dTd7kk^M&ljC%#QNeDP% zX*6_yjL8WF%JWZ)Dd46|X$m<3>sp2Mt+X-Ueb@?+8sW!BB+wl%X=Fb>Qqo9&d}QH4 zqcLG7kGyU)Cd?FYV@5TF#29imNb3gduQcmyp;VAo8i9X<&5gjnQ%WP|->kQh{uYU3 zYb?sYY1BTuu^FXKvRI{~v5VP4Z1PL=+IuoCK0q(&K4M2Jy^fG#E50nwz`?f0JQbQT zF!_BF>6E--aXL*jf2YF~qu=oRI*>X2j-NCO)35s&2vHqvP3Xb*u)~kn#T!DuA$)_0b0s=X#fBK diff --git a/python/tests/test_DADF5.py b/python/tests/test_DADF5.py index 37c5a9e87..1dd93d003 100644 --- a/python/tests/test_DADF5.py +++ b/python/tests/test_DADF5.py @@ -23,7 +23,13 @@ def reference_dir(reference_dir_base): class TestDADF5: - + + def test_time_increments(self,default): + shape = default.read_dataset(default.get_dataset_location('F'),0).shape + default.set_by_time(0.0,20.0) + for i in default.iter_visible('increments'): + assert shape == default.read_dataset(default.get_dataset_location('F'),0).shape + def test_add_deviator(self,default): default.add_deviator('P') loc = {'P' :default.get_dataset_location('P'), From 6902d3dd0add631fda7dede02030bcfd59c94a4b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Dec 2019 06:04:06 +0100 Subject: [PATCH 10/11] repeated test better sort alphabetically --- python/tests/test_DADF5.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/python/tests/test_DADF5.py b/python/tests/test_DADF5.py index 1dd93d003..2235321b5 100644 --- a/python/tests/test_DADF5.py +++ b/python/tests/test_DADF5.py @@ -72,14 +72,6 @@ class TestDADF5: in_file = default.read_dataset(loc['|Fe|'],0) assert np.allclose(in_memory,in_file) - def test_add_determinant(self,default): - default.add_determinant('P') - loc = {'P': default.get_dataset_location('P'), - 'det(P)': default.get_dataset_location('det(P)')} - in_memory = np.linalg.det(default.read_dataset(loc['P'],0)).reshape(-1,1) - in_file = default.read_dataset(loc['det(P)'],0) - assert np.allclose(in_memory,in_file) - def test_add_spherical(self,default): default.add_spherical('P') loc = {'P': default.get_dataset_location('P'), From 285075bb6b35a0e6083223109fa0b056f19f8196 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Dec 2019 06:15:32 +0100 Subject: [PATCH 11/11] ordered alphabetically --- python/damask/dadf5.py | 332 ++++++++++++++++++------------------- python/tests/test_DADF5.py | 33 ++-- 2 files changed, 183 insertions(+), 182 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 4790a1b38..5c23636db 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -437,6 +437,76 @@ class DADF5(): else: with h5py.File(self.filename,'r') as f: return f['geometry/x_c'][()] + + + def add_absolute(self,x): + """ + Add absolute value. + + Parameters + ---------- + x : str + Label of the dataset containing a scalar, vector, or tensor. + + """ + def __add_absolute(x): + + return { + 'data': np.abs(x['data']), + 'label': '|{}|'.format(x['label']), + 'meta': { + 'Unit': x['meta']['Unit'], + 'Description': 'Absolute value of {} ({})'.format(x['label'],x['meta']['Description']), + 'Creator': 'dadf5.py:add_abs v{}'.format(version) + } + } + + requested = [{'label':x,'arg':'x'}] + + self.__add_generic_pointwise(__add_absolute,requested) + + + def add_calculation(self,formula,label,unit='n/a',description=None,vectorized=True): + """ + Add result of a general formula. + + Parameters + ---------- + formula : str + Formula, refer to datasets by ‘#Label#‘. + label : str + Label of the dataset containing the result of the calculation. + unit : str, optional + Physical unit of the result. + description : str, optional + Human readable description of the result. + vectorized : bool, optional + Indicate whether the formula is written in vectorized form. Default is ‘True’. + + """ + if vectorized is not True: + raise NotImplementedError + + def __add_calculation(**kwargs): + + formula = kwargs['formula'] + for d in re.findall(r'#(.*?)#',formula): + formula = formula.replace('#{}#'.format(d),"kwargs['{}']['data']".format(d)) + + return { + 'data': eval(formula), + 'label': kwargs['label'], + 'meta': { + 'Unit': kwargs['unit'], + 'Description': '{} (formula: {})'.format(kwargs['description'],kwargs['formula']), + 'Creator': 'dadf5.py:add_calculation v{}'.format(version) + } + } + + requested = [{'label':d,'arg':d} for d in set(re.findall(r'#(.*?)#',formula))] # datasets used in the formula + pass_through = {'formula':formula,'label':label,'unit':unit,'description':description} + + self.__add_generic_pointwise(__add_calculation,requested,pass_through) def add_Cauchy(self,P='P',F='F'): @@ -470,6 +540,90 @@ class DADF5(): self.__add_generic_pointwise(__add_Cauchy,requested) + def add_determinant(self,x): + """ + Add the determinant of a tensor. + + Parameters + ---------- + x : str + Label of the dataset containing a tensor. + + """ + def __add_determinant(x): + + return { + 'data': np.linalg.det(x['data']), + 'label': 'det({})'.format(x['label']), + 'meta': { + 'Unit': x['meta']['Unit'], + 'Description': 'Determinant of tensor {} ({})'.format(x['label'],x['meta']['Description']), + 'Creator': 'dadf5.py:add_determinant v{}'.format(version) + } + } + + requested = [{'label':x,'arg':'x'}] + + self.__add_generic_pointwise(__add_determinant,requested) + + + def add_deviator(self,x): + """ + Add the deviatoric part of a tensor. + + Parameters + ---------- + x : str + Label of the dataset containing a tensor. + + """ + def __add_deviator(x): + + if not np.all(np.array(x['data'].shape[1:]) == np.array([3,3])): + raise ValueError + + return { + 'data': mechanics.deviatoric_part(x['data']), + 'label': 's_{}'.format(x['label']), + 'meta': { + 'Unit': x['meta']['Unit'], + 'Description': 'Deviator of tensor {} ({})'.format(x['label'],x['meta']['Description']), + 'Creator': 'dadf5.py:add_deviator v{}'.format(version) + } + } + + requested = [{'label':x,'arg':'x'}] + + self.__add_generic_pointwise(__add_deviator,requested) + + + def add_maximum_shear(self,x): + """ + Add maximum shear components of symmetric tensor. + + Parameters + ---------- + x : str + Label of the dataset containing a symmetric tensor. + + """ + def __add_maximum_shear(x): + + return { + 'data': mechanics.maximum_shear(x['data']), + 'label': 'max_shear({})'.format(x['label']), + 'meta': { + 'Unit': x['meta']['Unit'], + 'Description': 'Maximum shear component of of {} ({})'.format(x['label'],x['meta']['Description']), + 'Creator': 'dadf5.py:add_maximum_shear v{}'.format(version) + } + } + + requested = [{'label':x,'arg':'x'}] + + self.__add_generic_pointwise(__add_maximum_shear,requested) + + def add_Mises(self,x): """ Add the equivalent Mises stress or strain of a symmetric tensor. @@ -540,58 +694,33 @@ class DADF5(): self.__add_generic_pointwise(__add_norm,requested,{'ord':ord}) - def add_absolute(self,x): + def add_principal_components(self,x): """ - Add absolute value. - + Add principal components of symmetric tensor. + + The principal components are sorted in descending order, each repeated according to its multiplicity. + Parameters ---------- x : str - Label of the dataset containing a scalar, vector, or tensor. + Label of the dataset containing a symmetric tensor. """ - def __add_absolute(x): + def __add_principal_components(x): return { - 'data': np.abs(x['data']), - 'label': '|{}|'.format(x['label']), + 'data': mechanics.principal_components(x['data']), + 'label': 'lambda_{}'.format(x['label']), 'meta': { 'Unit': x['meta']['Unit'], - 'Description': 'Absolute value of {} ({})'.format(x['label'],x['meta']['Description']), - 'Creator': 'dadf5.py:add_abs v{}'.format(version) + 'Description': 'Pricipal components of {} ({})'.format(x['label'],x['meta']['Description']), + 'Creator': 'dadf5.py:add_principal_components v{}'.format(version) } } requested = [{'label':x,'arg':'x'}] - - self.__add_generic_pointwise(__add_absolute,requested) - - def add_determinant(self,x): - """ - Add the determinant of a tensor. - - Parameters - ---------- - x : str - Label of the dataset containing a tensor. - - """ - def __add_determinant(x): - - return { - 'data': np.linalg.det(x['data']), - 'label': 'det({})'.format(x['label']), - 'meta': { - 'Unit': x['meta']['Unit'], - 'Description': 'Determinant of tensor {} ({})'.format(x['label'],x['meta']['Description']), - 'Creator': 'dadf5.py:add_determinant v{}'.format(version) - } - } - - requested = [{'label':x,'arg':'x'}] - - self.__add_generic_pointwise(__add_determinant,requested) + self.__add_generic_pointwise(__add_principal_components,requested) def add_spherical(self,x): @@ -624,79 +753,6 @@ class DADF5(): self.__add_generic_pointwise(__add_spherical,requested) - def add_deviator(self,x): - """ - Add the deviatoric part of a tensor. - - Parameters - ---------- - x : str - Label of the dataset containing a tensor. - - """ - def __add_deviator(x): - - if not np.all(np.array(x['data'].shape[1:]) == np.array([3,3])): - raise ValueError - - return { - 'data': mechanics.deviatoric_part(x['data']), - 'label': 's_{}'.format(x['label']), - 'meta': { - 'Unit': x['meta']['Unit'], - 'Description': 'Deviator of tensor {} ({})'.format(x['label'],x['meta']['Description']), - 'Creator': 'dadf5.py:add_deviator v{}'.format(version) - } - } - - requested = [{'label':x,'arg':'x'}] - - self.__add_generic_pointwise(__add_deviator,requested) - - - def add_calculation(self,formula,label,unit='n/a',description=None,vectorized=True): - """ - Add result of a general formula. - - Parameters - ---------- - formula : str - Formula, refer to datasets by ‘#Label#‘. - label : str - Label of the dataset containing the result of the calculation. - unit : str, optional - Physical unit of the result. - description : str, optional - Human readable description of the result. - vectorized : bool, optional - Indicate whether the formula is written in vectorized form. Default is ‘True’. - - """ - if vectorized is not True: - raise NotImplementedError - - def __add_calculation(**kwargs): - - formula = kwargs['formula'] - for d in re.findall(r'#(.*?)#',formula): - formula = formula.replace('#{}#'.format(d),"kwargs['{}']['data']".format(d)) - - return { - 'data': eval(formula), - 'label': kwargs['label'], - 'meta': { - 'Unit': kwargs['unit'], - 'Description': '{} (formula: {})'.format(kwargs['description'],kwargs['formula']), - 'Creator': 'dadf5.py:add_calculation v{}'.format(version) - } - } - - requested = [{'label':d,'arg':d} for d in set(re.findall(r'#(.*?)#',formula))] # datasets used in the formula - pass_through = {'formula':formula,'label':label,'unit':unit,'description':description} - - self.__add_generic_pointwise(__add_calculation,requested,pass_through) - - def add_strain_tensor(self,F='F',t='U',m=0): """ Add strain tensor calculated from a deformation gradient. @@ -729,62 +785,6 @@ class DADF5(): requested = [{'label':F,'arg':'F'}] self.__add_generic_pointwise(__add_strain_tensor,requested,{'t':t,'m':m}) - - - def add_principal_components(self,x): - """ - Add principal components of symmetric tensor. - - The principal components are sorted in descending order, each repeated according to its multiplicity. - - Parameters - ---------- - x : str - Label of the dataset containing a symmetric tensor. - - """ - def __add_principal_components(x): - - return { - 'data': mechanics.principal_components(x['data']), - 'label': 'lambda_{}'.format(x['label']), - 'meta': { - 'Unit': x['meta']['Unit'], - 'Description': 'Pricipal components of {} ({})'.format(x['label'],x['meta']['Description']), - 'Creator': 'dadf5.py:add_principal_components v{}'.format(version) - } - } - - requested = [{'label':x,'arg':'x'}] - - self.__add_generic_pointwise(__add_principal_components,requested) - - - def add_maximum_shear(self,x): - """ - Add maximum shear components of symmetric tensor. - - Parameters - ---------- - x : str - Label of the dataset containing a symmetric tensor. - - """ - def __add_maximum_shear(x): - - return { - 'data': mechanics.maximum_shear(x['data']), - 'label': 'max_shear({})'.format(x['label']), - 'meta': { - 'Unit': x['meta']['Unit'], - 'Description': 'Maximum shear component of of {} ({})'.format(x['label'],x['meta']['Description']), - 'Creator': 'dadf5.py:add_maximum_shear v{}'.format(version) - } - } - - requested = [{'label':x,'arg':'x'}] - - self.__add_generic_pointwise(__add_maximum_shear,requested) def __add_generic_pointwise(self,func,datasets_requested,extra_args={}): diff --git a/python/tests/test_DADF5.py b/python/tests/test_DADF5.py index 2235321b5..8aa8ec174 100644 --- a/python/tests/test_DADF5.py +++ b/python/tests/test_DADF5.py @@ -28,14 +28,15 @@ class TestDADF5: shape = default.read_dataset(default.get_dataset_location('F'),0).shape default.set_by_time(0.0,20.0) for i in default.iter_visible('increments'): - assert shape == default.read_dataset(default.get_dataset_location('F'),0).shape + assert shape == default.read_dataset(default.get_dataset_location('F'),0).shape - def test_add_deviator(self,default): - default.add_deviator('P') - loc = {'P' :default.get_dataset_location('P'), - 's_P':default.get_dataset_location('s_P')} - in_memory = mechanics.deviatoric_part(default.read_dataset(loc['P'],0)) - in_file = default.read_dataset(loc['s_P'],0) + + def test_add_absolute(self,default): + default.add_absolute('Fe') + loc = {'Fe': default.get_dataset_location('Fe'), + '|Fe|': default.get_dataset_location('|Fe|')} + in_memory = np.abs(default.read_dataset(loc['Fe'],0)) + in_file = default.read_dataset(loc['|Fe|'],0) assert np.allclose(in_memory,in_file) def test_add_Cauchy(self,default): @@ -52,10 +53,18 @@ class TestDADF5: default.add_determinant('P') loc = {'P': default.get_dataset_location('P'), 'det(P)':default.get_dataset_location('det(P)')} - in_memory = np.linalg.det(default.read_dataset(loc['P'],0)) + in_memory = np.linalg.det(default.read_dataset(loc['P'],0)).reshape((-1,1)) in_file = default.read_dataset(loc['det(P)'],0) assert np.allclose(in_memory,in_file) + def test_add_deviator(self,default): + default.add_deviator('P') + loc = {'P' :default.get_dataset_location('P'), + 's_P':default.get_dataset_location('s_P')} + in_memory = mechanics.deviatoric_part(default.read_dataset(loc['P'],0)) + in_file = default.read_dataset(loc['s_P'],0) + assert np.allclose(in_memory,in_file) + def test_add_norm(self,default): default.add_norm('F',1) loc = {'F': default.get_dataset_location('F'), @@ -64,14 +73,6 @@ class TestDADF5: in_file = default.read_dataset(loc['|F|_1'],0) assert np.allclose(in_memory,in_file) - def test_add_absolute(self,default): - default.add_absolute('Fe') - loc = {'Fe': default.get_dataset_location('Fe'), - '|Fe|': default.get_dataset_location('|Fe|')} - in_memory = np.abs(default.read_dataset(loc['Fe'],0)) - in_file = default.read_dataset(loc['|Fe|'],0) - assert np.allclose(in_memory,in_file) - def test_add_spherical(self,default): default.add_spherical('P') loc = {'P': default.get_dataset_location('P'),