I'm trying to solve the equation
$$ \frac{d}{dt} f(y,t) + \frac{d}{dy} {J(y)(2-q)f(y,t)} + \frac{d^2}{{dy}^2} {D{f(y,t)}^{2-q}} $$
with Fenics. I discretised the time derivative as described in the heat equation tutorial and
arrived at this form:
F = (u-u_n)*v*dx + dt*pow(u, 1-q)*Dx(u,0)*Dx(v,0)*dx + dt*J*u*Dx(v,0)*dx
or alternatively instead of dt*pow(u, 1-q)*Dx(u,0)*Dx(v,0)*dx
is also tried
dt*Dx(u**(2-q),0)*Dx(v,0)*dx
withouth applying the chain rule here. Unfortunately Fenics complains for the forms since
it won't accept real numbers for q. Is there any way around this?