The basis for Q was formed by concatenation, and hence wasn't nodal. Interpolating gave you the result of interpolating onto P2, interpolating onto B, and adding these together.
When I encountered this 2.5 years ago, I treated this it a 'gotcha' and made a mental note to always project into enriched spaces instead (after interpolating into P3, say) Jan Blechta had stronger views, and made it error, as you see now. On 10 July 2015 at 19:03, Ham, David A <[email protected]> wrote: > Enriched elements in FEniCS don't have true nodal bases, so the standard > interpolation algorithm does the Wrong Thing. Perhaps someone has just put > in a catch for this. > > On Fri, 10 Jul 2015 at 18:59 Cian Wilson <[email protected]> > wrote: > >> Hello, >> >> When I run: >> ``` >> from dolfin import * >> mesh = UnitSquareMesh(1,1) >> P2 = VectorFunctionSpace(mesh, "Lagrange", 2) >> B = VectorFunctionSpace(mesh, "Bubble", 3) >> Q = P2 + B >> F = Function(Q) >> E = Expression(("x[0]+1.0", "x[1]+1.0")) >> F.interpolate(E) >> ``` >> >> using DOLFIN 1.5.0, it runs with no problem and: >> ``` >> print F.vector().array() >> ``` >> >> seems to return reasonable looking results. >> >> However, with the latest master I get: >> >> " >> ----> 1 F.interpolate(E) >> >> RuntimeError: evaluate_dof(s) for enriched element not implemented. >> " >> >> Is there a way around this? I was using this to set initial >> conditions. Was it always broken in some way and I just didn't notice? >> >> Many thanks, >> Cian >> >> _______________________________________________ >> fenics mailing list >> [email protected] >> http://fenicsproject.org/mailman/listinfo/fenics >> >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
