Forms defined on Measures with subdomains always trigger FFC recompilation
Bug #803842 reported by
Marie Rognes
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(
ds = Measure(
v = TestFunction(V)
L = v*ds(0)
b = assemble(L)
Changed in dolfin: | |
status: | New → Confirmed |
status: | Confirmed → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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) cpp.MeshFunctio nUInt; proxy of <Swig Object of type 'boost::shared_ptr< dolfin: :MeshFunction< unsigned int > > *' at 0x3d98c00> >"
Out[8]: "<dolfin.
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?