15#include "mmg/mmg3d/libmmg3df.h"
17 mmg5_data_ptr_t :: mmgmesh
18 mmg5_data_ptr_t :: mmgsol
20 CHARACTER(len=300) :: exec_name,filename,fileout
22 WRITE(*,*)
" -- TEST MMG3DLIB"
24 argc = command_argument_count();
25 CALL get_command_argument(0, exec_name)
28 print*,
" Usage: ",trim(exec_name),
" input_file_name output_filename"
33 CALL get_command_argument(1, filename)
34 CALL get_command_argument(2, fileout)
48 CALL mmg3d_init_mesh(mmg5_arg_start, &
49 mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
57 CALL mmg3d_loadmesh(mmgmesh,trim(adjustl(filename)),&
58 len(trim(adjustl(filename))),ier)
59 IF ( ier == 0 )
CALL exit(102)
66 CALL mmg3d_loadsol(mmgmesh,mmgsol,trim(adjustl(filename)),&
67 len(trim(adjustl(filename))),ier)
73 CALL mmg3d_chk_meshdata(mmgmesh,mmgsol,ier)
74 IF ( ier /= 1 )
CALL exit(105)
78 CALL mmg3d_mmg3dlib(mmgmesh,mmgsol,ier)
80 IF ( ier == mmg5_strongfailure )
THEN
81 print*,
"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH"
83 ELSE IF ( ier == mmg5_lowfailure )
THEN
84 print*,
"BAD ENDING OF MMG3DLIB"
94 CALL mmg3d_savemesh(mmgmesh,trim(adjustl(fileout)),&
95 len(trim(adjustl(fileout))),ier)
101 CALL mmg3d_savesol(mmgmesh,mmgsol,trim(adjustl(fileout)),&
102 len(trim(adjustl(fileout))),ier)
108 CALL mmg3d_free_all(mmg5_arg_start, &
109 mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
int main(int argc, char *argv[])