Wrong result for TetrahedronCell::squared_distance

Issue #153 resolved
Anders Logg (Chalmers) created an issue

The following code print 0.0 while it should print 1.0:

from dolfin import *
p = Point(0.1, 0.05, -1.0)
mesh = UnitCubeMesh(8, 8, 8)
c = Cell(mesh, 0)
print c.distance(p)

Comments (4)

  1. Anders Logg (Chalmers) reporter

    Problem seems to be in TriangleCell::squared_distance which does not compute accurate results in 3D.

  2. Log in to comment