← Back to team overview

dolfin team mailing list archive

[Bug 788610] Re: PyDolfin VariationalProblem does not provide a common_cell for forms with invalid cells

 

** Changed in: dolfin
       Status: New => Won't Fix

** Changed in: dolfin
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/788610

Title:
  PyDolfin VariationalProblem does not provide a common_cell for forms
  with invalid cells

Status in DOLFIN:
  Won't Fix

Bug description:
  Dolfin does not always pass a common_cell to jit if there are missing
  cells in the form.

  Using this code:

  from dolfin import *
  parameters["form_compiler"]["name"] = "sfc"
  mesh = UnitInterval(10)
  V = FunctionSpace(mesh, "CG", 1)
  v = TestFunction(V)
  u = TrialFunction(V)
  f = Expression("x[0]")
  a = v*u*dx
  L = v*f*dx
  problem = VariationalProblem(a, L)

  
  I printed arguments from sfc.jit:

  common cell = None

  str(form) =
  { v_{-2} * <Expression ()> } * dx0

  repr(form) =
  Form([Integral(Product(Argument(FiniteElement('Lagrange', Cell('interval', Space(1)), 1, None), -2), Coefficient(FiniteElement('Lagrange', Cell(None, None), None, None), 0)), Measure('cell', 0, None))])

  
  Thus the form compiler must analyse the input form to detect whether PyDOLFIN has given an ill defined form and find the common cell itself before preprocess.

  The above code works with ffc, from which I infer that ffc must detect
  a common cell.

  Is this intended behaviour?

  If it was up to me I would rip out common_cell once and for all, it
  leads to a lot of clutter...


References