Facet normal with uflacs does not give the same results as ffc generated code

Issue #32 resolved
Martin Sandve Alnæs created an issue

I thought this was working, needs investigation.

Comments (3)

  1. Martin Sandve Alnæs reporter

    This test program gives the same results for uflacs and quadrature in the eye-norm:

    from dolfin import *
    import sys
    if sys.argv[1] == "u":
        parameters["form_compiler"]["representation"] = "uflacs"
    
    mesh = UnitIntervalMesh(3)
    #mesh = UnitSquareMesh(10, 10)
    #mesh = UnitCubeMesh(10, 10, 10)
    #mesh = Mesh("dolfin_fine.xml.gz")
    
    n = FacetNormal(mesh)
    d = len(n)
    
    V = VectorFunctionSpace(mesh, "CG", 1)
    
    u = TrialFunction(V)
    v = TestFunction(V)
    N = Function(V)
    alpha = Constant(1e-6)
    solve(alpha*inner(grad(u), grad(v))*dx + inner(u, v)*ds == dot(n, v)*ds, N)
    
    plot(N, title='N')
    interactive()
    
  2. Martin Sandve Alnæs reporter

    The bug is in the known bug in the ffc regression test for interior facet integrals: the same cell geometry is used from both sides which is not well defined input to an interior facet integral.

  3. Log in to comment