# Dividing mesh into 2 domains

**URL:** <https://community.freefem.org/t/dividing-mesh-into-2-domains/2728>\
**Category:** General Discussion\
**Created:** [September 27, 2023, 12:05pm UTC](https://community.freefem.org/t/dividing-mesh-into-2-domains/2728 "2023-09-27T12:05:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zese](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zese/32/917_2.png) [@zese](https://community.freefem.org/u/zese)\
**Post date:** [September 27, 2023, 12:05pm UTC](https://community.freefem.org/t/dividing-mesh-into-2-domains/2728/1 "2023-09-27T12:05:25Z")

</div>

Dear all,

I have created a mesh in gmsh and imported to freefem. now I have a problem. I need to divide the mesh into 2 domains by creating a rectangle inside the imported domain. can I do that inside freefem or I have to go back to gmsh?

BR

---

<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 28, 2023, 8:31am UTC](https://community.freefem.org/t/dividing-mesh-into-2-domains/2728/2 "2023-09-28T08:31:00Z")

</div>

It depend of you mesh, but you can remesh by building a border of the initial mesh  
and a internal border and rebuild a mesh with build mesh.

---

<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 28, 2023, 4:24pm UTC](https://community.freefem.org/t/dividing-mesh-into-2-domains/2728/3 "2023-09-28T16:24:43Z")

</div>

I will make a small exemple

---

<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 28, 2023, 4:40pm UTC](https://community.freefem.org/t/dividing-mesh-into-2-domains/2728/4 "2023-09-28T16:40:36Z")

</div>

the exemple  
[include-mesh-in-mesh.edp](https://community.freefem.org/uploads/short-url/qo6YW1eeRh5mG7K8eO6HkKkHy19.edp) (418 Bytes)
