UFLACS error for vertex quadrature scheme

Issue #145 new
Nico Schlömer created an issue

UFLACS generates for

e = FiniteElement("P", triangle, 1)
u = TrialFunction(e)
v = TestFunction(e)
a = u*v*dx(scheme='vertex')

undefined variable FE3_C0_Q3.

It would be good to add a regression test case with vertex scheme.

Comments (5)

  1. Nico Schlömer reporter

    Thanks @blechta for the nice simplification of the MWE.

    Using the vertex scheme (with {'quadrature_degree': 1}, actually) is quite important for one of my applications since I need the mass matrix to have no positive entries outside of the diagonal. (This leads to unphysical oscillations in the solution.) The workaround you describe doesn't do the trick.

    Is there a workaround that produces a mass matrix with entries only on the diagonal?

  2. Jan Blechta

    Seems working for me

    from dolfin import *
    
    mesh = UnitSquareMesh(10, 10)
    V = FunctionSpace(mesh, 'CG', 1)
    
    u = TrialFunction(V)
    v = TestFunction(V)
    
    A = assemble(
          u * v * dx,
          form_compiler_parameters={'quadrature_rule': 'vertex',
                                    'representation': 'quadrature'}
          )
    
    A = A.array()
    for i in range(A.shape[0]):
        A[i, i] = 0.0
    assert abs(A).sum() == 0.0
    
  3. Log in to comment