for the sake of completeness

This commit is contained in:
Martin Diehl 2020-04-22 07:40:02 +02:00
parent ac75b9e4ca
commit a8c6fdd9ba
1 changed files with 8 additions and 0 deletions

View File

@ -465,6 +465,14 @@ class Result:
with h5py.File(self.fname,'r') as f: with h5py.File(self.fname,'r') as f:
return f['geometry/x_c'][()] 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 @staticmethod
def _add_absolute(x): def _add_absolute(x):