Integration over non matching meshes

5 months ago by

I have given two dolfin::Functions f and g which live on different triangulations mesh_f and mesh_g. Now, I need to compute the L2 inner product of f and g. The difficulty is that the two meshes are non-matichng. Is there an easy way?
I have tried MultiMesh and was able to compute a Multi Mesh linear form L = f*v*dx where v denotes a Test function. But I was not able to compute L = f*g*dx because MultiMeshAssembler will return a GenericTensor and not a scalar ...(?).

I would be very thankful for any help or comments,
Community: FEniCS Project
Not sure about MultiMesh, but have you tried LagrangeInterpolator?  What happens when you interpolate one or the other field onto the other space and just call assemble() with the inner product including the interpolated function?
written 5 months ago by pf4d  
Thanks for your comment. That could be an option. But in my case, interpolation is exactly what I want to avoid...
written 5 months ago by Moerni  
If your meshes do not share node coordinates, you're not going to be able to avoid interpolation.
written 5 months ago by pf4d  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »