Skip to content

Commit 10bbea8

Browse files
committed
Elemental results have now a mesh support
1 parent 199f3d6 commit 10bbea8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_vtk_translate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ def test_dpf_field_to_vtk_errors(simple_rst, server_type):
101101
model = dpf.Model(simple_rst, server=server_type)
102102
# Elemental Field to VTK
103103
field = model.results.elemental_volume.on_last_time_freq().eval()[0]
104-
with pytest.raises(ValueError, match="The field does not have a meshed_region."):
105-
_ = dpf_field_to_vtk(field=field)
104+
if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0:
105+
# Elemental fields are shipped with mesh now
106+
assert field.meshed_region.elements.n_elements > 0 and field.meshed_region.nodes.n_nodes > 0
107+
else:
108+
with pytest.raises(ValueError, match="The field does not have a meshed_region."):
109+
_ = dpf_field_to_vtk(field=field)
106110

107111

108112
@pytest.mark.skipif(

0 commit comments

Comments
 (0)