This is a very basic question. I am new to FEniCS. So my apologies if this has an obvious answer.
Suppose \Omega_{2} is a subspace of \Omega_{1}. Now we define a function space on \Omega_{1} as
FS_omega1 = FunctionSpace(omega1, 'P', 1)
We then solve for a function P(x,y) on \Omega_{1}, where P=Function(FS_omega1)
Now I want to extract the values of P(x,y) on \Omega_{2}.
Will Q = project(P, omega2)
give us P(x,y)|_{\Omega_{2}} ?