I have two meshes and their combination, say
from dolfin import *
mesh1 = RectangleMesh(0,0,1,1,3,3) #and
mesh2 = RectangleMesh(1,0,2,1,3,3)
mesh = RectangleMesh(0,0,1,2,6,3) #combination
I wish to combine the two solutions on a combined mesh
expr = Expression("sin(x[0])*cos(x[1])")
u1 = interpolate(expr,FunctionSpace(mesh1,'CG',2))
u2 = interpolate(expr,FunctionSpace(mesh2,'CG',2))
u = ?
meshplot = RectangleMesh(0,0,1,2,12,6)
uplot = interpolate(u,FunctionSpace(meshplot,'CG',1))
plot(uplot)
How should I construct u? It is easy for a CG1 field and I have played around enough to have an idea of how to reverse engineer the FEniCS CG2 ordering, but I was hoping for an easy solution...