From fd0a3f58fabc72f6a0da85481b653debd19697f2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 16 Nov 2021 09:17:32 +0100 Subject: [PATCH 1/2] improved grid reporting - a-b-c vs. x-y-z confusing and not needed - unit is helpful (got a request on the helpdesk) --- python/damask/_grid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/_grid.py b/python/damask/_grid.py index 978f5e5fb..aafaae33d 100644 --- a/python/damask/_grid.py +++ b/python/damask/_grid.py @@ -54,9 +54,9 @@ class Grid: mat_max = np.nanmax(self.material) mat_N = self.N_materials return util.srepr([ - f'cells a b c: {util.srepr(self.cells, " x ")}', - f'size x y z: {util.srepr(self.size, " x ")}', - f'origin x y z: {util.srepr(self.origin," ")}', + f'cells : {util.srepr(self.cells, " x ")}', + f'size : {util.srepr(self.size, " x ")}/m', + f'origin: {util.srepr(self.origin," ")}/m', f'# materials: {mat_N}' + ('' if mat_min == 0 and mat_max+1 == mat_N else f' (min: {mat_min}, max: {mat_max})') ]) From 66f9c771dd0a85990cdb0895ae771390f820d61d Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 16 Nov 2021 10:28:23 -0500 Subject: [PATCH 2/2] correct unit for size --- python/damask/_grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/_grid.py b/python/damask/_grid.py index aafaae33d..135cc6b66 100644 --- a/python/damask/_grid.py +++ b/python/damask/_grid.py @@ -55,8 +55,8 @@ class Grid: mat_N = self.N_materials return util.srepr([ f'cells : {util.srepr(self.cells, " x ")}', - f'size : {util.srepr(self.size, " x ")}/m', - f'origin: {util.srepr(self.origin," ")}/m', + f'size : {util.srepr(self.size, " x ")} / m³', + f'origin: {util.srepr(self.origin," ")} / m', f'# materials: {mat_N}' + ('' if mat_min == 0 and mat_max+1 == mat_N else f' (min: {mat_min}, max: {mat_max})') ])