wrong result of LagrangeInterpolator for vector enriched element spaces

Issue #487 resolved
Jaroslav Hron created an issue

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()

dolfin_plot_0.png dolfin_plot_1.png

Comments (6)

  1. Jan Blechta

    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.

  2. Mikael Mortensen

    I'm looking into it. Not sure whether or not it should work for this enriched element. I have not tested it previously.

  3. Log in to comment