** Changed in: dolfin
Status: Fix Committed => Fix Released
--
Interpolating between different meshes fails
https://bugs.launchpad.net/bugs/423154
You received this bug notification because you are subscribed to DOLFIN.
Status in DOLFIN: Fix Released
Bug description:
When I attempt to interpolate between different meshes, I get completely
erroneous results. The following example demonstrates this:
from dolfin import *
mesh1 = UnitSquare(8, 8)
mesh2 = UnitSquare(16, 16)
V1 = FunctionSpace(mesh1, "CG", 1)
V2 = FunctionSpace(mesh2, "CG", 1)
f1 = Function(V1, "500.0 * exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) /
0.02)")
f1.interpolate()
f2 = interpolate(f1, V2)
plot(f1, title="Original function")
plot(f2, title="Interpolated function")
interactive()
Furthermore, when I comment out f1.interpolate(), i.e. keep it defined as an
expression, I do not run into this problem. A workaround (as suggested by
Anders) for this seems to be to comment out data._ufc_cell = &cell; from
dolfin/function/UFCFunction.cpp.
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev