Hello! I use mmgs to solve strength problems. I need to refine the mesh in the high stress zone. Can I apply the size map to only some nodes? At the same time, let mmgs find the metric in other nodes according to -hgrad and -hausd parameters.
Hello,
It is not possible to do that natively but using the library you can :
- call the `MMG_doSol function to let Mmg compute the size map;
- travel your vertices to overwrite the value setted by Mmg at wanted nodes (using the
MMG<X>_Set_scalarSol
API function). - call the
MMG<X>_mmg<x>lib
function to trigger the mesh adaptation process.
Best regards,
Algiane
Thank you for the quick response! Is it possible to do the same thing by running mmgs_O3.exe with command line parameters?
No, it is not possible using command line, sorry.
What if do this:
- Fix the mesh vertices before rebuilding the mesh in mmgs
- Run mmgs and get sol file with fixed vertices
- Find old fixed vertices by coordinates in the sol file
- Change the metric for given vertices
Is it possible to fix vertices in a mesh file? Like “RequiredTriangles” for example.
Hi,
You can use the RequiredVertices
keyword to fix vertices.
Beside, I am not sure if it is needed to fix it : you can run mmgs without authorizing the remeshing operators (only analysis and size map computation is performed) with -noinsert -noswap -nomove
command line arguments. So I think that your process can be changed by:
- Run mmgs in analysis mode :
mmgs -noinsert -noswap -nomove ...
- Change the output metric in the saved
.sol
file for given vertices.
I hope that it will help,
Regards,
Algiane
Thank you! It really helped.