For SALOMEs SMESH module -- which provides an open-source meshing framework for numerical simulations -- the integration of mesh adaptation capabilities is paramount to enhancing its usability and effectiveness. This mmgplugin, leveraging the powerful MMG library, brings advanced mesh adaptation cpabilities to SALOME's SMESH module. By seamlessly integrating MMG's robust mesh adaptation algorithms into SALOME, users gain access to state-of-the-art techniques for mesh optimization and refinement. This integration should empower engineers, scientists, and researchers to tackle increasingly complex simulation challenges with confidence, knowing that they have the tools necessary to generate high-quality meshes tailored to their specific needs.
To try the plugin locally, follow these steps:
-
Open the file located at
$SMESH_ROOT_DIR/share/salome/plugins/smesh/smesh_plugins.py
. -
Add the following code to the end of the file:
try:
from mmgplugin.mmgPlug_plugin import Mmg
salome_pluginsmanager.AddFunction('ReMesh with MMG', 'Run MMG', Mmg)
except Exception as e:
salome_pluginsmanager.logger.info('ERROR: MMG plug-in is unavailable: {}'.format(e))
pass
- Compilation
cd $SMESH_ROOT_DIR/share/salome/plugins/smesh/mmgplugin
make
- Dependencies:
$SALOME_ROOT_DIR/salome context
pip install meshio
cd $SALOME_ROOT_DIR/BINARIES[...]
wget https://github.com/MmgTools/mmg/releases/download/v5.6.0/mmg-5.6.0-Linux-4.4.0-170-generic-appli.tar.gz
tar -xvf mmg-5.6.0-Linux-4.4.0-170-generic-appli.tar.gz
mv bin mmg
export PATH=$PWD/mmg:$PATH
You can test if mmg is correctly installed by running mmgs_O3 -h
- run the command 'make' (this generates the ui python file)
- start salome
- find the plugin with the other SMESH plugins