# Overlapping mesh - integral calculation

**URL:** https://community.freefem.org/t/overlapping-mesh-integral-calculation/458
**Category:** General Discussion
**Created:** [June 8, 2020, 6:22pm UTC](https://community.freefem.org/t/overlapping-mesh-integral-calculation/458 "2020-06-08T18:22:49Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [June 19, 2020, 11:59am UTC](https://community.freefem.org/t/overlapping-mesh-integral-calculation/458/10 "2020-06-19T11:59:47Z")

</div>

You cannot use direct interpolation: this is a sequential kernel, you’d need to have the same subdomain meshes, which is no the case given that you partition both global meshes without any constraints.

That being said, you are using the low-level API, which I explicitly recommended not to do in a previous post.

> Instead, you can use higher-level macros, more user friendly, like `buildDmesh()` or `createMat()` . It will allow you to do much more powerful operations like **interpolation in parallel** […].

You problem is in fact addressed in this other [post](https://community.freefem.org/t/copy-variables-between-different-meshes-with-petsc/390/2). You can also have a look at this [other](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/hpddm/transfer.edp) example. Let me know if something is not clear to you.  
What you do could work but you are not using the partition of unity so everything is over-summed on the overlap. Plus, you have to go from local to global to local again, which is rather inefficient.

---

_[View the full topic](https://community.freefem.org/t/overlapping-mesh-integral-calculation/458)._
