49#include "mmg/mmg3d/libmmg3d.h"
51int main(
int argc,
char *argv[]) {
55 char *inname, *outname;
57 fprintf(stdout,
" -- TEST MMG3DMOV \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]);
138 fprintf(stdout,
"BAD ENDING OF MMG3DMOV: UNABLE TO SAVE MESH\n");
141 fprintf(stdout,
"BAD ENDING OF MMG3DMOV\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_mmg3dmov(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
Main program for the rigid-body movement library.
#define MMG5_STRONGFAILURE