In the demo program Cahn-Hilliard equation, if I change " #Create intial conditions and interpolate" codes from
u.interpolate(u_init)
u0.interpolate(u_init)
to
u = project(u_init, ME) or interpolate(u_init, ME)
u0 = project(u_init, ME) or interpolate(u_init, ME)
the output result will show errors "Segmentation fault". If only change one line and keep another line code unchanged, the output will not change after first loop.
I thought u.interpolate(u_init) is same as u = interpolate(u_init, ME), but it seems I am wrong. What is the difference between u.interpolate() and u = project()/interpolate() ?