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 to load an save files whose format is detected using the extension), get the mesh from Mmg to store it into user data structures and get the adjacency relationship between tetra.
---------------------------— STEP I -----------------------—
1) Initialisation of mesh structure of Mmg
2) Mesh loading depending on detected extension
3) Get the mesh from Mmg data structure into local data structure
a) get the size of the mesh: np = #vertices, ne = #tetra, npr = #prisms, nt = #triangles, nq = #quadrangls, na = #edges
b) get point coordinates and references: i^th point coordinates are stored in points[3*(i-1)]@3. Reference of this point is in ref[i-1]
c) get tetra and tetra references: i^th tetra vertices are stored in tetra[4*(i-1)]@4. Reference of this tetra is in tetref[i-1]
... etc...
4) Mesh saving at Medit format to check it
5) get and print tetra adjacencies in terminal
6) Save output file depending on the detected extension
7) Free the MMG3D5 structures
Definition at line 52 of file genericIO.c.