- changed milestone to 1.6
-
assigned issue to
- changed version to dev
- marked as minor
wrong result of LagrangeInterpolator for vector enriched element spaces
The LagrangeInterpolator seems to give wrong results for vector enriched element spaces.
from dolfin import *
mesh = RectangleMesh(0.0, 0.0, 1.0, 1.0, 4, 4, "crossed")
V = VectorFunctionSpace(mesh, "CG", 2)
B = VectorFunctionSpace(mesh, "Bubble", 3)
U=V+B
e=Expression(("1.0","0.0"))
u=interpolate(e,U)
plot(u)
u=Function(U)
LI=LagrangeInterpolator()
LI.interpolate(u,e)
plot(u)
interactive()
Comments (6)
-
-
I'm looking into it. Not sure whether or not it should work for this enriched element. I have not tested it previously.
-
reporter There seems to be similar problem in dolfin interpolate - see
#489- it might be connected? -
- changed status to resolved
After resolving
#489, the original example now raisesRuntimeError: evaluate_dof(s) for enriched element not implemented.
on
u=interpolate(e,U)
. Switching it tou=project(e,U)
raisesRuntimeError: tabulate_coordinates is not defined for this element
on
LI.interpolate(u,e)
.Blueprint for correct reimplementation: https://bitbucket.org/fenics-project/ffc/issue/69.
-
BTW, https://bitbucket.org/fenics-project/ffc/issue/69 suggest that dofs of enriched element will be linear combinations of Dirac deltas. I'm not sure whether
tabulate_coordinates
(used byLagrangeInterpolator
) will have a sense in this situation. -
- removed milestone
Removing milestone: 1.6 (automated comment)
- Log in to comment
I'm not sure if it has a chance to work (doc says
This class interpolates efficiently from a GenericFunction to a Lagrange Function
) but it should at least check a validity of the arguments.