49#include "mmg/mmgs/libmmgs.h"
51int main(
int argc,
char *argv[]) {
55 char *inname,*outname;
57 fprintf(stdout,
" -- TEST MMGSLS \n");
60 printf(
" Usage: %s filein fileout \n",argv[0]);
65 inname = (
char *) calloc(strlen(argv[1]) + 1,
sizeof(
char));
66 if ( inname == NULL ) {
67 perror(
" ## Memory problem: calloc");
70 strcpy(inname,argv[1]);
72 outname = (
char *) calloc(strlen(argv[2]) + 1,
sizeof(
char));
73 if ( outname == NULL ) {
74 perror(
" ## Memory problem: calloc");
77 strcpy(outname,argv[2]);
134 fprintf(stdout,
"BAD ENDING OF MMGSLS: UNABLE TO SAVE MESH\n");
137 fprintf(stdout,
"BAD ENDING OF MMGSLS\n");
int MMGS_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
set an integer parameter of the remesher
int MMGS_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
int MMGS_Free_all(const int starter,...)
Deallocations before return.
int MMGS_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the numbers of given entities match with mesh and solution size and check mesh data.
program main
Example for using mmglib (basic use)
int MMGS_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Load a metric field (or other solution) in medit's .sol format.
int MMGS_saveMesh(MMG5_pMesh mesh, const char *filename)
Save a mesh in .mesh or .meshb format.
int MMGS_saveSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Write an isotropic or anisotropic metric in medit file format.
int MMGS_loadMesh(MMG5_pMesh mesh, const char *filename)
Load a mesh (in .mesh/.mesb format) from file.
int MMGS_mmgsls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol umet)
Main "program" for level-set discretization.
#define MMG5_STRONGFAILURE