From a8c6fdd9ba903f62bba60251644849757ea7f426 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 22 Apr 2020 07:40:02 +0200 Subject: [PATCH] for the sake of completeness --- python/damask/_result.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/damask/_result.py b/python/damask/_result.py index 0d84847fb..a8181b7a1 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -465,6 +465,14 @@ class Result: with h5py.File(self.fname,'r') as f: return f['geometry/x_c'][()] + def node_coordinates(self): + """Return initial coordinates of the cell centers.""" + if self.structured: + return grid_filters.node_coord0(self.grid,self.size,self.origin).reshape(-1,3,order='F') + else: + with h5py.File(self.fname,'r') as f: + return f['geometry/x_n'][()] + @staticmethod def _add_absolute(x):