Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
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/mmgs/libmmgs.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 mmgsls function of the mmgs library: here the user provide a level-set and a metric on which he want to adapt the final mesh

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

1) Initialisation of mesh and sol structures

----------------— Level set discretization option ------------------—

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 solution and metric 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

load the level-set with MMGS_loadMesh function

----------------— Give the Metric to Mmg ---------------------------—

a) give info for the metric: the metric is applied on vertex entities, number of vertices np is recoverd using get_meshSize and the sol is tensorial

b) give metric values and positions

4) (not mandatory): check if the number of given entities match with mesh size

----------------— level set discretization ------------------------—

isovalue discretization followed by an adaptation step over the input Metric mmgMet. The mmgMet structure is updated so at the end it contains the output metric of Mmg.

Definition at line 50 of file main.c.

Here is the call graph for this function: