# Crossed mesh on a square

**URL:** <https://community.freefem.org/t/crossed-mesh-on-a-square/2897>\
**Category:** General Discussion\
**Created:** [January 20, 2024, 11:46am UTC](https://community.freefem.org/t/crossed-mesh-on-a-square/2897 "2024-01-20T11:46:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fotkara](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@fotkara](https://community.freefem.org/u/fotkara)\
**Post date:** [January 20, 2024, 11:46am UTC](https://community.freefem.org/t/crossed-mesh-on-a-square/2897/1 "2024-01-20T11:46:55Z")

</div>

Hello.

I would like to do some calculations on the unit square using crossed meshes.  
Is there a simple way to create a crossed mesh on a unit square?  
I would also like to globally refine a mesh such that the old mesh to be a subset of the new mesh.

Is that possible to create a uniform crossed mesh by giving the maximum edge of a triangle?

I would be grateful for any help!

---

<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:** [January 20, 2024, 9:08pm UTC](https://community.freefem.org/t/crossed-mesh-on-a-square/2897/2 "2024-01-20T21:08:21Z")

</div>

Yes , cross is union jack mesh for me  
try this exemple

```auto
for(inti=0;i<5;++i){

int[int] labs = [11, 12, 13, 14];
mesh Th = square(3, 3, flags=i, label=labs, region=10); plot(Th, wait=1, cmm="square flags = "+i );
plot(Th,wait=1);
}

```

---

<div class="post-metadata">

**Author:** ![fotkara](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@fotkara](https://community.freefem.org/u/fotkara)\
**Post date:** [January 21, 2024, 7:32am UTC](https://community.freefem.org/t/crossed-mesh-on-a-square/2897/3 "2024-01-21T07:32:01Z")

</div>

Thank you very much for your reply. Is that possible to divide each triangle of a union jack mesh into two triangles to have a global refinement of the mesh?

Thank you!
