After interpolating an Expression onto a FunctionSpace, I subtract a scalar from the Function, project this value onto the FunctionSpace, and reset the original Function to new values via the set_local method.
This creates the artifacts shown below when executing with more than 1 core.
Using the update method with 1.3 used to update the ghost vertices. However, with the code for update removed in 1.4, this fails.
from fenics import *
# Create mesh and define function space :
mesh = UnitCubeMesh(10, 10, 10)
V = FunctionSpace(mesh, 'Lagrange', 1)
# Define Function :
u = Expression('1 + x[0]*x[0] + 2*x[1]*x[1] + 4*x[2]*x[2]')
u = interpolate(u, V)
# subtract 10 from the Function :
u_n = project(u - 10.0, V)
# reset the Function :
u_v = u_n.vector().array()
u.vector().set_local(u_v)
File('u.pvd') << project(u, V)
P.S. is there a nifty way to center the images in this window?