![]() |
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/mmgs/libmmgs.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 mmgs library (basic use of mesh adaptation)
---------------------------— STEP I -----------------------—
1) Initialisation of mesh and sol structures
2) Build mesh in MMG5 format
Two solutions: just use the MMGS_loadMesh function that will read a .mesh(b) file formatted or manually set your mesh using the MMGS_Set* functions
with MMGS_loadMesh function
3) Build sol in MMG5 format
Two solutions: just use the MMGS_loadSol function that will read a .sol(b) file formatted or manually set your sol using the MMGS_Set* functions
With MMGS_loadSol function
4) (not mandatory): check if the number of given entities match with mesh size
---------------------------— STEP II -----------------------—
remesh function
---------------------------— STEP III -----------------------—
get results
Two solutions: just use the MMGS_saveMesh/MMGS_saveSol functions that will write .mesh(b)/.sol formatted files or manually get your mesh/sol using the MMGS_getMesh/MMGS_getSol functions
1) Automatically save the mesh
2) Automatically save the solution
3) Free the MMGS structures
Definition at line 50 of file main.c.
