diff --git a/src/ansys/dpf/core/nodes.py b/src/ansys/dpf/core/nodes.py index 0179c8b73fe..32f4def93da 100644 --- a/src/ansys/dpf/core/nodes.py +++ b/src/ansys/dpf/core/nodes.py @@ -225,7 +225,9 @@ def coordinates_field(self): DPFArray([0.015, 0.045, 0.03 ]... """ - return self._get_coordinates_field() + cf = self._get_coordinates_field() + cf.meshed_region = self._mesh + return cf @coordinates_field.setter @version_requires("3.0") diff --git a/tests/test_meshregion.py b/tests/test_meshregion.py index 62fdfd99053..a08f589927c 100644 --- a/tests/test_meshregion.py +++ b/tests/test_meshregion.py @@ -98,6 +98,7 @@ def test_get_coordinates_field_meshedregion(simple_bar_model): coordinates = mesh.property_field(dpf.core.common.nodal_properties.coordinates) assert np.allclose(coordinates.data, field_coordinates.data) + assert np.all(coordinates.meshed_region.nodes.scoping.ids == mesh.nodes.scoping.ids) @conftest.raises_for_servers_version_under("3.0")