This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

assemble form with 2 different meshes

+2 votes
Q1 = FunctionSpace(mesh1,'CG',1)
Q2 = FunctionSpace(mesh2,'CG',2)
f1 = Function(Q1)
f2 = Function(Q2)
F = f1*f2*dx

How can you do

assemble(exp(f2/f1)*dx,mesh=mesh2)

so that assemble returns a vector on Q1?

asked Apr 15, 2014 by chaffra FEniCS User (1,830 points)
assemble(exp(f2/f1)*dx,mesh=mesh2)

cannot return a vector as there is no TestFunction neither it is linear in it.

...