48#include "mmg/mmg3d/libmmg3d.h"
50int main(
int argc,
char *argv[]) {
54 char *inname,*lsname,*outname;
56 fprintf(stdout,
" -- TEST MMG3DLS \n");
59 printf(
" Usage: %s meshfile lsfile meshout\n",argv[0]);
64 inname = (
char *) calloc(strlen(argv[1]) + 1,
sizeof(char));
65 if ( inname == NULL ) {
66 perror(
" ## Memory problem: calloc");
69 strcpy(inname,argv[1]);
71 lsname = (
char *) calloc(strlen(argv[2]) + 1,
sizeof(char));
72 if ( lsname == NULL ) {
73 perror(
" ## Memory problem: calloc");
76 strcpy(lsname,argv[2]);
79 outname = (
char *) calloc(strlen(argv[3]) + 1,
sizeof(char));
80 if ( outname == NULL ) {
81 perror(
" ## Memory problem: calloc");
84 strcpy(outname,argv[3]);
135 fprintf(stdout,
"BAD ENDING OF MMG3DLS: UNABLE TO SAVE MESH\n");
138 fprintf(stdout,
"BAD ENDING OF MMG3DLS\n");
int MMG3D_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
int MMG3D_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the number of given entities match with mesh and sol size.
int MMG3D_Free_all(const int starter,...)
Deallocations before return.
int MMG3D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
set an integer parameter of the remesher
program main
Example for using mmglib (basic use)
int MMG3D_saveMesh(MMG5_pMesh mesh, const char *filename)
Save a mesh in .mesh/.meshb format.
int MMG3D_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Load a metric field (or other solution).
int MMG3D_loadMesh(MMG5_pMesh mesh, const char *filename)
Load a mesh (in .mesh/.mesb format) from file.
int MMG3D_mmg3dls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol umet)
Main "program" for the level-set discretization library.
#define MMG5_STRONGFAILURE