# Parameters of mshmet

**URL:** <https://community.freefem.org/t/parameters-of-mshmet/1328>\
**Category:** General Discussion\
**Created:** [November 15, 2021, 4:43pm UTC](https://community.freefem.org/t/parameters-of-mshmet/1328 "2021-11-15T16:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucasPa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/lucaspa/32/347_2.png) [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Post date:** [November 15, 2021, 4:43pm UTC](https://community.freefem.org/t/parameters-of-mshmet/1328/1 "2021-11-15T16:43:00Z")

</div>

Hi all,

This new post concerns the use of mshmet in FreeFem. My aim is to evaluate the use of mmg2d as I am now fully happy with the results obtained with `adaptmesh`.

According to the [FreeFem documentation](https://doc.freefem.org/documentation/mesh-generation.html#mshmet), some parameters are available for the command `mshmet`. However as soon as I try to prescribe an optional paramter a `Segmentation fault` is raised. This problem can be reproduced with the following script (where I try to use the optional parameter aniso but the same error is raised with hmin/hmax/loptions): [adaptSquarePoisson.edp](https://community.freefem.org/uploads/short-url/r1Zhpr2GBkrNhifWhfscOEYL6f7.edp) (1.2 KB)

Best,

Lucas

PS: The script in this post is created from the the nice tutorial about how to use mshmet and mmg2d at [http://annabellecollin.perso.math.cnrs.fr/TPS/TP\_0.pdf](http://annabellecollin.perso.math.cnrs.fr/TPS/TP_0.pdf) (it’s in French sorry). You can download the original files at [http://annabellecollin.perso.math.cnrs.fr/TPS/Code\_TP0.zip](http://annabellecollin.perso.math.cnrs.fr/TPS/Code_TP0.zip).

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [November 16, 2021, 8:19am UTC](https://community.freefem.org/t/parameters-of-mshmet/1328/2 "2021-11-16T08:19:08Z")

</div>

Hi,  
The following [code piece](https://github.com/FreeFem/FreeFem-sources/blob/master/plugin/seq/mshmet.cpp#L679-L681) suggests me that in the 2D FreeFem-mshmet interface, options can only be passed with the `loptions` and `doptions` keywords. However, I could not make your code work even with this either. ☹

---

<div class="post-metadata">

**Author:** ![LucasPa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/lucaspa/32/347_2.png) [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Post date:** [November 16, 2021, 8:35am UTC](https://community.freefem.org/t/parameters-of-mshmet/1328/3 "2021-11-16T08:35:19Z")

</div>

Hi,

The fact that only loptions and doptions can be passed would make sense since `hmin`\<-\>`doptions(0)`, `hmax`\<-\>`doptions(1)`, `aniso<->loptions(1)`, etc…  
But as you pointed out, `Segmentation fault` is raised if `loptions` is passed to `mshmet`.

Best,

Lucas
