# Non-overlapping mesh

**URL:** <https://community.freefem.org/t/non-overlapping-mesh/593>\
**Category:** General Discussion\
**Created:** [September 23, 2020, 9:18pm UTC](https://community.freefem.org/t/non-overlapping-mesh/593 "2020-09-23T21:18:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mordechaiy](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mordechaiy](https://community.freefem.org/u/mordechaiy)\
**Post date:** [September 23, 2020, 9:18pm UTC](https://community.freefem.org/t/non-overlapping-mesh/593/1 "2020-09-23T21:18:05Z")

</div>

Hi to all,

I created in FF+ a domain which is a square [0,3]x[0,3], using the command “square”, then I add a subdomain [0.9,2.1]x[0.9,2.1] using the “+” operator. Finally a subtracted a subdomain [1.05,1.95]x[1.05,1.95] using the “trunc” command.  
I would like to ask please,  
how can I generate to this domain with a hole a non-overlapping mesh in FF++?  
I’m attaching my code.  
If one “zoom” the plot of the mesh the overlapping between the domains can be seen.

Best Regards,  
Mordechai.

[Backward EG.edp](https://community.freefem.org/uploads/short-url/toBWhe57UyBTekD0ixrqEEggdsT.edp) (4.0 KB)

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [September 24, 2020, 7:55am UTC](https://community.freefem.org/t/non-overlapping-mesh/593/2 "2020-09-24T07:55:45Z")

</div>

You have tons of possibility.

1. just use trance,
2. use border with internal border like in [https://github.com/FreeFem/FreeFem-sources/blob/master/examples/tutorial/mesh.edp](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/tutorial/mesh.edp) at line 43.

---

<div class="post-metadata">

**Author:** ![mordechaiy](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mordechaiy](https://community.freefem.org/u/mordechaiy)\
**Post date:** [September 24, 2020, 8:19pm UTC](https://community.freefem.org/t/non-overlapping-mesh/593/3 "2020-09-24T20:19:31Z")

</div>

Hello professor Hecht,  
Thank you for your reply,

1. Did you mean just use “trunc” command instead of trance?
2. I would like to use a uniform mesh where the partitions of the domain in x and y directions are equal. If I use the" border" and the “buildmesh” commands, then FF++ will not generate a uniform mesh on the domain.

Best Regards,  
Mordechai.

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [October 5, 2020, 2:12pm UTC](https://community.freefem.org/t/non-overlapping-mesh/593/4 "2020-10-05T14:12:08Z")

</div>

Yes I mean trunc

like in

mesh Th=square(20,10,[x\*2,y]);  
mesh Th1= trunc(Th,x\<1.2);  
mesh Th2= trunc(Th,x\>0.8);  
// I do a small movemesh tp seee smoe thing on a plot  
plot(Th1,movemesh(Th2,[x+0.01,y]),wait=1,cmm=“Th1”);

---

<div class="post-metadata">

**Author:** ![mordechaiy](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mordechaiy](https://community.freefem.org/u/mordechaiy)\
**Post date:** [October 6, 2020, 6:03pm UTC](https://community.freefem.org/t/non-overlapping-mesh/593/5 "2020-10-06T18:03:04Z")

</div>

Thank you very much, Professor Hecht.
