Skip to content

Commit

Permalink
FEM: Fix assertDataAtPoint VTK recompute problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Hovorka committed Aug 26, 2019
1 parent 917fb61 commit 2ac2817
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Mod/Fem/femtest/app/support_solver.py
Expand Up @@ -241,14 +241,12 @@ def assertDataAtPoint(self, name, point, expect, rel_tol=1e-3, abs_tol=0.0):
dataAtPoint = self.doc.addObject(
"Fem::FemPostDataAtPointFilter")
self._addFilter(dataAtPoint)
self.doc.recompute()
dataAtPoint.FieldName = name
self.doc.recompute()
dataAtPoint.Center = point
self.doc.recompute()
dataAtPoint.FieldName = name
dataAtPoint.Center = FreeCAD.Vector(point)
values = dataAtPoint.PointData
if not values:
raise AssertionError("no data points found")
if not all(self._isclose(x, expect, rel_tol, abs_tol) for x in values):
self.doc.removeObject(dataAtPoint.Name)
msg = "{} not close enough to {}".format(values, expect)
Expand Down

0 comments on commit 2ac2817

Please sign in to comment.