# Developers Help

**URL:** https://forum.mmgtools.org/c/developers-help/6.md

[Latest](https://forum.mmgtools.org/latest.md) · [Categories](https://forum.mmgtools.org/categories.md)

---

## [About the Developers Help category](https://forum.mmgtools.org/t/about-the-developers-help-category/15)

<div class="topic-metadata">

**Author:** [@Algiane](https://forum.mmgtools.org/u/Algiane)\
**Replies:** 0\
**Last updated:** [February 24, 2016, 2:09pm UTC](https://forum.mmgtools.org/t/about-the-developers-help-category/15 "2016-02-24T14:09:14Z")

</div>

Questions about code development around the Mmg plateform (compilation of the Mmg platform, contribution to the plateform, etc...).

---

## [Unstable work mmg2d](https://forum.mmgtools.org/t/unstable-work-mmg2d/735)

<div class="topic-metadata">

**Author:** [@nemo](https://forum.mmgtools.org/u/nemo)\
**Replies:** 0\
**Last updated:** [June 7, 2023, 11:44am UTC](https://forum.mmgtools.org/t/unstable-work-mmg2d/735 "2023-06-07T11:44:34Z")

</div>

When you run the program several times, either a infinite loop or an Access violation occurs. Compiled Windows 10 Visual Studio 2022 (v143) using static linking Example add. adaptation\_example0\_b.zip (242.9 KB)

---

## [Refs of some edges are not preserved](https://forum.mmgtools.org/t/refs-of-some-edges-are-not-preserved/713)

<div class="topic-metadata">

**Author:** [@junweisu](https://forum.mmgtools.org/u/junweisu)\
**Replies:** 3\
**Last updated:** [May 11, 2023, 6:39pm UTC](https://forum.mmgtools.org/t/refs-of-some-edges-are-not-preserved/713 "2023-05-11T18:39:43Z")

</div>

Dear Algiane I am using mmg2d for meshing a domain of square with another square inside it. All the boundary refs are appended using (MMG2D\_Set\_edge(mmgMesh, edges\[2i\], edges\[2i+1\], edgeMark\[i\], i+1) ; The ref of…

---

## [Hgrad relation to a triangle internal angles in mmg2d](https://forum.mmgtools.org/t/hgrad-relation-to-a-triangle-internal-angles-in-mmg2d/703)

<div class="topic-metadata">

**Author:** [@kabukunz](https://forum.mmgtools.org/u/kabukunz)\
**Replies:** 0\
**Last updated:** [March 9, 2023, 8:05am UTC](https://forum.mmgtools.org/t/hgrad-relation-to-a-triangle-internal-angles-in-mmg2d/703 "2023-03-09T08:05:39Z")

</div>

Hello there! I’m using mmg2d and I’m having problem understanding how to setup hgrad parameter. Starting from a tris mesh I need to have it remeshed so as the tris internal angles are about a specific quality value, sa…

---

## [MMG ignores required edges](https://forum.mmgtools.org/t/mmg-ignores-required-edges/671)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 9:03pm UTC](https://forum.mmgtools.org/t/mmg-ignores-required-edges/671 "2022-11-21T21:03:15Z")

</div>

Hello, the following program: defines a mesh of the unit square with two triangles remeshes the line x=0.3 with the level set function then remeshes the line x=0.7 with the level set function tries to set the edges fr…

---

## [Should there be a global mmgcmakedefines.h for all three?](https://forum.mmgtools.org/t/should-there-be-a-global-mmgcmakedefines-h-for-all-three/651)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 5\
**Last updated:** [August 25, 2022, 8:27am UTC](https://forum.mmgtools.org/t/should-there-be-a-global-mmgcmakedefines-h-for-all-three/651 "2022-08-25T08:27:20Z")

</div>

Not sure if I messed something up but it seems to me that after building the “INSTALL” target that cmake automatically generates, the global file mmg\_export.h in the folder “mmg\\include\\mmg” also expects a global mmgcmak…

---

## [Required elements vs required faces in 3d](https://forum.mmgtools.org/t/required-elements-vs-required-faces-in-3d/528)

<div class="topic-metadata">

**Author:** [@prudhomm](https://forum.mmgtools.org/u/prudhomm)\
**Replies:** 9\
**Last updated:** [June 16, 2022, 4:01pm UTC](https://forum.mmgtools.org/t/required-elements-vs-required-faces-in-3d/528 "2022-06-16T16:01:41Z")

</div>

Hi Is there something to be aware of regarding required triangles in 3d ? Required triangles are not preserved in my case. Here is the context: I have a part of the domain (tets) that I require to enforce a relationshi…

---

## [Some linking error](https://forum.mmgtools.org/t/some-linking-error/603)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 1\
**Last updated:** [February 23, 2022, 10:01am UTC](https://forum.mmgtools.org/t/some-linking-error/603 "2022-02-23T10:01:41Z")

</div>

Hello! I’m building the latest develop commit b13a67 with the script cmake -G "Visual Studio 17 2022"\\ -DCMAKE\_GENERATOR\_PLATFORM=x64 -A x64 -DUSE\_SCOTCH=OFF -DUSE\_VTK=OFF -DUSE\_ELAS=OFF -DCMAKE\_WINDOWS\_EXPORT\_ALL\_SYMB…

---

## [Compiling Parmmg with other software with mpi](https://forum.mmgtools.org/t/compiling-parmmg-with-other-software-with-mpi/593)

<div class="topic-metadata">

**Author:** [@iwheel](https://forum.mmgtools.org/u/iwheel)\
**Replies:** 4\
**Last updated:** [December 3, 2021, 3:11pm UTC](https://forum.mmgtools.org/t/compiling-parmmg-with-other-software-with-mpi/593 "2021-12-03T15:11:21Z")

</div>

Hello, I am trying to compile ParMMG with the FEM Elmer. I am using the ParMMG Fortran API embedded within the Elmer code. However since Elmer has its own mpi interface based off the same mpif.h file there are lots of c…

---

## [Can mmg3d be used to turn an unconstrained to a constrained Delaunay tetrahedralization?](https://forum.mmgtools.org/t/can-mmg3d-be-used-to-turn-an-unconstrained-to-a-constrained-delaunay-tetrahedralization/578)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 5\
**Last updated:** [October 30, 2021, 6:48am UTC](https://forum.mmgtools.org/t/can-mmg3d-be-used-to-turn-an-unconstrained-to-a-constrained-delaunay-tetrahedralization/578 "2021-10-30T06:48:59Z")

</div>

Hello, … back working with mmg after some while :slight\_smile: I’m trying to solve a similar situation as the one described in this recent thread: to go from a surface mesh to a tetrahedral mesh. Starting from a set o…

---

## [Getting mmg added to conda-forge](https://forum.mmgtools.org/t/getting-mmg-added-to-conda-forge/551)

<div class="topic-metadata">

**Author:** [@ngodber](https://forum.mmgtools.org/u/ngodber)\
**Replies:** 8\
**Last updated:** [July 1, 2021, 9:22am UTC](https://forum.mmgtools.org/t/getting-mmg-added-to-conda-forge/551 "2021-07-01T09:22:04Z")

</div>

Conda has become a great platform for packages across Unix, Windows, ARM etc. It would be great to see mmg added to this platform to greatly expand accessibility for the tool. A quick look at the mmg build tools makes it…

---

## [Relation between required faces or elements between remeshes](https://forum.mmgtools.org/t/relation-between-required-faces-or-elements-between-remeshes/520)

<div class="topic-metadata">

**Author:** [@prudhomm](https://forum.mmgtools.org/u/prudhomm)\
**Replies:** 8\
**Last updated:** [June 3, 2021, 8:13am UTC](https://forum.mmgtools.org/t/relation-between-required-faces-or-elements-between-remeshes/520 "2021-06-03T08:13:00Z")

</div>

Hi is there a way to know the relation (in terms of ids) between required faces or elements between remeshes ? are they kept in the same order as they were given (not the same id but the same order) ? I have faces or …

---

## [Question on Lagrangian movement + relation between meshes](https://forum.mmgtools.org/t/question-on-lagrangian-movement-relation-between-meshes/521)

<div class="topic-metadata">

**Author:** [@prudhomm](https://forum.mmgtools.org/u/prudhomm)\
**Replies:** 32\
**Last updated:** [May 10, 2021, 3:41pm UTC](https://forum.mmgtools.org/t/question-on-lagrangian-movement-relation-between-meshes/521 "2021-05-10T15:41:47Z")

</div>

Hi We are developing an application which uses the ALE framework. We mix remeshing and ALE map to construct meshes after applying some displacements we start from a reference mesh then we apply the displacement define…

---

## [Saving multiple solutions](https://forum.mmgtools.org/t/saving-multiple-solutions/478)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 1\
**Last updated:** [October 26, 2020, 8:40am UTC](https://forum.mmgtools.org/t/saving-multiple-solutions/478 "2020-10-26T08:40:01Z")

</div>

Hi, when there is an array of solutions, say two of them called sols, allocated with MMG5\_pSol sols\[2\]; int types\[2\] = {MMG5\_Scalar, MMG5\_Scalar}; MMG2D\_Set\_solsAtVerticesSize(mesh2, sols, 2, n, types); where n is…

---

## [How to scale the metric for anisotropic meshing in MMG2D? Example provided](https://forum.mmgtools.org/t/how-to-scale-the-metric-for-anisotropic-meshing-in-mmg2d-example-provided/441)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 5\
**Last updated:** [June 5, 2020, 3:52pm UTC](https://forum.mmgtools.org/t/how-to-scale-the-metric-for-anisotropic-meshing-in-mmg2d-example-provided/441 "2020-06-05T15:52:47Z")

</div>

Hello, there is only one recently added example of how to set a tensorial metric in MMG2D, for anisotropic meshing but it relies on a mesh/sol file. I thought it would be great to have an example that demonstrates: ho…

---

## [How to reset a metric to cleared state?](https://forum.mmgtools.org/t/how-to-reset-a-metric-to-cleared-state/442)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 4\
**Last updated:** [June 2, 2020, 2:21pm UTC](https://forum.mmgtools.org/t/how-to-reset-a-metric-to-cleared-state/442 "2020-06-02T14:21:07Z")

</div>

Dear forum, in general, the function MMG2D\_mmg2dlib(mesh, met) is not idempotent: calling it repeatedly gives different results than calling it once. Regardless of whether it makes sens to call it repeatedly, I wonde…

---

## [Can one set hmin, hmax, hsiz differently per reference?](https://forum.mmgtools.org/t/can-one-set-hmin-hmax-hsiz-differently-per-reference/433)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 9:02am UTC](https://forum.mmgtools.org/t/can-one-set-hmin-hmax-hsiz-differently-per-reference/433 "2020-05-18T09:02:46Z")

</div>

That would be great. If references are basically tags of “sub-domains” or materials, it would make sense to set hmin, hmax and hsiz differently on each reference isomesh. Is there a way to do that, ideally through the A…

---

## [Discrepancy between API and command line on the same mesh: API ignores hmax setting](https://forum.mmgtools.org/t/discrepancy-between-api-and-command-line-on-the-same-mesh-api-ignores-hmax-setting/418)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://forum.mmgtools.org/u/Mathias-Fuchs)\
**Replies:** 3\
**Last updated:** [February 17, 2020, 11:13am UTC](https://forum.mmgtools.org/t/discrepancy-between-api-and-command-line-on-the-same-mesh-api-ignores-hmax-setting/418 "2020-02-17T11:13:14Z")

</div>

Hello Forum, new here but I think I might be coming back a few times. When I run the command line version of mmg (linux debug build from github master branch like mmg2d\_Os -hmax 0.1 -v 10 sweet.msh on a simple squa…

---

## [Parallel version of MMG2D/MMGS](https://forum.mmgtools.org/t/parallel-version-of-mmg2d-mmgs/371)

<div class="topic-metadata">

**Author:** [@HollowSun0](https://forum.mmgtools.org/u/HollowSun0)\
**Replies:** 17\
**Last updated:** [January 23, 2020, 4:25pm UTC](https://forum.mmgtools.org/t/parallel-version-of-mmg2d-mmgs/371 "2020-01-23T16:25:40Z")

</div>

Hi Algiane, On February 25th, you have mentioned that there were no plans to parallelize MMG2D (https://forum.mmgtools.org/t/parallel-version-of-mmg/296). Is it still the case? Does that statement also apply to MMGS? T…

---

## [Undefined references when targeting libmmg.so](https://forum.mmgtools.org/t/undefined-references-when-targeting-libmmg-so/405)

<div class="topic-metadata">

**Author:** [@michal.wozniak](https://forum.mmgtools.org/u/michal.wozniak)\
**Replies:** 3\
**Last updated:** [January 9, 2020, 4:23pm UTC](https://forum.mmgtools.org/t/undefined-references-when-targeting-libmmg-so/405 "2020-01-09T16:23:46Z")

</div>

Hi, I am using mmg without any problem on windows. This week I am compiling our software using clang 6.0 on ubuntu but I am getting multiple undefined references //usr/local/lib/libmmg.so.5: undefined reference to \`MM…

---

## [Localized Remesh](https://forum.mmgtools.org/t/localized-remesh/343)

<div class="topic-metadata">

**Author:** [@HollowSun0](https://forum.mmgtools.org/u/HollowSun0)\
**Replies:** 10\
**Last updated:** [July 22, 2019, 8:32am UTC](https://forum.mmgtools.org/t/localized-remesh/343 "2019-07-22T08:32:43Z")

</div>

Greetings, In MMGS, is there a way to remesh a subset of the entire mesh using, for example, a mask array? Thank you, Patrick

---

## [Id of a node in a edge equal to 0](https://forum.mmgtools.org/t/id-of-a-node-in-a-edge-equal-to-0/103)

<div class="topic-metadata">

**Author:** [@loumalouomega](https://forum.mmgtools.org/u/loumalouomega)\
**Replies:** 11\
**Last updated:** [February 14, 2019, 9:54am UTC](https://forum.mmgtools.org/t/id-of-a-node-in-a-edge-equal-to-0/103 "2019-02-14T09:54:18Z")

</div>

Hi, I am using right now the library of MMG2D, and I am sometimes getting with the API the Ids of edges equal to 0, but if I understood correctly the Ids start in 1. not 0. My code is basically: int edge0…

---

## [Windows compilation succed with VisualStudio](https://forum.mmgtools.org/t/windows-compilation-succed-with-visualstudio/184)

<div class="topic-metadata">

**Author:** [@loumalouomega](https://forum.mmgtools.org/u/loumalouomega)\
**Replies:** 11\
**Last updated:** [October 11, 2018, 9:55am UTC](https://forum.mmgtools.org/t/windows-compilation-succed-with-visualstudio/184 "2018-10-11T09:55:33Z")

</div>

Hi, I succed compiling MMG using CMake and VisualStudio. I have prepare a fork https://github.com/loumalouomega/mmg ready to merge. The things added by the fork are: \[imagen\] Adding configure scripts, both Unix and W…

---

## [Multiple definition error linking](https://forum.mmgtools.org/t/multiple-definition-error-linking/200)

<div class="topic-metadata">

**Author:** [@Oana](https://forum.mmgtools.org/u/Oana)\
**Replies:** 3\
**Last updated:** [June 1, 2018, 7:49am UTC](https://forum.mmgtools.org/t/multiple-definition-error-linking/200 "2018-06-01T07:49:30Z")

</div>

Hello, I am a new user of MMG3D and I would like to ask for your help solving a linking error. I downloaded and compile the latest version from https://github.com/MmgTools/mmg.git. I have no problems running the exampl…

---

## [Generated files in the source directory and in the repository](https://forum.mmgtools.org/t/generated-files-in-the-source-directory-and-in-the-repository/105)

<div class="topic-metadata">

**Author:** [@felipe](https://forum.mmgtools.org/u/felipe)\
**Replies:** 3\
**Last updated:** [October 10, 2017, 1:59pm UTC](https://forum.mmgtools.org/t/generated-files-in-the-source-directory-and-in-the-repository/105 "2017-10-10T13:59:12Z")

</div>

Hi, Why the generated files (lbmmgtypesf.h for example) are written in the source directory, and why theses files are in the repository (git)? Normally, when using CMake the source directory must stay clean, and all …

---

## [Unexpected error in some models of AMD and Intel i7](https://forum.mmgtools.org/t/unexpected-error-in-some-models-of-amd-and-intel-i7/112)

<div class="topic-metadata">

**Author:** [@loumalouomega](https://forum.mmgtools.org/u/loumalouomega)\
**Replies:** 12\
**Last updated:** [February 27, 2017, 8:26am UTC](https://forum.mmgtools.org/t/unexpected-error-in-some-models-of-amd-and-intel-i7/112 "2017-02-27T08:26:20Z")

</div>

We are having some problems after compiling successfully the MMG library in some AMD processors ( and at least in one model of Intel i7), when trying to run some 3D examples with the MM3D we get an "Unexpected error", we…

---

## [Debian\_\_package](https://forum.mmgtools.org/t/debian--package/50)

<div class="topic-metadata">

**Author:** [@mycae](https://forum.mmgtools.org/u/mycae)\
**Replies:** 1\
**Last updated:** [August 22, 2016, 7:00am UTC](https://forum.mmgtools.org/t/debian--package/50 "2016-08-22T07:00:47Z")

</div>

Hi, I do some packaging work for debian-science, and very occasionally for fedora. I just came across your library, which looks like it does some things that I have needed in the past. Are you planning to make a Debi…

---

## [Use of exit() in code](https://forum.mmgtools.org/t/use-of-exit-in-code/35)

<div class="topic-metadata">

**Author:** [@updega2](https://forum.mmgtools.org/u/updega2)\
**Replies:** 2\
**Last updated:** [May 3, 2016, 4:39pm UTC](https://forum.mmgtools.org/t/use-of-exit-in-code/35 "2016-05-03T16:39:54Z")

</div>

To the developers of mmg plan to continue using exit() in the code? It makes it hard for people who plan on using mmg inside another application because this causes the overall application to exit anytime there is an exi…
