# Save/load meshL

**URL:** <https://community.freefem.org/t/save-load-meshl/2836>\
**Category:** General Discussion\
**Created:** [December 14, 2023, 9:07pm UTC](https://community.freefem.org/t/save-load-meshl/2836 "2023-12-14T21:07:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilavi](https://avatars.discourse-cdn.com/v4/letter/i/b782af/32.png) [@ilavi](https://community.freefem.org/u/ilavi)\
**Post date:** [December 14, 2023, 9:07pm UTC](https://community.freefem.org/t/save-load-meshl/2836/1 "2023-12-14T21:07:28Z")

</div>

Hi all,  
What is the proper way of saving and loading a meshL in FreeFem?

---

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [December 18, 2023, 5:55pm UTC](https://community.freefem.org/t/save-load-meshl/2836/2 "2023-12-18T17:55:06Z")

</div>

To save a mesh, you use the command  
savemesh(Th,“Th.msh”);  
To load your mesh, you use the command  
readmesh(“Th.msh”);  
You will find many examples in the freefem documentation.

---

<div class="post-metadata">

**Author:** ![ilavi](https://avatars.discourse-cdn.com/v4/letter/i/b782af/32.png) [@ilavi](https://community.freefem.org/u/ilavi)\
**Post date:** [December 20, 2023, 6:34pm UTC](https://community.freefem.org/t/save-load-meshl/2836/3 "2023-12-20T18:34:02Z")

</div>

I am talking specifically about a meshL, so the .msh format doesn’t work. In the documentation, I couldn’t find an example for loading this type of mesh.  
Say ThL is defined as meshL, I can save it via:  
`savemesh(ThL,"ThL.mesh");`  
But I have trouble reading it back. This does not work:

```auto
meshL ThL; 
ThL = readmesh("ThL.mesh")

```

---

<div class="post-metadata">

**Author:** ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)\
**Post date:** [December 21, 2023, 5:15am UTC](https://community.freefem.org/t/save-load-meshl/2836/4 "2023-12-21T05:15:17Z")

</div>

I think you should use `readmeshL`

> Th = readmeshL(“ThL.mesh”);

---

<div class="post-metadata">

**Author:** ![ilavi](https://avatars.discourse-cdn.com/v4/letter/i/b782af/32.png) [@ilavi](https://community.freefem.org/u/ilavi)\
**Post date:** [December 21, 2023, 3:47pm UTC](https://community.freefem.org/t/save-load-meshl/2836/5 "2023-12-21T15:47:37Z")

</div>

That it. Thanks Julien.
