![]() |
Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <signal.h>#include <string.h>#include <ctype.h>#include <math.h>#include <float.h>#include "mmg/mmg3d/libmmg3d.h"
Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
| int main | ( | int | argc, |
| char * | argv[] ) |
Example of use of the mmg3d library (advanced use of mesh adaptation)
1) Initialisation of mesh and sol structures
2) Build mesh in MMG5 format
Two solutions: just use the MMG3D_loadMesh function that will read a .mesh(b) file formatted or manually set your mesh using the MMG3D_Set* functions
with MMG3D_loadMesh function
3) Build sol in MMG5 format
Two solutions: just use the MMG3D_loadSol function that will read a .sol(b) file formatted or manually set your sol using the MMG3D_Set* functions
With MMG3D_loadSol function
4) (not mandatory): check if the number of given entities match with mesh size
5) (not mandatory): set your global parameters using the MMG3D_Set_iparameter and MMG3D_Set_dparameter function (resp. for integer parameters and double param)
----------------— First wave of refinment------------------—
remesh function
----------------— Second wave of refinment------------------—
6) (not mandatory): set your local parameters
for each local parameter: give the type and reference of the element on which you will apply a particular hausdorff number and the hausdorff number to apply. The global hausdorff number is applied on all boundary triangles without local hausdorff number
remesh function
----------------— Last wave of refinment------------------—
remesh function
Definition at line 50 of file main.c.
