1. Andre Massing
  2. DOLFIN

Commits

Anders Logg  committed 61b0565

Improve unit test for closest_entity to avoid issues with GCC 4.8.

  • Participants
  • Parent commits 99d72ed
  • Branches master

Comments (0)

Files changed (1)

File test/unit/geometry/python/BoundingBoxTree.py

View file
  • Ignore whitespace
 # along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
 #
 # First added:  2013-04-15
-# Last changed: 2013-09-12
+# Last changed: 2013-10-22
 
 import unittest
 import numpy
 
     def test_compute_closest_entity_2d(self):
 
-        reference = (0, numpy.sqrt(2.0))
+        reference = (1, 1.0)
 
-        p = Point(-1.0, -1.0)
+        p = Point(-1.0, 0.01)
         mesh = UnitSquareMesh(16, 16)
         tree = BoundingBoxTree()
         tree.build(mesh)
 
     def test_compute_closest_entity_3d(self):
 
-        reference = (2, numpy.sqrt(3.0))
+        reference = (4, 1)
 
-        p = Point(-1.0, -1.0, -1.0)
+        p = Point(-1.0, 0.01, 0.01)
         mesh = UnitCubeMesh(8, 8, 8)
         tree = BoundingBoxTree()
         tree.build(mesh)