Skip to content

Commit 67f1d80

Browse files
authored
fix(example): fix retro with 25R1 and below for 00-basic_plotting.py (#2473)
1 parent bf20995 commit 67f1d80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/06-plotting/00-basic_plotting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
# Plot the bare mesh of a model
3838
model = dpf.Model(examples.find_multishells_rst())
39+
print(model)
3940
model.plot(color="w", show_edges=True, title="Model", text="Model plot")
4041
# # Additional PyVista kwargs are supported, such as:
4142
model.plot(
@@ -55,6 +56,9 @@
5556

5657
# Plot a field on its supporting mesh
5758
stress = model.results.stress()
59+
# We request the stress as nodal to bypass a bug for DPF 2025 R1 and below
60+
# which prevents from plotting ElementalNodal data on shells
61+
stress.inputs.requested_location.connect(dpf.locations.nodal)
5862
fc = stress.outputs.fields_container()
5963
field = fc[0]
6064
field.plot(notebook=False, shell_layers=None, show_axes=True, title="Field", text="Field plot")

0 commit comments

Comments
 (0)