quadrature fails with facet normal and conditional

Issue #111 new
Jan Blechta created an issue
from dolfin import *

parameters["form_compiler"]["optimize"] = True
parameters["form_compiler"]["representation"] = "quadrature"

mesh = UnitCubeMesh(1, 1, 1)
V = VectorFunctionSpace(mesh, "CG", 2)
u = Function(V)
n = FacetNormal(mesh)
assemble(Min(Constant(0), inner(u, n))*ds)

fails with

error: n0 was not declared in this scope
         I[0] = W3[ip]*det*std::min(w[1][0], (F0*n0 + F1*n1 + F2*n2));

uflacs seems to work, tensor gives a sensible error.

Comments (3)

  1. Miguel Angel Salazar de Troya

    This can compile without the line

    parameters["form_compiler"]["optimize"] = True
    

    What kind of compiler optimization is going on here? Is it using uflacs?

  2. Jan Blechta reporter

    No. It's using ffc.quadrature.optimisedquadraturetransformer instead of ffc.quadrature.quadraturetransformer and then doing some optimizations in ffc.quadrature.quadratureoptimization using ffc.quadrature.symbolics.

  3. Log in to comment