Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/09-averaging/00-compute_and_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
def compute_von_mises_then_average(analysis):
# Create a model from the results of the simulation and retrieve its mesh
model = dpf.Model(analysis)
mesh = model.metadata.meshed_region

# Apply the stress operator to obtain the stresses in the body
stress_op = dpf.operators.result.stress()
Expand All @@ -120,6 +119,8 @@ def compute_von_mises_then_average(analysis):
min_max.inputs.field.connect(avg_von_mises)
max_val = min_max.outputs.field_max()

avg_von_mises.plot()

return max_val.data[0]


Expand Down Expand Up @@ -157,6 +158,8 @@ def average_then_compute_von_mises(analysis):
min_max.inputs.field.connect(avg_von_mises)
max_val = min_max.outputs.field_max()

avg_von_mises.plot()

return max_val.data[0]


Expand Down
Loading