Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
adaptation_example2 Directory Reference
Directory dependency graph for adaptation_example2:
libexamples/mmg3d/adaptation_example2

Files

 main.c
 

Detailed Description

I/ Implementation

We read the mesh and solution in files.

II/ Compilation

  1. Build and install the mmg3d shared and static library. We suppose in the following that you have installed the mmg3d library in the **_$CMAKE_INSTALL_PREFIX_** directory (see the installation section of the setup guide);
  2. compile the main.c file specifying:
    • the mmg3d include directory with the -I option;
    • the mmg3d library location with the -L option;
    • the mmg3d library name with the -l option;
    • for the static library you must also link the executable with, if used for the mmg3d library compilation, the scotch and scotcherr libraries and with the math library;
    • with the shared library, you must add the ***_$CMAKE_INSTALL_PREFIX_** directory to your LD_LIBRARY_PATH.

Example 1
Command line to link the application with the mmg3d static library (we supposed here that the scotch library is installed in the **_$SCOTCH_PATH_** directory):

gcc -I$CMAKE_INSTALL_PREFIX/include/mmg/mmg3d main.c -L$CMAKE_INSTALL_PREFIX/lib -L$SCOTCH_PATH -lmmg3d -lscotch -lscotcherr -lm

Example 2
Command line to link the application with the mmg3d shared library:

gcc -I$CMAKE_INSTALL_PREFIX/include/mmg/mmg3d main.c -L$CMAKE_INSTALL_PREFIX/lib -lmmg3d
export LD_LIBRARY_PATH=$CMAKE_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH