Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions
main.c File Reference
#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/libmmg.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Example of use of the mmg library that gathers the mmg2d, mmgs and mmg3d libraries (basic use of mesh adaptation).

Author
Charles Dapogny (LJLL, UPMC)
Cécile Dobrzynski (Inria / IMB, Université de Bordeaux)
Pascal Frey (LJLL, UPMC)
Algiane Froehly (Inria / IMB, Université de Bordeaux)
Version
5

================== 2d remeshing using the mmg2d library ==========

---------------------------— STEP I -----------------------—

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 MMG2D_Set* functions

with MMG2D_loadMesh function

3) Build sol in MMG5 format

Two solutions: just use the MMG2D_loadSol function that will read a .sol(b) file formatted or manually set your sol using the MMG2D_Set* functions

---------------------------— STEP II -----------------------—

remesh function

---------------------------— STEP III -----------------------—

get results

Two solutions: just use the MMG2D_saveMesh/MMG2D_saveSol functions that will write .mesh(b)/.sol formatted files or manually get your mesh/sol using the MMG2D_getMesh/MMG2D_getSol functions

1) Automatically save the mesh

2) Free the MMG2D structures

================ surface remeshing using the mmgs library ========

---------------------------— 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

function calling

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

---------------------------— 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

================== 3d remeshing using the mmg3d library ==========

---------------------------— STEP I -----------------------—

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

---------------------------— STEP II -----------------------—

remesh function

---------------------------— STEP III -----------------------—

get results

Two solutions: just use the MMG3D_saveMesh/MMG3D_saveSol functions that will write .mesh(b)/.sol formatted files or manually get your mesh/sol using the MMG3D_getMesh/MMG3D_getSol functions

1) Automatically save the mesh

2) Automatically save the solution

3) Free the MMG3D structures

Definition at line 51 of file main.c.

Here is the call graph for this function: