Forms defined on Measures with subdomains always trigger FFC recompilation

Bug #803842 reported by Marie Rognes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
High
Unassigned

Bug Description

The caching mechanisms for the new subdomains syntax are not properly in place.

The following example for instance will call the form compiler every time it is run.

Example:

from dolfin import *

mesh = UnitInterval(10)
V = FunctionSpace(mesh, "CG", 1)
boundaries = FacetFunction("uint", mesh)
ds = Measure("ds")[boundaries]
v = TestFunction(V)
L = v*ds(0)
b = assemble(L)

Tags: subdomains
Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

Not sure where to place this bug, it's a new kind of ufl/pydolfin integration that leads to this problem.

From one perspective the culprit is this:

In [8]: repr(mf)
Out[8]: "<dolfin.cpp.MeshFunctionUInt; proxy of <Swig Object of type 'boost::shared_ptr< dolfin::MeshFunction< unsigned int > > *' at 0x3d98c00> >"

Since Measure will use repr of the domain data in its own repr, this results in new repr for each run.

But Measure doesn't assume anything (else) about the domain data, and the domain data are not intended for the form compiler (the meta data is), so maybe Measure should drop the domain data from its repr.

The most similar case we have today is that repr of a dolfin Function delegates to the repr of its ufl Coefficient superclass, ignoring dolfin specific data.

Any opinions?

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

The branch
  lp:~martinal/ufl/measurereprfix
contains a possible fix. It will cause every form signature to change.

Changed in dolfin:
status: New → Confirmed
status: Confirmed → Fix Committed
Anders Logg (logg)
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.