Is there a deeper reason why GenericFunction
s cannot be interpolated?
from dolfin import *
f = Expression('sin(x[0])')
mesh = UnitSquareMesh(20, 20)
V = FunctionSpace(mesh, 'CG', 1)
u = Function(V)
u.interpolate(f) # no problemo
u.interpolate(2 * f) # mööp
I'd like to avoid the project
ion step here.