Hi all,
I am new to MMG and I am trying to use mmg3d v5.4.0 to perform a lagrangian movement.
So far I am only running the tests that I have found:
- in the example folder @ libexamples/mmg3d/LagrangianMotion_example0 (tinyBoxt.mesh and tinyBoxt.sol)
- in the user guide page 13 (testoption9.mesh and depoption9.sol)
The test with testoption9.mesh ran fine.
However, I add some trouble when running the example with tinyBoxt.mesh.
What happens it that it returns the error message below because there is no point to move.
## Error: MMG5_packLS: no triangle with reference 10 in the mesh.
Nothing to move.
I think it happens because there is no boundary Id 10 in tinyBoxt.mesh.
For the testoption9.mesh test it works fine because there is a boundary Id 10.
From what I understand, we check that the faces are on the boundary and that it is the boundary Id we want to move.
This is happening several times in src/mmg3d/velextls_3d.c in function MMG5_packLS
:
/* Step 1: pile all the tetras containing a triangle with ref DISPREF */
…
if ( (pxt->ftag[i] & MG_BDY) && (pxt->ref[i] == MMG5_DISPREF) ) {
…
And the boundary Id is set to 10 in src/common/mmgcommon.h.in
#define MMG5_DISPREF 10
If I remove the boundary Id check, this is every (pxt->ref[i] == MMG5_DISPREF)
check in the MMG5_packLS
function, then it works fine for both tests.
Therefore I would like to know if it is safe to remove the boundary Id check and set the gradient to {0,0,0} for the vertices of the boundaries we do not want to move?
Also is there another document that I can read to better understand the lagragian deformation process?
Thanks for your help,