← Back to team overview

ffc team mailing list archive

Bug in quadrature code?

 

I've tracked down the error in the DOLFIN fem unit test to the
following simple test:

  from dolfin import *

  mesh = UnitSquare(1, 1)
  V = FunctionSpace(mesh, "DG", 1)

  v = TestFunction(V)
  u = TrialFunction(V)
  h = CellSize(mesh)

  a = (1/h)*v*u*ds

  A = assemble(a)
  info(A, True)

With the old FFC, the result is

row 0: (0, 0.235702)  (1, 0.117851)  (2, 0)
row 1: (0, 0.117851)  (1, 0.707107)  (2, 0.235702)
row 2: (0, 0)  (1, 0.235702)  (2, 0.471405)
row 3: (3, 0.707107)  (4, 0.353553)  (5, 0)
row 4: (3, 0.353553)  (4, 1.64992)  (5, 0.471405)
row 5: (3, 0)  (4, 0.471405)  (5, 0.942809)

With the new FFC, the result is instead

row 0: (0, 0.235702)  (1, 0.117851)  (2, 0)
row 1: (0, 0.117851)  (1, 0.471405)  (2, 0.117851)
row 2: (0, 0)  (1, 0.117851)  (2, 0.235702)
row 3: (3, 0.235702)  (4, 0.117851)  (5, 0)
row 4: (3, 0.117851)  (4, 0.471405)  (5, 0.117851)
row 5: (3, 0)  (4, 0.117851)  (5, 0.235702)

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups