Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Macros | Enumerations | Functions | Variables
libmmg3d.h File Reference

API headers for the mmg3d library. More...

#include "mmg/mmg3d/libmmgtypes.h"
Include dependency graph for libmmg3d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MMG3D_LMAX   10240
 

Enumerations

enum  MMG3D_Param {
  MMG3D_IPARAM_verbose, MMG3D_IPARAM_mem, MMG3D_IPARAM_debug, MMG3D_IPARAM_angle,
  MMG3D_IPARAM_iso, MMG3D_IPARAM_nofem, MMG3D_IPARAM_opnbdy, MMG3D_IPARAM_lag,
  MMG3D_IPARAM_optim, MMG3D_IPARAM_optimLES, MMG3D_IPARAM_noinsert, MMG3D_IPARAM_noswap,
  MMG3D_IPARAM_nomove, MMG3D_IPARAM_nosurf, MMG3D_IPARAM_nreg, MMG3D_IPARAM_numberOfLocalParam,
  MMG3D_IPARAM_numberOfLSBaseReferences, MMG3D_IPARAM_numberOfMat, MMG3D_IPARAM_numsubdomain, MMG3D_IPARAM_renum,
  MMG3D_IPARAM_anisosize, MMG3D_IPARAM_octree, MMG3D_IPARAM_nosizreq, MMG3D_DPARAM_angleDetection,
  MMG3D_DPARAM_hmin, MMG3D_DPARAM_hmax, MMG3D_DPARAM_hsiz, MMG3D_DPARAM_hausd,
  MMG3D_DPARAM_hgrad, MMG3D_DPARAM_hgradreq, MMG3D_DPARAM_ls, MMG3D_DPARAM_rmc,
  MMG3D_PARAM_size
}
 Input parameters for mmg library. More...
 

Functions

int MMG3D_Init_mesh (const int starter,...)
 
void MMG3D_Init_fileNames (MMG5_pMesh mesh, MMG5_pSol sol)
 
void MMG3D_Init_parameters (MMG5_pMesh mesh)
 
int MMG3D_Set_inputMeshName (MMG5_pMesh mesh, const char *meshin)
 
int MMG3D_Set_outputMeshName (MMG5_pMesh mesh, const char *meshout)
 
int MMG3D_Set_inputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
 
int MMG3D_Set_outputSolName (MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
 
int MMG3D_Set_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, int np, int typSol)
 
int MMG3D_Set_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, int nentities, int *typSol)
 
int MMG3D_Set_meshSize (MMG5_pMesh mesh, int np, int ne, int nprism, int nt, int nquad, int na)
 
int MMG3D_Set_vertex (MMG5_pMesh mesh, double c0, double c1, double c2, int ref, int pos)
 
int MMG3D_Set_vertices (MMG5_pMesh mesh, double *vertices, int *refs)
 
int MMG3D_Set_tetrahedron (MMG5_pMesh mesh, int v0, int v1, int v2, int v3, int ref, int pos)
 
int MMG3D_Set_tetrahedra (MMG5_pMesh mesh, int *tetra, int *refs)
 
int MMG3D_Set_prism (MMG5_pMesh mesh, int v0, int v1, int v2, int v3, int v4, int v5, int ref, int pos)
 
int MMG3D_Set_prisms (MMG5_pMesh mesh, int *prisms, int *refs)
 
int MMG3D_Set_triangle (MMG5_pMesh mesh, int v0, int v1, int v2, int ref, int pos)
 
int MMG3D_Set_triangles (MMG5_pMesh mesh, int *tria, int *refs)
 
int MMG3D_Set_quadrilateral (MMG5_pMesh mesh, int v0, int v1, int v2, int v3, int ref, int pos)
 
int MMG3D_Set_quadrilaterals (MMG5_pMesh mesh, int *quads, int *refs)
 
int MMG3D_Set_edge (MMG5_pMesh mesh, int v0, int v1, int ref, int pos)
 
int MMG3D_Set_corner (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_corner (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_requiredVertex (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_requiredVertex (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_requiredTetrahedron (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_requiredTetrahedron (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_requiredTetrahedra (MMG5_pMesh mesh, int *reqIdx, int nreq)
 
int MMG3D_Unset_requiredTetrahedra (MMG5_pMesh mesh, int *reqIdx, int nreq)
 
int MMG3D_Set_requiredTriangle (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_requiredTriangle (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_requiredTriangles (MMG5_pMesh mesh, int *reqIdx, int nreq)
 
int MMG3D_Unset_requiredTriangles (MMG5_pMesh mesh, int *reqIdx, int nreq)
 
int MMG3D_Set_parallelTriangle (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_parallelTriangle (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_parallelTriangles (MMG5_pMesh mesh, int *parIdx, int npar)
 
int MMG3D_Unset_parallelTriangles (MMG5_pMesh mesh, int *parIdx, int npar)
 
int MMG3D_Set_ridge (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_ridge (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_requiredEdge (MMG5_pMesh mesh, int k)
 
int MMG3D_Unset_requiredEdge (MMG5_pMesh mesh, int k)
 
int MMG3D_Set_normalAtVertex (MMG5_pMesh mesh, int k, double n0, double n1, double n2)
 
int MMG3D_Set_scalarSol (MMG5_pSol met, double s, int pos)
 
int MMG3D_Set_scalarSols (MMG5_pSol met, double *s)
 
int MMG3D_Set_vectorSol (MMG5_pSol met, double vx, double vy, double vz, int pos)
 
int MMG3D_Set_vectorSols (MMG5_pSol met, double *sols)
 
int MMG3D_Set_tensorSol (MMG5_pSol met, double m11, double m12, double m13, double m22, double m23, double m33, int pos)
 
int MMG3D_Set_tensorSols (MMG5_pSol met, double *sols)
 
int MMG3D_Set_ithSol_inSolsAtVertices (MMG5_pSol sol, int i, double *s, int pos)
 
int MMG3D_Set_ithSols_inSolsAtVertices (MMG5_pSol sol, int i, double *s)
 
void MMG3D_Set_handGivenMesh (MMG5_pMesh mesh)
 
int MMG3D_Chk_meshData (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_Set_iparameter (MMG5_pMesh mesh, MMG5_pSol sol, int iparam, int val)
 
int MMG3D_Set_dparameter (MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
 
int MMG3D_Set_localParameter (MMG5_pMesh mesh, MMG5_pSol sol, int typ, int ref, double hmin, double hmax, double hausd)
 
int MMG3D_Set_multiMat (MMG5_pMesh mesh, MMG5_pSol sol, int ref, int split, int rin, int rex)
 
int MMG3D_Get_meshSize (MMG5_pMesh mesh, int *np, int *ne, int *nprism, int *nt, int *nquad, int *na)
 
int MMG3D_Get_solSize (MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, int *np, int *typSol)
 
int MMG3D_Get_solsAtVerticesSize (MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, int *nentities, int *typSol)
 
int MMG3D_Get_vertex (MMG5_pMesh mesh, double *c0, double *c1, double *c2, int *ref, int *isCorner, int *isRequired)
 
int MMG3D_GetByIdx_vertex (MMG5_pMesh mesh, double *c0, double *c1, double *c2, int *ref, int *isCorner, int *isRequired, int idx)
 
int MMG3D_Get_vertices (MMG5_pMesh mesh, double *vertices, int *refs, int *areCorners, int *areRequired)
 
int MMG3D_Get_tetrahedron (MMG5_pMesh mesh, int *v0, int *v1, int *v2, int *v3, int *ref, int *isRequired)
 
int MMG3D_Get_tetrahedra (MMG5_pMesh mesh, int *tetra, int *refs, int *areRequired)
 
int MMG3D_Get_prism (MMG5_pMesh mesh, int *v0, int *v1, int *v2, int *v3, int *v4, int *v5, int *ref, int *isRequired)
 
int MMG3D_Get_prisms (MMG5_pMesh mesh, int *prisms, int *refs, int *areRequired)
 
int MMG3D_Get_triangle (MMG5_pMesh mesh, int *v0, int *v1, int *v2, int *ref, int *isRequired)
 
int MMG3D_Get_triangles (MMG5_pMesh mesh, int *tria, int *refs, int *areRequired)
 
int MMG3D_Get_quadrilateral (MMG5_pMesh mesh, int *v0, int *v1, int *v2, int *v3, int *ref, int *isRequired)
 
int MMG3D_Get_quadrilaterals (MMG5_pMesh mesh, int *quads, int *refs, int *areRequired)
 
int MMG3D_Get_edge (MMG5_pMesh mesh, int *e0, int *e1, int *ref, int *isRidge, int *isRequired)
 
int MMG3D_Set_edges (MMG5_pMesh mesh, int *edges, int *refs)
 
int MMG3D_Get_edges (MMG5_pMesh mesh, int *edges, int *refs, int *areRidges, int *areRequired)
 
int MMG3D_Get_normalAtVertex (MMG5_pMesh mesh, int k, double *n0, double *n1, double *n2)
 
double MMG3D_Get_tetrahedronQuality (MMG5_pMesh mesh, MMG5_pSol met, int k)
 
int MMG3D_Get_scalarSol (MMG5_pSol met, double *s)
 
int MMG3D_Get_scalarSols (MMG5_pSol met, double *s)
 
int MMG3D_Get_vectorSol (MMG5_pSol met, double *vx, double *vy, double *vz)
 
int MMG3D_Get_vectorSols (MMG5_pSol met, double *sols)
 
int MMG3D_Get_tensorSol (MMG5_pSol met, double *m11, double *m12, double *m13, double *m22, double *m23, double *m33)
 
int MMG3D_Get_tensorSols (MMG5_pSol met, double *sols)
 
int MMG3D_Get_ithSol_inSolsAtVertices (MMG5_pSol sol, int i, double *s, int pos)
 
int MMG3D_Get_ithSols_inSolsAtVertices (MMG5_pSol sol, int i, double *s)
 
int MMG3D_Get_iparameter (MMG5_pMesh mesh, int iparam)
 
int MMG3D_Add_tetrahedron (MMG5_pMesh mesh, int v0, int v1, int v2, int v3, int ref)
 
int MMG3D_Add_vertex (MMG5_pMesh mesh, double c0, double c1, double c2, int ref)
 
int MMG3D_loadMesh (MMG5_pMesh mesh, const char *filename)
 
int MMG3D_loadMshMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_loadVtuMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_loadVtuMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_loadVtkMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_loadVtkMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_loadMshMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_loadGenericMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_saveMesh (MMG5_pMesh mesh, const char *filename)
 
int MMG3D_saveMshMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_saveMshMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_saveVtkMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_saveVtkMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_saveVtuMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_saveVtuMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_saveTetgenMesh (MMG5_pMesh, const char *)
 
int MMG3D_saveGenericMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMG3D_loadSol (MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
 
int MMG3D_loadAllSols (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_saveSol (MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
 
int MMG3D_saveAllSols (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMG3D_Free_allSols (MMG5_pMesh mesh, MMG5_pSol *sol)
 
int MMG3D_Free_all (const int starter,...)
 
int MMG3D_Free_structures (const int starter,...)
 
int MMG3D_Free_names (const int starter,...)
 
int MMG3D_mmg3dlib (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_mmg3dls (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
 
int MMG3D_mmg3dmov (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
 
int MMG3D_defaultValues (MMG5_pMesh mesh)
 
int MMG3D_parsar (int argc, char *argv[], MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
 
int MMG3D_parsop (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_usage (char *prog)
 
int MMG3D_stockOptions (MMG5_pMesh mesh, MMG5_Info *info)
 
void MMG3D_destockOptions (MMG5_pMesh mesh, MMG5_Info *info)
 
int MMG3D_mmg3dcheck (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, double critmin, double lmin, double lmax, int *eltab, int8_t metRidTyp)
 
void MMG3D_searchqua (MMG5_pMesh mesh, MMG5_pSol met, double critmin, int *eltab, int8_t metRidTyp)
 
int MMG3D_searchlen (MMG5_pMesh mesh, MMG5_pSol met, double lmin, double lmax, int *eltab, int8_t metRidTyp)
 
int MMG3D_Get_adjaTet (MMG5_pMesh mesh, int kel, int listet[4])
 Return adjacent elements of a tetrahedron. More...
 
int MMG3D_hashTetra (MMG5_pMesh mesh, int pack)
 
int MMG3D_doSol (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_Set_constantSize (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_switch_metricStorage (MMG5_pMesh mesh, MMG5_pSol met)
 
void MMG3D_setfunc (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_Get_numberOfNonBdyTriangles (MMG5_pMesh mesh, int *nb_tria)
 
int MMG3D_Get_nonBdyTriangle (MMG5_pMesh mesh, int *v0, int *v1, int *v2, int *ref, int idx)
 
int MMG3D_Get_tetFromTria (MMG5_pMesh mesh, int ktri, int *ktet, int *iface)
 
int MMG3D_Get_tetsFromTria (MMG5_pMesh mesh, int ktri, int ktet[2], int iface[2])
 
int MMG3D_Compute_eigenv (double m[6], double lambda[3], double vp[3][3])
 
void MMG3D_Free_solutions (MMG5_pMesh mesh, MMG5_pSol sol)
 

Variables

double(* MMG3D_lenedgCoor )(double *ca, double *cb, double *sa, double *sb)
 

Detailed Description

API headers for the mmg3d library.

Author
Algiane Froehly (Inria/UBordeaux)
Version
5
Date
01 2014
Warning
To keep the genheader working, don't break line between the enum name and the opening brace (it creates errors under windows)
Use the MMG3D_ prefix: MMG5_ prefix will became obsolete...
/* =============================================================================
** This file is part of the mmg software package for the tetrahedral
** mesh modification.
** Copyright (c) Bx INP/Inria/UBordeaux/UPMC, 2004- .
**
** mmg is free software: you can redistribute it and/or modify it
** under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** mmg is distributed in the hope that it will be useful, but WITHOUT
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
** License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License and of the GNU General Public License along with mmg (in
** files COPYING.LESSER and COPYING). If not, see
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
** use this copy of the mmg distribution only if you accept them.
** =============================================================================
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
// if the header file is in the "include" directory
// #include "libmmg3d.h"
// if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3d.h"
int main(int argc,char *argv[]) {
MMG5_pMesh mmgMesh;
MMG5_pSol mmgSol;
int ier;
char *filename, *fileout;
fprintf(stdout," -- TEST MMG3DLIB \n");
if ( argc != 3 ) {
printf(" Usage: %s filein fileout \n",argv[0]);
return(1);
}
/* Name and path of the mesh file */
filename = (char *) calloc(strlen(argv[1]) + 1, sizeof(char));
if ( filename == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(filename,argv[1]);
fileout = (char *) calloc(strlen(argv[2]) + 1, sizeof(char));
if ( fileout == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(fileout,argv[2]);
/* args of InitMesh:
* MMG5_ARG_start: we start to give the args of a variadic func
* MMG5_ARG_ppMesh: next arg will be a pointer over a MMG5_pMesh
* &mmgMesh: pointer toward your MMG5_pMesh (that store your mesh)
* MMG5_ARG_ppMet: next arg will be a pointer over a MMG5_pSol storing a metric
* &mmgSol: pointer toward your MMG5_pSol (that store your metric) */
mmgMesh = NULL;
mmgSol = NULL;
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
if ( MMG3D_loadMesh(mmgMesh,filename) != 1 ) exit(EXIT_FAILURE);
if ( MMG3D_loadSol(mmgMesh,mmgSol,filename) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Chk_meshData(mmgMesh,mmgSol) != 1 ) exit(EXIT_FAILURE);
ier = MMG3D_mmg3dlib(mmgMesh,mmgSol);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DLIB\n");
if ( MMG3D_saveMesh(mmgMesh,fileout) != 1 ) {
fprintf(stdout,"UNABLE TO SAVE MESH\n");
}
if ( MMG3D_saveSol(mmgMesh,mmgSol,fileout) != 1 ) {
fprintf(stdout,"UNABLE TO SAVE SOL\n");
return(MMG5_LOWFAILURE);
}
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
free(filename);
filename = NULL;
free(fileout);
fileout = NULL;
return(ier);
}
PROGRAM main
IMPLICIT NONE
! if the header file is in the "include" directory
! #include "libmmg3df.h"
! if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3df.h"
mmg5_data_ptr_t :: mmgmesh
mmg5_data_ptr_t :: mmgsol
INTEGER :: ier,argc
CHARACTER(len=300) :: exec_name,filename,fileout
WRITE(*,*) " -- TEST MMG3DLIB"
argc = command_argument_count();
CALL get_command_argument(0, exec_name)
IF ( argc /=2 ) THEN
print*," Usage: ",trim(exec_name)," input_file_name output_filename"
CALL exit(1);
ENDIF
! Name and path of the mesh file
CALL get_command_argument(1, filename)
CALL get_command_argument(2, fileout)
mmgmesh = 0
mmgsol = 0
CALL mmg3d_init_mesh(mmg5_arg_start, &
mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
mmg5_arg_end)
CALL mmg3d_loadmesh(mmgmesh,trim(adjustl(filename)),&
len(trim(adjustl(filename))),ier)
IF ( ier == 0 ) CALL exit(102)
CALL mmg3d_loadsol(mmgmesh,mmgsol,trim(adjustl(filename)),&
len(trim(adjustl(filename))),ier)
IF ( ier /= 1 ) THEN
CALL exit(104)
ENDIF
CALL mmg3d_chk_meshdata(mmgmesh,mmgsol,ier)
IF ( ier /= 1 ) CALL exit(105)
CALL mmg3d_mmg3dlib(mmgmesh,mmgsol,ier)
IF ( ier == mmg5_strongfailure ) THEN
print*,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH"
stop 2
ELSE IF ( ier == mmg5_lowfailure ) THEN
print*,"BAD ENDING OF MMG3DLIB"
ENDIF
CALL mmg3d_savemesh(mmgmesh,trim(adjustl(fileout)),&
len(trim(adjustl(fileout))),ier)
IF ( ier /= 1 ) THEN
CALL exit(106)
ENDIF
CALL mmg3d_savesol(mmgmesh,mmgsol,trim(adjustl(fileout)),&
len(trim(adjustl(fileout))),ier)
IF ( ier /= 1 ) THEN
CALL exit(107)
ENDIF
CALL mmg3d_free_all(mmg5_arg_start, &
mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
mmg5_arg_end)
END PROGRAM main
!!> @author
PROGRAM main
IMPLICIT NONE
! if the header file is in the "include" directory
! #include "libmmg3df.h"
! if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3df.h"
mmg5_data_ptr_t :: mmgmesh
mmg5_data_ptr_t :: mmgsol
INTEGER :: ier,k,argc
CHARACTER(len=300) :: exec_name,fileout
INTEGER :: inm=10
INTEGER :: np, ne, nt, na, nc, nr, nreq, typEntity, typSol
INTEGER :: ref, Tetra(4), Tria(3), Edge(2)
DOUBLE PRECISION :: Point(3),Sol
INTEGER, DIMENSION(:), ALLOCATABLE :: corner, required, ridge
CHARACTER(LEN=31) :: FMT="(E14.8,1X,E14.8,1X,E14.8,1X,I3)"
INTEGER,DIMENSION(2) :: ktet,iface
print*," -- TEST MMG3DLIB"
argc = command_argument_count();
CALL get_command_argument(0, exec_name)
IF ( argc /=1 ) THEN
print*," Usage: ",trim(exec_name)," output_filename"
CALL exit(1);
ENDIF
! Name and path of the mesh file
CALL get_command_argument(1, fileout)
mmgmesh = 0
mmgsol = 0
CALL mmg3d_init_mesh(mmg5_arg_start, &
mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
mmg5_arg_end)
CALL mmg3d_set_iparameter(mmgmesh,mmgsol,mmg3d_iparam_verbose,5,ier)
CALL mmg3d_set_meshsize(mmgmesh,12,12,0,20,0,0,ier)
IF ( ier /= 1 ) CALL exit(101)
CALL mmg3d_set_vertex(mmgmesh, 0.0d0, 0.0d0, 0.0d0, 0, 1,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.5d0, 0.0d0, 0.0d0, 0, 2,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.5d0, 0.0d0, 1.0d0, 0, 3,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.0d0, 0.0d0, 1.0d0, 0, 4,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.0d0, 1.0d0, 0.0d0, 0, 5,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.5d0, 1.0d0, 0.0d0, 0, 6,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.5d0, 1.0d0, 1.0d0, 0, 7,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 0.0d0, 1.0d0, 1.0d0, 0, 8,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 1.0d0, 0.0d0, 0.0d0, 0, 9,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 1.0d0, 1.0d0, 0.0d0, 0, 10,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 1.0d0, 0.0d0, 1.0d0, 0, 11,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_vertex(mmgmesh, 1.0d0, 1.0d0, 1.0d0, 0, 12,ier)
IF ( ier /= 1 ) CALL exit(102)
CALL mmg3d_set_tetrahedron(mmgmesh, 1, 4, 2, 8,1, 1,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 8, 3, 2, 7,1, 2,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 5, 2, 6, 8,1, 3,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 5, 8, 1, 2,1, 4,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 7, 2, 8, 6,1, 5,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 2, 4, 3, 8,1, 6,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 9, 2, 3, 7,2, 7,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 7, 11, 9, 12,2, 8,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 6, 9, 10, 7,2, 9,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 6, 7, 2, 9,2,10,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 12, 9, 7, 10,2,11,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_tetrahedron(mmgmesh, 9, 3, 11, 7,2,12,ier)
IF ( ier /= 1 ) CALL exit(103)
CALL mmg3d_set_triangle(mmgmesh, 1, 4, 8, 3, 1,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 1, 2, 4, 3, 2,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 8, 3, 7, 3, 3,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 5, 8, 6, 3, 4,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 5, 6, 2, 3, 5,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 5, 2, 1, 3, 6,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 5, 1, 8, 3, 7,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 7, 6, 8, 3, 8,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 4, 3, 8, 3, 9,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 2, 3, 4, 3,10,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 9, 3, 2, 4,11,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 11, 9, 12, 4,12,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 7, 11, 12, 4,13,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 6, 7, 10, 4,14,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 6, 10, 9, 4,15,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 6, 9, 2, 4,16,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 12, 10, 7, 4,17,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 12, 9, 10, 4,18,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 3, 11, 7, 4,19,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_triangle(mmgmesh, 9, 11, 3, 4,20,ier)
IF ( ier /= 1 ) CALL exit(104)
CALL mmg3d_set_solsize(mmgmesh,mmgsol,mmg5_vertex,12,mmg5_scalar,ier)
IF ( ier /= 1 ) CALL exit(105)
DO k=1,12
CALL mmg3d_set_scalarsol(mmgsol,0.5d0,k,ier)
IF ( ier /= 1 ) CALL exit(106)
ENDDO
CALL mmg3d_chk_meshdata(mmgmesh,mmgsol,ier)
IF ( ier /= 1 ) CALL exit(107)
CALL mmg3d_mmg3dlib(mmgmesh,mmgsol,ier)
IF ( ier == mmg5_strongfailure ) THEN
print*,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH"
stop mmg5_strongfailure
ELSE IF ( ier == mmg5_lowfailure ) THEN
print*,"BAD ENDING OF MMG3DLIB"
ENDIF
OPEN(unit=inm,file=trim(adjustl(fileout))//".mesh",form="formatted",status="replace")
WRITE(inm,*) "MeshVersionFormatted 2"
WRITE(inm,*) "Dimension 3"
CALL mmg3d_get_meshsize(mmgmesh,np,ne,%val(0),nt,%val(0),na,ier)
IF ( ier /= 1 ) CALL exit(108)
! Table to know if a vertex is corner
ALLOCATE(corner(np))
! Table to know if a vertex/tetra/tria/edge is required
ALLOCATE(required(max(max(np,ne),max(nt,na))))
! Table to know if a coponant is corner and/or required
ALLOCATE(ridge(na))
nreq = 0; nc = 0
WRITE(inm,*)
WRITE(inm,*) "Vertices"
WRITE(inm,*) np
DO k=1, np
CALL mmg3d_get_vertex(mmgmesh,point(1),point(2),point(3),&
ref,corner(k),required(k),ier)
IF ( ier /= 1 ) CALL exit(109)
WRITE(inm,fmt) point(1),point(2),point(3),ref
IF ( corner(k)/=0 ) nc=nc+1
IF ( required(k)/=0 ) nreq=nreq+1
ENDDO
WRITE(inm,*)
WRITE(inm,*) "Corners"
WRITE(inm,*) nc
DO k=1, np
IF ( corner(k)/=0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*)
WRITE(inm,*) "RequiredVertices"
WRITE(inm,*) nreq
DO k=1,np
IF ( required(k)/=0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*)
DEALLOCATE(corner)
nreq = 0;
WRITE(inm,*) "Triangles"
WRITE(inm,*) nt
DO k=1,nt
CALL mmg3d_get_triangle(mmgmesh,tria(1),tria(2),tria(3),ref,required(k),ier)
IF ( ier /= 1 ) CALL exit(110)
WRITE(inm,*) tria(1),tria(2),tria(3),ref
IF ( required(k)/=0 ) nreq=nreq+1;
ENDDO
WRITE(inm,*)
WRITE(inm,*) "RequiredTriangles"
WRITE(inm,*) nreq
DO k=1,nt
IF ( required(k)/=0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*)
nreq = 0;nr = 0;
WRITE(inm,*) "Edges"
WRITE(inm,*) na
DO k=1,na
CALL mmg3d_get_edge(mmgmesh,edge(1),edge(2),ref,ridge(k),required(k),ier)
IF ( ier /= 1 ) CALL exit(111)
WRITE(inm,*) edge(1),edge(2),ref
IF ( ridge(k)/=0 ) nr = nr+1
IF ( required(k)/=0 ) nreq = nreq+1
ENDDO
WRITE(inm,*)
WRITE(inm,*) "RequiredEdges"
WRITE(inm,*) nreq
DO k=1,na
IF ( required(k) /=0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*)
WRITE(inm,*) "Ridges"
WRITE(inm,*) nr
DO k=1,na
IF ( ridge(k) /=0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*)
nreq = 0;
WRITE(inm,*) "Tetrahedra"
WRITE(inm,*) ne
DO k=1,ne
CALL mmg3d_get_tetrahedron(mmgmesh,tetra(1),tetra(2),tetra(3),tetra(4),&
ref,required(k),ier)
IF ( ier /= 1 ) CALL exit(112)
WRITE(inm,*) tetra(1),tetra(2),tetra(3),tetra(4),ref
IF ( required(k) /= 0 ) nreq = nreq+1
ENDDO
WRITE(inm,*)
WRITE(inm,*) "RequiredTetrahedra"
WRITE(inm,*) nreq
DO k=1,ne
IF ( required(k) /= 0 ) WRITE(inm,*) k
ENDDO
WRITE(inm,*) "End"
CLOSE(inm)
DEALLOCATE(required)
DEALLOCATE(ridge)
OPEN(unit=inm,file=trim(adjustl(fileout))//".sol",form="formatted",status="replace")
WRITE(inm,*) "MeshVersionFormatted 2"
WRITE(inm,*) "Dimension 3"
WRITE(inm,*)
CALL mmg3d_get_solsize(mmgmesh,mmgsol,typentity,np,typsol,ier)
IF ( ier /= 1 ) CALL exit(113)
IF ( ( typentity /= mmg5_vertex ) .OR. ( typsol /= mmg5_scalar ) ) THEN
CALL exit(114);
ENDIF
WRITE(inm,*) "SolAtVertices"
WRITE(inm,*) np
WRITE(inm,*) "1 1"
WRITE(inm,*)
DO k=1,np
CALL mmg3d_get_scalarsol(mmgsol,sol,ier)
IF ( ier /= 1 ) CALL exit(115)
WRITE(inm,*) sol
ENDDO
WRITE(inm,*)
WRITE(inm,*) "End"
CLOSE(inm)
CALL mmg3d_free_all(mmg5_arg_start, &
mmg5_arg_ppmesh,mmgmesh,mmg5_arg_ppmet,mmgsol, &
mmg5_arg_end)
END PROGRAM main
/* =============================================================================
** This file is part of the mmg software package for the tetrahedral
** mesh modification.
** Copyright (c) Bx INP/Inria/UBordeaux/UPMC, 2004- .
**
** mmg is free software: you can redistribute it and/or modify it
** under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** mmg is distributed in the hope that it will be useful, but WITHOUT
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
** License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License and of the GNU General Public License along with mmg (in
** files COPYING.LESSER and COPYING). If not, see
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
** use this copy of the mmg distribution only if you accept them.
** =============================================================================
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
// if the header file is in the "include" directory
// #include "libmmg3d.h"
// if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3d.h"
int main(int argc,char *argv[]) {
MMG5_pMesh mmgMesh;
MMG5_pSol mmgSol;
int ier,k;
char *outname;
fprintf(stdout," -- TEST MMG3DLIB \n");
if ( argc != 2 ) {
printf(" Usage: %s fileout \n",argv[0]);
return(1);
}
/* Name and path of the mesh files */
outname = (char *) calloc(strlen(argv[1]) + 1, sizeof(char));
if ( outname == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(outname,argv[1]);
/* args of InitMesh:
* MMG5_ARG_start: we start to give the args of a variadic func
* MMG5_ARG_ppMesh: next arg will be a pointer over a MMG5_pMesh
* &mmgMesh: pointer toward your MMG5_pMesh (that store your mesh)
* MMG5_ARG_ppMet: next arg will be a pointer over a MMG5_pSol storing a metric
* &mmgSol: pointer toward your MMG5_pSol (that store your metric) */
mmgMesh = NULL;
mmgSol = NULL;
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
if ( MMG3D_Set_meshSize(mmgMesh,12,12,0,20,0,0) != 1 ) exit(EXIT_FAILURE);
mmgMesh->point[1].c[0] = 0.; mmgMesh->point[1].c[1] = 0.; mmgMesh->point[1].c[2] = 0.; mmgMesh->point[1].ref = 0;
/* or with the api function :
if ( MMG3D_Set_vertex(mmgMesh,0 ,0 ,0 ,0, 1) != 1 ) exit(EXIT_FAILURE); */
mmgMesh->point[2].c[0] = 0.5; mmgMesh->point[2].c[1] = 0; mmgMesh->point[2].c[2] = 0; mmgMesh->point[2].ref = 0;
mmgMesh->point[3].c[0] = 0.5; mmgMesh->point[3].c[1] = 0; mmgMesh->point[3].c[2] = 1; mmgMesh->point[3].ref = 0;
mmgMesh->point[4].c[0] = 0; mmgMesh->point[4].c[1] = 0; mmgMesh->point[4].c[2] = 1; mmgMesh->point[4].ref = 0;
mmgMesh->point[5].c[0] = 0; mmgMesh->point[5].c[1] = 1; mmgMesh->point[5].c[2] = 0; mmgMesh->point[5].ref = 0;
mmgMesh->point[6].c[0] = 0.5; mmgMesh->point[6].c[1] = 1; mmgMesh->point[6].c[2] = 0; mmgMesh->point[6].ref = 0;
mmgMesh->point[7].c[0] = 0.5; mmgMesh->point[7].c[1] = 1; mmgMesh->point[7].c[2] = 1; mmgMesh->point[7].ref = 0;
mmgMesh->point[8].c[0] = 0; mmgMesh->point[8].c[1] = 1; mmgMesh->point[8].c[2] = 1; mmgMesh->point[8].ref = 0;
mmgMesh->point[9].c[0] = 1; mmgMesh->point[9].c[1] = 0; mmgMesh->point[9].c[2] = 0; mmgMesh->point[9].ref = 0;
mmgMesh->point[10].c[0] = 1; mmgMesh->point[10].c[1] = 1; mmgMesh->point[10].c[2] = 0; mmgMesh->point[10].ref = 0;
mmgMesh->point[11].c[0] = 1; mmgMesh->point[11].c[1] = 0; mmgMesh->point[11].c[2] = 1; mmgMesh->point[11].ref = 0;
mmgMesh->point[12].c[0] = 1; mmgMesh->point[12].c[1] = 1; mmgMesh->point[12].c[2] = 1; mmgMesh->point[12].ref = 0;
/*tetra*/
mmgMesh->tetra[1].v[0] = 1; mmgMesh->tetra[1].v[1] = 2; mmgMesh->tetra[1].v[2] = 4; mmgMesh->tetra[1].v[3] = 8; mmgMesh->tetra[1].ref = 1;
/* or with the api function :
if ( MMG3D_Set_tetrahedra(mmgMesh,1 ,2 ,4 ,8, 1) != 1 ) exit(EXIT_FAILURE); */
mmgMesh->tetra[2].v[0] = 8; mmgMesh->tetra[2].v[1] = 3; mmgMesh->tetra[2].v[2] = 2; mmgMesh->tetra[2].v[3] = 7; mmgMesh->tetra[2].ref = 1;
mmgMesh->tetra[3].v[0] = 2; mmgMesh->tetra[3].v[1] = 5; mmgMesh->tetra[3].v[2] = 6; mmgMesh->tetra[3].v[3] = 8; mmgMesh->tetra[3].ref = 1;
mmgMesh->tetra[4].v[0] = 8; mmgMesh->tetra[4].v[1] = 5; mmgMesh->tetra[4].v[2] = 1; mmgMesh->tetra[4].v[3] = 2; mmgMesh->tetra[4].ref = 1;
mmgMesh->tetra[5].v[0] = 2; mmgMesh->tetra[5].v[1] = 7; mmgMesh->tetra[5].v[2] = 8; mmgMesh->tetra[5].v[3] = 6; mmgMesh->tetra[5].ref = 1;
mmgMesh->tetra[6].v[0] = 2; mmgMesh->tetra[6].v[1] = 4; mmgMesh->tetra[6].v[2] = 3; mmgMesh->tetra[6].v[3] = 8; mmgMesh->tetra[6].ref = 1;
mmgMesh->tetra[7].v[0] = 2; mmgMesh->tetra[7].v[1] = 9; mmgMesh->tetra[7].v[2] = 3; mmgMesh->tetra[7].v[3] = 7; mmgMesh->tetra[7].ref = 2;
mmgMesh->tetra[8].v[0] = 7; mmgMesh->tetra[8].v[1] = 11; mmgMesh->tetra[8].v[2] = 9; mmgMesh->tetra[8].v[3] = 12; mmgMesh->tetra[8].ref = 2;
mmgMesh->tetra[9].v[0] = 9; mmgMesh->tetra[9].v[1] = 6; mmgMesh->tetra[9].v[2] = 10; mmgMesh->tetra[9].v[3] = 7; mmgMesh->tetra[9].ref = 2;
mmgMesh->tetra[10].v[0] = 7; mmgMesh->tetra[10].v[1] = 6; mmgMesh->tetra[10].v[2] = 2; mmgMesh->tetra[10].v[3] = 9; mmgMesh->tetra[10].ref = 2;
mmgMesh->tetra[11].v[0] = 9; mmgMesh->tetra[11].v[1] = 12; mmgMesh->tetra[11].v[2] = 7; mmgMesh->tetra[11].v[3] = 10; mmgMesh->tetra[11].ref = 2;
mmgMesh->tetra[12].v[0] = 9; mmgMesh->tetra[12].v[1] = 3; mmgMesh->tetra[12].v[2] = 11; mmgMesh->tetra[12].v[3] = 7; mmgMesh->tetra[12].ref = 2;
if ( MMG3D_Set_solSize(mmgMesh,mmgSol,MMG5_Vertex,12,MMG5_Scalar) != 1 )
exit(EXIT_FAILURE);
for(k=1 ; k<=12 ; k++) {
mmgSol->m[k] = 0.5;
/* or with the api function :
if ( MMG3D_Set_scalarSol(mmgSol,0.5,k) != 1 ) exit(EXIT_FAILURE); */
}
if ( MMG3D_Chk_meshData(mmgMesh,mmgSol) != 1 ) exit(EXIT_FAILURE);
// WARNING: the MMG3D_mmg3dlib function returns 1 if success, 0 if fail.
// The MMG3D4 library was working opposite.
ier = MMG3D_mmg3dlib(mmgMesh,mmgSol);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DLIB\n");
if ( MMG3D_saveMesh(mmgMesh,outname) != 1 ) exit(EXIT_FAILURE);
if ( MMG3D_saveSol(mmgMesh,mmgSol,outname) !=1 ) exit(EXIT_FAILURE);
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
free(outname);
outname = NULL;
return(ier);
}
/* =============================================================================
** This file is part of the mmg software package for the tetrahedral
** mesh modification.
** Copyright (c) Bx INP/Inria/UBordeaux/UPMC, 2004- .
**
** mmg is free software: you can redistribute it and/or modify it
** under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** mmg is distributed in the hope that it will be useful, but WITHOUT
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
** License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License and of the GNU General Public License along with mmg (in
** files COPYING.LESSER and COPYING). If not, see
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
** use this copy of the mmg distribution only if you accept them.
** =============================================================================
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
// if the header file is in the "include" directory
// #include "libmmg3d.h"
// if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3d.h"
int main(int argc,char *argv[]) {
MMG5_pMesh mmgMesh;
MMG5_pSol mmgSol;
int k,ier;
char *inname, *outname1, *outname2;
fprintf(stdout," -- TEST MMG3DLIB \n");
if ( argc != 4 ) {
printf(" Usage: %s filein fileout1 filout2 \n",argv[0]);
return(1);
}
/* Name and path of the mesh files */
inname = (char *) calloc(strlen(argv[1]) + 1, sizeof(char));
if ( inname == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(inname,argv[1]);
outname1 = (char *) calloc(strlen(argv[2]) + 1, sizeof(char));
if ( outname1 == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(outname1,argv[2]);
outname2 = (char *) calloc(strlen(argv[3]) + 1, sizeof(char));
if ( outname2 == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(outname2,argv[3]);
/* args of InitMesh:
* MMG5_ARG_start: we start to give the args of a variadic func
* MMG5_ARG_ppMesh: next arg will be a pointer over a MMG5_pMesh
* &mmgMesh: pointer toward your MMG5_pMesh (that store your mesh)
* MMG5_ARG_ppMet: next arg will be a pointer over a MMG5_pSol storing a metric
* &mmgSol: pointer toward your MMG5_pSol (that store your metric) */
mmgMesh = NULL;
mmgSol = NULL;
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
if ( MMG3D_loadMesh(mmgMesh,inname) != 1 ) exit(EXIT_FAILURE);
if ( MMG3D_loadSol(mmgMesh,mmgSol,inname) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Chk_meshData(mmgMesh,mmgSol) != 1 ) exit(EXIT_FAILURE);
/* debug mode ON (default value = OFF) */
if ( MMG3D_Set_iparameter(mmgMesh,mmgSol,MMG3D_IPARAM_debug, 1) != 1 )
exit(EXIT_FAILURE);
/* maximal memory size (default value = 50/100*ram) */
if ( MMG3D_Set_iparameter(mmgMesh,mmgSol,MMG3D_IPARAM_mem, 600) != 1 )
exit(EXIT_FAILURE);
/* Maximal mesh size (default FLT_MAX)*/
if ( MMG3D_Set_dparameter(mmgMesh,mmgSol,MMG3D_DPARAM_hmax,40) != 1 )
exit(EXIT_FAILURE);
/* Minimal mesh size (default 0)*/
if ( MMG3D_Set_dparameter(mmgMesh,mmgSol,MMG3D_DPARAM_hmin,0.001) != 1 )
exit(EXIT_FAILURE);
/* Global hausdorff value (default value = 0.01) applied on the whole boundary */
if ( MMG3D_Set_dparameter(mmgMesh,mmgSol,MMG3D_DPARAM_hausd, 0.1) != 1 )
exit(EXIT_FAILURE);
/* Gradation control*/
if ( MMG3D_Set_dparameter(mmgMesh,mmgSol,MMG3D_DPARAM_hgrad, 2) != 1 )
exit(EXIT_FAILURE);
ier = MMG3D_mmg3dlib(mmgMesh,mmgSol);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DLIB\n");
/* (Not mandatory) Automatically save the mesh */
MMG3D_saveMesh(mmgMesh,outname1);
if ( MMG3D_saveSol(mmgMesh,mmgSol,outname1) != 1 )
exit(EXIT_FAILURE);
/* We add different local hausdorff numbers on boundary componants (this
local values are used instead of the global hausdorff number) */
/* verbosity (default value = 4)*/
if ( MMG3D_Set_iparameter(mmgMesh,mmgSol,MMG3D_IPARAM_verbose, 4) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Set_iparameter(mmgMesh,mmgSol,MMG3D_IPARAM_mem, 1000) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Set_iparameter(mmgMesh,mmgSol,MMG3D_IPARAM_debug, 0) != 1 )
exit(EXIT_FAILURE);
/* use 2 local hausdorff numbers on ref 36 (hausd = 0.01) and 38 (hausd = 1) */
exit(EXIT_FAILURE);
/* Be careful if you change the hausdorff number (or gradation value)
between 2 run: the information of the previous hausdorff number
(resp. gradation) is contained in the metric computed during
the previous run.
Then, you can not grow up the hausdorff value (resp. gradation) without
resetting this metric (but you can decrease this value). */
if ( MMG3D_Set_localParameter(mmgMesh,mmgSol,MMG5_Triangle,36,0.00001,40.,0.01) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Set_localParameter(mmgMesh,mmgSol,MMG5_Triangle,38,0.00001,40.,1) != 1 )
exit(EXIT_FAILURE);
ier = MMG3D_mmg3dlib(mmgMesh,mmgSol);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DLIB\n");
/* New metric to see the effect of the local hausdorff number on triangles
of ref 38: constant and of size 10 */
for ( k=1; k<=mmgSol->np; k++ ) {
if ( MMG3D_Set_scalarSol(mmgSol,10,k) != 1 ) exit(EXIT_FAILURE);
}
ier = MMG3D_mmg3dlib(mmgMesh,mmgSol);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DLIB: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DLIB\n");
/* 7) Automatically save the mesh */
if ( MMG3D_saveMesh(mmgMesh,outname2) != 1 )
exit(EXIT_FAILURE);
/* 8) Automatically save the solution */
if ( MMG3D_saveSol(mmgMesh,mmgSol,outname2) != 1 )
exit(EXIT_FAILURE);
/* 9) free the MMG3D5 structures */
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
free(inname);
inname = NULL;
free(outname1);
outname1 = NULL;
free(outname2);
outname2 = NULL;
return(ier);
}
/* =============================================================================
** This file is part of the mmg software package for the tetrahedral
** mesh modification.
** Copyright (c) Bx INP/Inria/UBordeaux/UPMC, 2004- .
**
** mmg is free software: you can redistribute it and/or modify it
** under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** mmg is distributed in the hope that it will be useful, but WITHOUT
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
** License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License and of the GNU General Public License along with mmg (in
** files COPYING.LESSER and COPYING). If not, see
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
** use this copy of the mmg distribution only if you accept them.
** =============================================================================
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
// if the header file is in the "include" directory
// #include "libmmg3d.h"
// if the header file is in "include/mmg/mmg3d"
#include "mmg/mmg3d/libmmg3d.h"
int main(int argc,char *argv[]) {
MMG5_pMesh mmgMesh;
MMG5_pSol mmgSol,mmgDisp;
int ier;
char *inname,*outname;
fprintf(stdout," -- TEST MMG3DMOV \n");
if ( argc != 3 ) {
printf(" Usage: %s filein fileout \n",argv[0]);
return(1);
}
/* Name and path of the mesh files */
inname = (char *) calloc(strlen(argv[1]) + 1, sizeof(char));
if ( inname == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(inname,argv[1]);
outname = (char *) calloc(strlen(argv[2]) + 1, sizeof(char));
if ( outname == NULL ) {
perror(" ## Memory problem: calloc");
exit(EXIT_FAILURE);
}
strcpy(outname,argv[2]);
/* args of InitMesh:
* MMG5_ARG_start: we start to give the args of a variadic func
* MMG5_ARG_ppMesh: next arg will be a pointer over a MMG5_pMesh
* &mmgMesh: pointer toward your MMG5_pMesh (that store your mesh)
* MMG5_ARG_ppMet: next arg will be a pointer over a MMG5_pSol storing a metric
* &mmgSol: pointer toward your MMG5_pSol (that store your metric) */
mmgMesh = NULL;
mmgSol = NULL;
mmgDisp = NULL;
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
MMG5_ARG_ppDisp,&mmgDisp,
if ( MMG3D_loadMesh(mmgMesh,inname) != 1 ) exit(EXIT_FAILURE);
/* Ask for lagrangian motion (mode 1) */
if ( MMG3D_Set_iparameter(mmgMesh,mmgDisp,MMG3D_IPARAM_lag, 1) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_loadSol(mmgMesh,mmgDisp,inname) != 1 )
exit(EXIT_FAILURE);
if ( MMG3D_Chk_meshData(mmgMesh,mmgDisp) != 1 ) exit(EXIT_FAILURE);
/* debug mode ON (default value = OFF) */
if ( MMG3D_Set_iparameter(mmgMesh,mmgDisp,MMG3D_IPARAM_debug, 1) != 1 )
exit(EXIT_FAILURE);
ier = MMG3D_mmg3dmov(mmgMesh,mmgSol,mmgDisp);
if ( ier == MMG5_STRONGFAILURE ) {
fprintf(stdout,"BAD ENDING OF MMG3DMOV: UNABLE TO SAVE MESH\n");
return(ier);
} else if ( ier == MMG5_LOWFAILURE )
fprintf(stdout,"BAD ENDING OF MMG3DMOV\n");
/* (Not mandatory) Automatically save the mesh */
if ( MMG3D_saveMesh(mmgMesh,outname) != 1 )
exit(EXIT_FAILURE);
/* 9) free the MMG3D5 structures */
MMG5_ARG_ppMesh,&mmgMesh,MMG5_ARG_ppMet,&mmgSol,
MMG5_ARG_ppDisp,&mmgDisp,
free(inname);
inname = NULL;
free(outname);
outname = NULL;
return(ier);
}

Definition in file libmmg3d.h.

Macro Definition Documentation

◆ MMG3D_LMAX

#define MMG3D_LMAX   10240

Maximum array size when storing adjacent points (or ball) of a vertex.

Definition at line 57 of file libmmg3d.h.

Enumeration Type Documentation

◆ MMG3D_Param

Input parameters for mmg library.

Input parameters for mmg library. Options prefixed by MMG3D_IPARAM asked for integers values ans options prefixed by MMG3D_DPARAM asked for real values.

Enumerator
MMG3D_IPARAM_verbose 

[-1..10], Tune level of verbosity

MMG3D_IPARAM_mem 

[n/-1], Set memory size to n Mbytes or keep the default value

MMG3D_IPARAM_debug 

[1/0], Turn on/off debug mode

MMG3D_IPARAM_angle 

[1/0], Turn on/off angle detection

MMG3D_IPARAM_iso 

[1/0], Level-set meshing

MMG3D_IPARAM_nofem 

[1/0], Generate a non finite element mesh

MMG3D_IPARAM_opnbdy 

[1/0], Preserve triangles at interface of 2 domains with same reference

MMG3D_IPARAM_lag 

[-1/0/1/2], Lagrangian option

MMG3D_IPARAM_optim 

[1/0], Optimize mesh keeping its initial edge sizes

MMG3D_IPARAM_optimLES 

[1/0], Strong mesh optimization for Les computations

MMG3D_IPARAM_noinsert 

[1/0], Avoid/allow point insertion

MMG3D_IPARAM_noswap 

[1/0], Avoid/allow edge or face flipping

MMG3D_IPARAM_nomove 

[1/0], Avoid/allow point relocation

MMG3D_IPARAM_nosurf 

[1/0], Avoid/allow surface modifications

MMG3D_IPARAM_nreg 

[0/1], Enable normal regularization

MMG3D_IPARAM_numberOfLocalParam 

[n], Number of local parameters

MMG3D_IPARAM_numberOfLSBaseReferences 

[n], Number of base references for bubble removal

MMG3D_IPARAM_numberOfMat 

[n], Number of material in ls mode

MMG3D_IPARAM_numsubdomain 

[0/n], Save the subdomain nb (0==all subdomain)

MMG3D_IPARAM_renum 

[1/0], Turn on/off point relocation with Scotch

MMG3D_IPARAM_anisosize 

[1/0], Turn on/off anisotropic metric creation when no metric is provided

MMG3D_IPARAM_octree 

[n], Specify the max number of points per PROctree cell (DELAUNAY)

MMG3D_IPARAM_nosizreq 

[0/1], Allow/avoid overwritten of sizes at required points (advanced usage)

MMG3D_DPARAM_angleDetection 

[val], Value for angle detection

MMG3D_DPARAM_hmin 

[val], Minimal mesh size

MMG3D_DPARAM_hmax 

[val], Maximal mesh size

MMG3D_DPARAM_hsiz 

[val], Constant mesh size

MMG3D_DPARAM_hausd 

[val], Control global Hausdorff distance (on all the boundary surfaces of the mesh)

MMG3D_DPARAM_hgrad 

[val], Control gradation

MMG3D_DPARAM_hgradreq 

[val], Control gradation on required entites (advanced usage)

MMG3D_DPARAM_ls 

[val], Value of level-set

MMG3D_DPARAM_rmc 

[-1/val], Remove small connex componants in level-set mode

MMG3D_PARAM_size 

[n], Number of parameters

Definition at line 68 of file libmmg3d.h.

Function Documentation

◆ MMG3D_Add_tetrahedron()

int MMG3D_Add_tetrahedron ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  v2,
int  v3,
int  ref 
)
Parameters
meshpointer toward the mesh structure.
v0first vertex of tetrahedron.
v1second vertex of tetrahedron.
v2third vertex of tetrahedron.
v3fourth vertex of tetrahedron.
reftetrahedron reference.
Returns
0 if unable to create the tetra, the index of the new tetra if the new tetra has strictly positive area, -the index of the new tetra if it has a zero area or if it has been reorientated.

Add a tetrahedra of vertices v0, v1,v2,v3 and reference ref at the first available position of the mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_ADD_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,v2,v3,ref
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1999 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Add_vertex()

int MMG3D_Add_vertex ( MMG5_pMesh  mesh,
double  c0,
double  c1,
double  c2,
int  ref 
)
Parameters
meshpointer toward the mesh structure.
c0x coor of the new point
c1y coor of the new point
c2z coor of the new point
refpoint reference.
Returns
0 if unable to create the point, the index of the new point otherwise.

Add a point of coor c0 c1 c2 and reference ref at the first available position of the mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_ADD_VERTEX(mesh,c0,c1,c2,ref,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(IN) :: c0,c1,c2
INTEGER, INTENT(IN) :: ref
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2072 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Chk_meshData()

int MMG3D_Chk_meshData ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
Returns
0 if failed, 1 otherwise.

Check if the number of given entities match with mesh and sol size (not mandatory) and check mesh datas.

Remarks
Fortran interface:

SUBROUTINE MMG3D_CHK_MESHDATA(mesh,met,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1875 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Compute_eigenv()

int MMG3D_Compute_eigenv ( double  m[6],
double  lambda[3],
double  vp[3][3] 
)
Parameters
mupper part of a symetric matric diagonalizable in |R
lambdaarray of the metric eigenvalues
vparray of the metric eigenvectors
Returns
the order of the eigenvalues

Compute the real eigenvalues and eigenvectors of a symetric matrice m whose upper part is provided (m11, m12, m13, m22, m23, m33 in this order). lambda[0] is the eigenvalue associated to the eigenvector ( v[0][0], v[0,1], v[0,2] ) in C and to the eigenvector v(1,:) in fortran lambda[1] is the eigenvalue associated to the eigenvector ( v[1][0], v[1,1], v[1,2] ) in C and to the eigenvector v(2,:) in fortran lambda[2] is the eigenvalue associated to the eigenvector ( v[2][0], v[2,1], v[2,2] ) in C and to the eigenvector v(3,:) in fortran

Remarks
Fortran interface:

SUBROUTINE MMG3D_COMPUTE_EIGENV(m,lambda,vp,retval)
REAL(KIND=8), INTENT(IN) :: m(*)
REAL(KIND=8), INTENT(OUT) :: lambda(*),vp(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1383 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_defaultValues()

int MMG3D_defaultValues ( MMG5_pMesh  mesh)

Tools for the library

Parameters
meshpointer toward the mesh structure.
Returns
0 if fail, 1 if success.

Print the default parameters values.

Remarks
Fortran interface:

SUBROUTINE MMG3D_DEFAULTVALUES(mesh,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 159 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_destockOptions()

void MMG3D_destockOptions ( MMG5_pMesh  mesh,
MMG5_Info info 
)
Parameters
meshpointer toward the mesh structure.
infopointer toward the info structure.

Recover the info structure stored in the mesh structure.

Remarks
Fortran interface:

SUBROUTINE MMG3D_DESTOCKOPTIONS(mesh,info)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
END SUBROUTINE

Definition at line 955 of file libmmg3d_tools.c.

Here is the caller graph for this function:

◆ MMG3D_doSol()

int MMG3D_doSol ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure
metpointer toward the sol structure
Returns
1 if success

Compute isotropic size map according to the mean of the length of the edges passing through a point.

Remarks
Fortran interface:

SUBROUTINE MMG3D_DOSOL(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1209 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Free_all()

int MMG3D_Free_all ( const int  starter,
  ... 
)
Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG3D_mmg3dlib function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG3D_mmg3dls function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG3D_mmg3dmov function, you must call : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
1 if success, 0 if fail

Deallocations before return.

Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
no Fortran interface to allow variadic args.

Definition at line 2486 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Free_allSols()

int MMG3D_Free_allSols ( MMG5_pMesh  mesh,
MMG5_pSol sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward an array of solution structure (that stores solution fields).
Returns
1

Deallocation of an array of solution fields

Remarks
Fortran interface:

SUBROUTINE MMG3D_Free_allSols(mesh,sol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2481 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Free_names()

int MMG3D_Free_names ( const int  starter,
  ... 
)
Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG3D_mmg3dlib function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG3D_mmg3dls function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG3D_mmg3dmov function, you must call : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
0 if fail, 1 if success

Structure deallocations before return.

Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
No fortran interface to allow variadic arguments.

Definition at line 2514 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Free_solutions()

void MMG3D_Free_solutions ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure
solpointer toward the solution structure

Free the solution.

Remarks
Fortran interface:

SUBROUTINE MMG3D_FREE_SOLUTIONS(mesh,sol)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
END SUBROUTINE

Definition at line 1389 of file libmmg3d_tools.c.

Here is the caller graph for this function:

◆ MMG3D_Free_structures()

int MMG3D_Free_structures ( const int  starter,
  ... 
)
Parameters
starterdummy argument used to initialize the variadic argument list.
...variadic arguments that depend to the library function that you have call.

For the MMG3D_mmg3dlib function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&your_metric,MMG5_ARG_end).

For the MMG3D_mmg3dls function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG3D_mmg3dmov function, you must call : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Returns
0 if fail, 1 if success

Structure deallocations before return.

Remarks
we pass the structures by reference in order to have argument compatibility between the library call from a Fortran code and a C code.
No fortran interface to allow variadic arguments.
no Fortran interface to allow variadic args.

Definition at line 2500 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_adjaTet()

int MMG3D_Get_adjaTet ( MMG5_pMesh  mesh,
int  kel,
int  listet[4] 
)

Return adjacent elements of a tetrahedron.

Utils

Parameters
meshpointer toward the mesh structure.
keltetrahedron index.
listetpointer toward the table of the 4 tetra adjacent to kel. (the index is 0 if there is no adjacent)
Returns
1.

Find the indices of the 4 adjacent elements of tetrahedron kel. $listet[i] = 0$ if the $i^{th}$ face has no adjacent element (so we are on a boundary face).

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_ADJATET(mesh,kel,listet,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: kel
INTEGER, DIMENSION(4), INTENT(OUT) :: listet
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 102 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_edge()

int MMG3D_Get_edge ( MMG5_pMesh  mesh,
int *  e0,
int *  e1,
int *  ref,
int *  isRidge,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
e0pointer toward the first extremity of the edge.
e1pointer toward the second extremity of the edge.
refpointer toward the edge reference.
isRidgepointer toward the flag saying if the edge is ridge.
isRequiredpointer toward the flag saying if the edge is required.
Returns
0 if failed, 1 otherwise.

Get extremities e0, e1 and reference ref of next edge of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_EDGE(mesh,e0,e1,ref,isRidge,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: e0,e1
INTEGER :: ref,isRidge,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1122 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_edges()

int MMG3D_Get_edges ( MMG5_pMesh  mesh,
int *  edges,
int *  refs,
int *  areRidges,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
edgespointer toward the array of edges. Vertices of the $i^{th}$ edge are stored in edge[(i-1)*2]@2.
refsedges references. refs[i-1] is the ref of the $i^{th}$ edge.
areRidges1 if the edge is a ridge, 0 otherwise.
areRequired1 if the edge is required, 0 otherwise.
Returns
0 if failed, 1 otherwise.

Get vertices and references of the mesh edges.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_EDGES(mesh,edges,refs,areRidges,areRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: edges(*)
INTEGER, INTENT(OUT) :: refs(*),areRequired(*),areRidges(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1185 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_iparameter()

int MMG3D_Get_iparameter ( MMG5_pMesh  mesh,
int  iparam 
)
Parameters
meshpointer toward the mesh structure.
iparaminteger parameter to set (see MMG3D_Param structure).
Returns
The value of integer parameter.

Get the value of integer parameter iparam.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_IPARAMETER(mesh,iparam,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: iparam
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2277 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_ithSol_inSolsAtVertices()

int MMG3D_Get_ithSol_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s,
int  pos 
)
Parameters
solpointer toward the array of solutions
iposition of the solution field that we want to get.
ssolution(s) at mesh vertex pos.
posindex of the vertex on which we get the solution.
Returns
0 if failed, 1 otherwise.

Get values of the ith field of the solution array at vertex pos. (pos from 1 to nb_vertices included and i from 1 to nb_sols).

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i,pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1773 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_ithSols_inSolsAtVertices()

int MMG3D_Get_ithSols_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s 
)
Parameters
solpointer toward the array of solutions
iposition of the solution field that we want to get.
stable of the solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[3*(k-1)]@3 for a vectorial solution and s[6*(k-1)]@6 for a tensor solution.
Returns
0 if failed, 1 otherwise.

Get values of the solution at the ith field of the solution array (i from 1 to nb_sols).

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1831 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_meshSize()

int MMG3D_Get_meshSize ( MMG5_pMesh  mesh,
int *  np,
int *  ne,
int *  nprism,
int *  nt,
int *  nquad,
int *  na 
)

recover datas

Parameters
meshpointer toward the mesh structure.
nppointer toward the number of vertices.
nepointer toward the number of tetrahedra.
nprismpointer toward the number of prisms.
ntpointer toward the number of triangles.
nquadpointer toward the number of quads.
napointer toward the number of edges.
Returns
1.

Get the number of vertices, tetrahedra, prisms, triangles, quadrilaterals and edges of the mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_MESHSIZE(mesh,np,ne,nprism,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER :: np,ne,nprism,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 337 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_nonBdyTriangle()

int MMG3D_Get_nonBdyTriangle ( MMG5_pMesh  mesh,
int *  v0,
int *  v1,
int *  v2,
int *  ref,
int  idx 
)
Parameters
meshpointer toward the mesh structure.
v0pointer toward the firts vertex of the triangle
v1pointer toward the second vertex of the triangle.
v2pointer toward the third vertex of the triangle.
refpointer toward the triangle reference.
idxindex of the non boundary triangle to get (between 1 and nb_tria)
Returns
0 if failed, 1 otherwise.

Get vertices and reference ref of the idx^th non boundary triangle (for DG methods for example). A tria is boundary if it is located at the interface of 2 domains witch different references or if it belongs to one tetra only.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_NONBDYTRIANGLE(mesh,v0,v1,v2,ref,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2
INTEGER :: ref
INTEGER, INTENT(IN) :: idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 896 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_normalAtVertex()

int MMG3D_Get_normalAtVertex ( MMG5_pMesh  mesh,
int  k,
double *  n0,
double *  n1,
double *  n2 
)
Parameters
meshpointer toward the mesh structure.
kpoint index
n0x componant of the normal at point k.
n1y componant of the normal at point k.
n2z componant of the normal at point k.
Returns
1 if success.

Get normals (n0,n1,n2) at point k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
REAL(KIND=8) :: n0,n1,n2
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1384 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_numberOfNonBdyTriangles()

int MMG3D_Get_numberOfNonBdyTriangles ( MMG5_pMesh  mesh,
int *  nb_tria 
)
Parameters
meshpointer toward the mesh structure.
nb_triapointer toward the number of non boundary triangles.
Returns
0 if failed, 1 otherwise.

Get the number of non boundary triangles (for DG methods for example). A triangle is boundary if it is located at the interface of 2 domains with different references or if it belongs to one tetra only. Append these triangles to the list of triangles.

Warning
reallocate the triangle array and append the internal triangles. This may modify the behaviour of other functions.
Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_NUMBEROFNONBDYTRIANGLESS(mesh,nb_tria,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: nb_tria
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

First step: Mesh analysis to detect the tetra/prisms boundary faces and to store the info in the xtetra/xprisms structures

Second step: Count the number of non boundary faces

Third step: Append the non boundary edges to the boundary edges array

Definition at line 682 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_prism()

int MMG3D_Get_prism ( MMG5_pMesh  mesh,
int *  v0,
int *  v1,
int *  v2,
int *  v3,
int *  v4,
int *  v5,
int *  ref,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
v0pointer toward the first vertex of prism.
v1pointer toward the second vertex of prism.
v2pointer toward the third vertex of prism.
v3pointer toward the fourth vertex of prism.
v4pointer toward the fifth vertex of prism.
v5pointer toward the sixth vertex of prism.
refpointer toward the prism reference.
isRequiredpointer toward the flag saying if prism is required.
Returns
0 if failed, 1 otherwise.

Get vertices v0, v1, v2, v3, v4, v5 and reference ref of next prism of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_PRISM(mesh,v0,v1,v2,v3,v4,v5,ref,isRequired,&
retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2,v3,v4,v5
INTEGER :: ref,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 749 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_prisms()

int MMG3D_Get_prisms ( MMG5_pMesh  mesh,
int *  prisms,
int *  refs,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
prismspointer toward the table of the prisms vertices. Vertices of the $i^{th}$ prism are stored in prisms[(i-1)*6]@6.
refspointer toward the table of the prism references. References of the $i^{th}$ prism is stored in refs[i-1].
areRequiredpointer toward the table of the flags saying if the prisms are required. areRequired[i-1]=1 if the $i^{th}$ prism is required.
Returns
0 if failed, 1 otherwise.

Get vertices and references of the mesh prisms.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

! SUBROUTINE MMG3D_GET_PRISMS(mesh,prisms,refs,areRequired,&
! retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*),INTENT(OUT) :: prisms
! INTEGER, DIMENSION(*) :: refs,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 825 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_quadrilateral()

int MMG3D_Get_quadrilateral ( MMG5_pMesh  mesh,
int *  v0,
int *  v1,
int *  v2,
int *  v3,
int *  ref,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
v0pointer toward the first vertex of quadrilateral.
v1pointer toward the second vertex of quadrilateral.
v2pointer toward the third vertex of quadrilateral.
v3pointer toward the fourth vertex of quadrilateral.
refpointer toward the quadrilateral reference.
isRequiredpointer toward the flag saying if quadrilateral is required.
Returns
0 if failed, 1 otherwise.

Get vertices v0,v1,v2,v3 and reference ref of next quadrilateral of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2,v3
INTEGER :: ref,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1001 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_quadrilaterals()

int MMG3D_Get_quadrilaterals ( MMG5_pMesh  mesh,
int *  quads,
int *  refs,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
quadspointer toward the table of the quadrilaterals vertices Vertices of the $i^{th}$ quadra are stored in tria[(i-1)*4]@4.
refspointer toward the table of the quadrilaterals references. refs[i-1] is the ref of the $i^{th}$ quadra.
areRequiredpointer toward table of the flags saying if quadrilaterals are required. areRequired[i-1]=1 if the $i^{th}$ quadra is required.
Returns
0 if failed, 1 otherwise.

Get vertices and references of the mesh quadrilaterals.

Remarks
Fortran interface: (Commentated in order to allow to pass %val(0) instead of the refs or areRequired arrays)

! SUBROUTINE MMG3D_GET_QUADRILATERALS(mesh,quads,refs,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*),INTENT(OUT) :: quads
! INTEGER, DIMENSION(*) :: refs,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1064 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_scalarSol()

int MMG3D_Get_scalarSol ( MMG5_pSol  met,
double *  s 
)
Parameters
metpointer toward the sol structure.
spointer toward the scalar solution value.
Returns
0 if failed, 1 otherwise.

Get solution s of next vertex of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_SCALARSOL(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1460 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_scalarSols()

int MMG3D_Get_scalarSols ( MMG5_pSol  met,
double *  s 
)
Parameters
metpointer toward the sol structure.
stable of the scalar solutions at mesh vertices. s[i-1] is the solution at vertex i.
Returns
0 if failed, 1 otherwise.

Get solutions at mesh vertices.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1507 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_solsAtVerticesSize()

int MMG3D_Get_solsAtVerticesSize ( MMG5_pMesh  mesh,
MMG5_pSol sol,
int *  nsols,
int *  nentities,
int *  typSol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward an array of sol structure.
nsolspointer toward the number of solutions per entity.
nentitiespointer toward the number of solutions.
typSolarray of size MMG5_NSOLS_MAX to store type of each solution (scalar, vector..).
Returns
1.

Get the solution number, dimension and type.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: nsols,nentities
INTEGER :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 308 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_solSize()

int MMG3D_Get_solSize ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int *  typEntity,
int *  np,
int *  typSol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
typEntitypointer toward the type of entities to which solutions are applied.
nppointer toward the number of solutions.
typSolpointer toward the type of the solutions (scalar, vectorial, ...)
Returns
1.

Get the solution number, dimension and type.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER :: typEntity,np,typSol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 284 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tensorSol()

int MMG3D_Get_tensorSol ( MMG5_pSol  met,
double *  m11,
double *  m12,
double *  m13,
double *  m22,
double *  m23,
double *  m33 
)
Parameters
metpointer toward the sol structure.
m11pointer toward the position (1,1) in the solution tensor.
m12pointer toward the position (1,2) in the solution tensor.
m13pointer toward the position (1,3) in the solution tensor.
m22pointer toward the position (2,2) in the solution tensor.
m23pointer toward the position (2,3) in the solution tensor.
m33pointer toward the position (3,3) in the solution tensor.
Returns
0 if failed, 1 otherwise.

Get tensorial solution of next vertex of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: m11,m12,m13,m22,m23,m33
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1665 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tensorSols()

int MMG3D_Get_tensorSols ( MMG5_pSol  met,
double *  sols 
)
Parameters
metpointer toward the sol structure.
solstable of the solutions at mesh vertices. sols[6*(i-1)]@6 is the solution at vertex i.
Returns
0 if failed, 1 otherwise.

Get tensorial solutions at mesh vertices.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*), INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1727 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetFromTria()

int MMG3D_Get_tetFromTria ( MMG5_pMesh  mesh,
int  ktri,
int *  ktet,
int *  iface 
)
Parameters
meshpointer toward the mesh structure.
ktriindex of the boundary triangle.
ktetpointer toward an integer that will contains the tetra index.
ifacepointer toward the triangle in ktet.
Returns
0 if fail, 1 otherwise

Fill ktet by the indice of a tetra to which belong a boundary triangle and iface by the indice of the triangle in the tetra.

Warning
will be deprecated in release 5.5
Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TETFROMTRIA(mesh,ktri,ktet,iface,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER, INTENT(IN) :: ktri
INTEGER, INTENT(OUT) :: ktet,iface
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1084 of file libmmg3d_tools.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedra()

int MMG3D_Get_tetrahedra ( MMG5_pMesh  mesh,
int *  tetra,
int *  refs,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
tetrapointer toward the table of the tetrahedra vertices. Vertices of the $i^{th}$ tetra are stored in tetra[(i-1)*4]@4.
refspointer toward the table of the tetrahedron references. References of the $i^{th}$ tetra is stored in refs[i-1].
areRequiredpointer toward the table of the flags saying if the tetrahedra are required. areRequired[i-1]=1 if the $i^{th}$ tetra is required.
Returns
0 if failed, 1 otherwise.

Get vertices and references of the mesh tetrahedra.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

! SUBROUTINE MMG3D_GET_TETRAHEDRA(mesh,tetra,refs,areRequired,&
! retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*),INTENT(OUT) :: tetra
! INTEGER, DIMENSION(*) :: refs,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 685 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedron()

int MMG3D_Get_tetrahedron ( MMG5_pMesh  mesh,
int *  v0,
int *  v1,
int *  v2,
int *  v3,
int *  ref,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
v0pointer toward the first vertex of tetrahedron.
v1pointer toward the second vertex of tetrahedron.
v2pointer toward the third vertex of tetrahedron.
v3pointer toward the fourth vertex of tetrahedron.
refpointer toward the tetrahedron reference.
isRequiredpointer toward the flag saying if tetrahedron is required.
Returns
0 if failed, 1 otherwise.

Get vertices v0, v1, v2, v3 and reference ref of next tetra of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,isRequired,&
retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2,v3
INTEGER :: ref,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 586 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_tetrahedronQuality()

double MMG3D_Get_tetrahedronQuality ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of the tetra for which we want to get the quality.
Returns
the computed quality or 0. if fail.

Get quality of tetra k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TETRAHEDRONQUALITY(mesh,met,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,met
INTEGER, INTENT(IN) :: k
REAL(KIND=8), INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1394 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_tetsFromTria()

int MMG3D_Get_tetsFromTria ( MMG5_pMesh  mesh,
int  ktri,
int  ktet[2],
int  iface[2] 
)
Parameters
meshpointer toward the mesh structure.
ktriindex of the boundary triangle.
ktetarray of size 2 that will contain the indices of the tetra (filled by the function).
ifacepointer toward an array of size 2 that will contains the indices of the faces of the tetras ktet[i] that corresponds to the boundary tria ktri.
Returns
0 if fail, 1 otherwise

Fill ktet by the indices of the tetra to which belong a boundary triangle and iface by the indices of the faces of the tetras that correspond to the triangle. Fill ktet[1] and iface[1] by 0 if the triangle belongs to 1 tetra only.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TETSFROMTRIA(mesh,ktri,ktet,iface,retval)
MMG5_DATA_PTR_T, INTENT(IN) :: mesh
INTEGER, INTENT(IN) :: ktri
INTEGER, DIMENSION(2), INTENT(OUT) :: ktet,iface
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1103 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_triangle()

int MMG3D_Get_triangle ( MMG5_pMesh  mesh,
int *  v0,
int *  v1,
int *  v2,
int *  ref,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
v0pointer toward the first vertex of triangle.
v1pointer toward the second vertex of triangle.
v2pointer toward the third vertex of triangle.
refpointer toward the triangle reference.
isRequiredpointer toward the flag saying if triangle is required.
Returns
0 if failed, 1 otherwise.

Get vertices v0,v1,v2 and reference ref of next triangle of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_TRIANGLE(mesh,v0,v1,v2,ref,isRequired,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(OUT) :: v0,v1,v2
INTEGER :: ref,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 888 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_triangles()

int MMG3D_Get_triangles ( MMG5_pMesh  mesh,
int *  tria,
int *  refs,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
triapointer toward the table of the triangles vertices Vertices of the $i^{th}$ tria are stored in tria[(i-1)*3]@3.
refspointer toward the table of the triangles references. refs[i-1] is the ref of the $i^{th}$ tria.
areRequiredpointer toward table of the flags saying if triangles are required. areRequired[i-1]=1 if the $i^{th}$ tria is required.
Returns
0 if failed, 1 otherwise.

Get vertices and references of the mesh triangles.

Remarks
Fortran interface: (Commentated in order to allow to pass %val(0) instead of the refs or areRequired arrays)

! SUBROUTINE MMG3D_GET_TRIANGLES(mesh,tria,refs,areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*),INTENT(OUT) :: tria
! INTEGER, DIMENSION(*) :: refs,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 948 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vectorSol()

int MMG3D_Get_vectorSol ( MMG5_pSol  met,
double *  vx,
double *  vy,
double *  vz 
)
Parameters
metpointer toward the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
vzz value of the vectorial solution.
Returns
0 if failed, 1 otherwise.

Get vectorial solution $(v_x,v_y,vz)$ of next vertex of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_VECTORSOL(met,vx,vy,vz,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(OUT) :: vx,vy,vz
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1553 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vectorSols()

int MMG3D_Get_vectorSols ( MMG5_pSol  met,
double *  sols 
)
Parameters
metpointer toward the sol structure.
solstable of the solutions at mesh vertices. sols[3*(i-1)]@3 is the solution at vertex i.
Returns
0 if failed, 1 otherwise.

Get vectorial solutions at mesh vertices

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1608 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Get_vertex()

int MMG3D_Get_vertex ( MMG5_pMesh  mesh,
double *  c0,
double *  c1,
double *  c2,
int *  ref,
int *  isCorner,
int *  isRequired 
)
Parameters
meshpointer toward the mesh structure.
c0pointer toward the coordinate of the point along the first dimension.
c1pointer toward the coordinate of the point along the second dimension.
c2pointer toward the coordinate of the point along the third dimension.
refpointer to the point reference.
isCornerpointer toward the flag saying if point is corner.
isRequiredpointer toward the flag saying if point is required.
Returns
1.

Get coordinates c0, c1,c2 and reference ref of next vertex of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GET_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired, &
retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1,c2
INTEGER :: ref,isCorner,isRequired
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 392 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Get_vertices()

int MMG3D_Get_vertices ( MMG5_pMesh  mesh,
double *  vertices,
int *  refs,
int *  areCorners,
int *  areRequired 
)
Parameters
meshpointer toward the mesh structure.
verticespointer toward the table of the points coordinates. The coordinates of the $i^{th}$ point are stored in vertices[(i-1)*3]@3.
refspointer to the table of the point references. The ref of the $i^th$ point is stored in refs[i-1].
areCornerspointer toward the table of the flags saying if points are corners. areCorners[i-1]=1 if the $i^{th}$ point is corner.
areRequiredpointer toward the table of flags saying if points are required. areRequired[i-1]=1 if the $i^{th}$ point is required.
Returns
1.

Get the coordinates and references of the mesh vertices.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs, areCorners or areRequired arrays)

! SUBROUTINE MMG3D_GET_VERTICES(mesh,vertices,refs,areCorners,&
! areRequired,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8),DIMENSION(*), INTENT(OUT) :: vertices
! INTEGER, DIMENSION(*) :: refs,areCorners,areRequired
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 479 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_GetByIdx_vertex()

int MMG3D_GetByIdx_vertex ( MMG5_pMesh  mesh,
double *  c0,
double *  c1,
double *  c2,
int *  ref,
int *  isCorner,
int *  isRequired,
int  idx 
)
Parameters
meshpointer toward the mesh structure.
c0pointer toward the coordinate of the point along the first dimension.
c1pointer toward the coordinate of the point along the second dimension.
c2pointer toward the coordinate of the point along the third dimension.
refpointer to the point reference.
isCornerpointer toward the flag saying if point is corner.
isRequiredpointer toward the flag saying if point is required.
idxindex of point to get.
Returns
1.

Get coordinates c0, c1, c2 and reference ref of vertex idx of mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_GETBYIDX_VERTEX(mesh,c0,c1,c2,ref,isCorner,isRequired,idx,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(OUT) :: c0,c1,c2
INTEGER :: ref,isCorner,isRequired,idx
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 419 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_hashTetra()

int MMG3D_hashTetra ( MMG5_pMesh  mesh,
int  pack 
)
Parameters
meshpointer toward the mesh structure.
packwe pack the mesh at function begining if $pack=1$.
Returns
0 if failed, 1 otherwise.

Create table of adjacency. Set pack variable to 0 for a compact mesh and to 1 for a mesh that need to be packed.

Remarks
Fortran interface:

SUBROUTINE MMG3D_HASHTETRA(mesh,pack,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: pack
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
packwe pack the mesh at function begining if $pack=1$.
Returns
0 if failed, 1 otherwise.

Create table of adjacency. Set pack variable to 0 for a compact mesh and to 1 for a mesh that need to be packed.

Definition at line 180 of file hash_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Init_fileNames()

void MMG3D_Init_fileNames ( MMG5_pMesh  mesh,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.

Initialize file names to their default values.

Remarks
Fortran interface:

SUBROUTINE MMG3D_INIT_FILENAMES(mesh,sol)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
END SUBROUTINE

Definition at line 56 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Init_mesh()

int MMG3D_Init_mesh ( const int  starter,
  ... 
)
Parameters
starterdummy argument used to initialize the variadic argument list
...variadic arguments that depend to the library function that you want to call.

For the MMG3D_mmg3dlib function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet MMG5_ARG_ppMet, &your_metric,MMG5_ARG_end).

For the MMG3D_mmg3dls function, you need to call the MMG3D_Init_mesh function with the following arguments : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppLs, &your_level_set,MMG5_ARG_end).

For the MMG3D_mmg3dmov function, you must call : MMG3D_Init_mesh(MMG5_ARG_start,MMG5_ARG_ppMesh, &your_mesh, MMG5_ARG_ppMet,&empty_metric,MMG5_ARG_ppDisp, &your_displacement, MMG5_ARG_end).

Here,your_mesh is a MMG5_pMesh, your_metric your_level_set and your_displacement are MMG5_pSol.

Returns
1 if success, 0 if fail

MMG structures allocation and initialization.

Remarks
No fortran interface to allow variadic arguments.

Definition at line 44 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Init_parameters()

void MMG3D_Init_parameters ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.

Initialization of the input parameters (stored in the Info structure).

Remarks
Fortran interface:

SUBROUTINE MMG3D_INIT_PARAMETERS(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 81 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadAllSols()

int MMG3D_loadAllSols ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solutions array
filenamename of file.
Returns
0 if failed, 1 otherwise.

Load 1 or more solutions in a solution file at medit file format.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADALLSOLS(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Read the file header

Sol tab allocation

Definition at line 2319 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadGenericMesh()

int MMG3D_loadGenericMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh data in a file whose format depends on the filename extension.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADGENERICMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1315 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadMesh()

int MMG3D_loadMesh ( MMG5_pMesh  mesh,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh data.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
filenamename of file.
Returns
0 if the file is not found, -1 if we detect mismatch parameters or we fail, 1 otherwise.

Read mesh data.

Definition at line 1187 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadMshMesh()

int MMG3D_loadMshMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh and 0 or 1 data at MSH file format (.msh extension). We read only low-order points, edges, tria, quadra, tetra and prisms.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADMSHMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1201 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadMshMesh_and_allData()

int MMG3D_loadMshMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward a list of solution structures.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh and a list of data at MSH file format (.msh extension). We read only low-order points, edges, tria, quadra, tetra and prisms.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1259 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadSol()

int MMG3D_loadSol ( MMG5_pMesh  mesh,
MMG5_pSol  met,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
filenamename of file.
Returns
-1 data invalid, 0 no file, 1 ok.

Load metric field. The solution file must contains only 1 solution: the metric

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADSOL(mesh,met,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Read the file header

Definition at line 2249 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadVtkMesh()

int MMG3D_loadVtkMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh and 0 or 1 data at VTK file format (.vtu extension). We read only low-order points, edges, tria, quadra, tetra and prisms. Point and cell references must be stored in PointData or CellData whose names contains the "medit:ref" keyword.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADVTKMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 143 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadVtkMesh_and_allData()

int MMG3D_loadVtkMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh and a list of data in VTK file format (.vtu extension). We read only low-order points, edges, tria, quadra, tetra and prisms. Point and cell references must be stored in PointData or CellData whose names contains the "medit:ref" keyword.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 182 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadVtuMesh()

int MMG3D_loadVtuMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh and 0 or 1 data at VTU (VTK) file format (.vtu extension). We read only low-order points, edges, tria, quadra, tetra and prisms. Point and cell references must be stored in PointData or CellData whose names contains the "medit:ref" keyword.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADVTUMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 72 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_loadVtuMesh_and_allData()

int MMG3D_loadVtuMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Read mesh a list of data in VTU file format (.vtu extension). We read only low-order points, edges, tria, quadra, tetra and prisms. Point and cell references must be stored in PointData or CellData whose names contains the "medit:ref" keyword.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LOADVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 111 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_mmg3dcheck()

int MMG3D_mmg3dcheck ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol,
double  critmin,
double  lmin,
double  lmax,
int *  eltab,
int8_t  metRidTyp 
)

Checks

Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure (metric).
solpointer toward the sol structure (ls or displacement).
critminminimum quality for elements.
lminminimum edge length.
lmaxmaximum ede length.
eltabtable of invalid elements.
metRidTypType of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call).

Search invalid elements (in term of quality or edge length).

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DCHECK(mesh,met,sol,critmin,lmin,lmax,eltab,&
metridtyp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,sol
REAL(KIND=8), INTENT(IN) :: critmin,lmin,lmax
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Free topologic tables (adja, xpoint, xtetra) resulting from a previous run

Definition at line 961 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_mmg3dlib()

int MMG3D_mmg3dlib ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol (metric) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the remesh library.

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DLIB(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

In debug mode, check that all structures are allocated

Free topologic tables (adja, xpoint, xtetra) resulting from a previous run

Definition at line 970 of file libmmg3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_mmg3dls()

int MMG3D_mmg3dls ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol (level-set) structure.
metpointer toward a sol structure (metric), optionnal.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the level-set discretization library. If a metric met is provided, use it to adapt the mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DLS(mesh,sol,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
MMG5_DATA_PTR_T :: met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

In debug mode, check that all structures are allocated

Free topologic tables (adja, xpoint, xtetra) resulting from a previous run

Definition at line 1199 of file libmmg3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_mmg3dmov()

int MMG3D_mmg3dmov ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  disp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol (output metric) structure.
disppointer toward a sol (displacement for the lagrangian motion mode) structure.
Returns
MMG5_SUCCESS if success, MMG5_LOWFAILURE if fail but a conform mesh is saved or MMG5_STRONGFAILURE if fail and we can't save the mesh.

Main program for the rigidbody movement library.

Remarks
Fortran interface:

SUBROUTINE MMG3D_MMG3DMOV(mesh,met,disp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met,disp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

In debug mode, check that all structures are allocated

Free topologic tables (adja, xpoint, xtetra) resulting from a previous run

Definition at line 1482 of file libmmg3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_parsar()

int MMG3D_parsar ( int  argc,
char *  argv[],
MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol 
)
Parameters
argcnumber of command line arguments.
argvcommand line arguments.
meshpointer toward the mesh structure.
metpointer toward a metric
solpointer toward a level-set or displacement
Returns
1 if we want to run Mmg after, 0 if not or if fail.

Store command line arguments.

Remarks
no matching fortran function.

Definition at line 179 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_parsop()

int MMG3D_parsop ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
Returns
1.

Read local parameters file. This file must have the same name as the mesh with the .mmg3d extension or must be named DEFAULT.mmg3d.

Remarks
Fortran interface:

SUBROUTINE MMG3D_PARSOP(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 552 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveAllSols()

int MMG3D_saveAllSols ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solutions array
filenamename of the solution file.
Returns
0 or -1 if fail, 1 otherwise.

Save 1 or more solutions at medit solution file format

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEALLSOLS(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2454 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveGenericMesh()

int MMG3D_saveGenericMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Save mesh data in a file whose format depends on the filename extension.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEGENERICMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2168 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveMesh()

int MMG3D_saveMesh ( MMG5_pMesh  mesh,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
filenamepointer toward the name of file.
Returns
0 if failed, 1 otherwise.

Save mesh data.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Parameters
meshpointer toward the mesh structure.
filenamepointer toward the name of file.
Returns
0 if failed, 1 otherwise.

Save mesh data.

Warning
you must call the MMG3D_packMesh function before saving your mesh.

Definition at line 1398 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveMshMesh()

int MMG3D_saveMshMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and 0 or 1 data at MSH file format (.msh extension). Write binary file for .mshb extension and ASCII for .msh one.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEMSHMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2239 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveMshMesh_and_allData()

int MMG3D_saveMshMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and a list of data fields (that are considered as solutions and not metrics, thus, we do nothing over the ridge points) at MSH file format (.msh extension). Save file at ASCII format for .msh extension, at binary format for .mshb one.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEMSHMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2244 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveSol()

int MMG3D_saveSol ( MMG5_pMesh  mesh,
MMG5_pSol  met,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write isotropic or anisotropic metric.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVESOL(mesh,met,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2417 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveTetgenMesh()

int MMG3D_saveTetgenMesh ( MMG5_pMesh  ,
const char *   
)
Parameters
meshpointer toward the mesh structure.
filenamename of the readed file.
Returns
0 or -1 if fail, 1 otherwise.

Save mesh data at Triangle (or equivalent to Tetgen in 3D) file format.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVETETGENMESH(mesh,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2758 of file inout_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveVtkMesh()

int MMG3D_saveVtkMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and 0 or 1 data at Vtk file format (.vtk extension).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEVTKMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 243 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveVtkMesh_and_allData()

int MMG3D_saveVtkMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and a list of data fields at Vtk file format (.vtk extension).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEVTKMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 258 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveVtuMesh()

int MMG3D_saveVtuMesh ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and 0 or 1 data at vtu Vtk file format (.vtu extension).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEVTUMESH(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 214 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_saveVtuMesh_and_allData()

int MMG3D_saveVtuMesh_and_allData ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the solution structure.
filenamename of file.
Returns
0 if failed, 1 otherwise.

Write mesh and a list of data fields at vtu Vtk file format (.vtu extension).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SAVEVTUMESH_AND_ALLDATA(mesh,sol,filename,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: filename
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 227 of file inoutcpp_3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_searchlen()

int MMG3D_searchlen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  lmin,
double  lmax,
int *  eltab,
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
lminminimum edge length.
lmaxmaximum ede length.
eltabtable of invalid elements.
metRidTypType of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call).
Returns
1 if success, 0 otherwise.

Store in eltab elements which have edge lengths shorter than lmin or longer than lmax, eltab is allocated and could contain mesh->ne elements.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SEARCHLEN(mesh,met,lmin,lmax,eltab,metridtyp,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
REAL(KIND=8), INTENT(IN) :: lmin,lmax
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1148 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_searchqua()

void MMG3D_searchqua ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  critmin,
int *  eltab,
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
critminminimum quality for elements.
eltabpointer toward the table of invalid elements.
metRidTypType of storage of ridges metrics: 0 for classic storage (before the MMG5_defsiz call), 1 for special storage (after this call).

Store elements which have worse quality than critmin in eltab, eltab is allocated and could contain mesh->ne elements.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SEARCHQUA(mesh,met,critmin,eltab,metridtyp)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
REAL(KIND=8), INTENT(IN) :: critmin
INTEGER,DIMENSION(*), INTENT(OUT) :: eltab
INTEGER, INTENT(IN) :: metridtyp
END SUBROUTINE

Definition at line 1056 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_constantSize()

int MMG3D_Set_constantSize ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure
metpointer toward the sol structure
Returns
1 if success

Compute constant size map according to mesh->info.hsiz, mesh->info.hmin and mesh->info.hmax. Update this 3 value if not compatible.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_CONSTANTSIZE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1341 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_corner()

int MMG3D_Set_corner ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kvertex index.
Returns
1.

Set corner at point pos.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1215 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_dparameter()

int MMG3D_Set_dparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  dparam,
double  val 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
dparamdouble parameter to set (see MMG3D_Param structure).
valvalue of the parameter.
Returns
0 if failed, 1 otherwise.

Set double parameter dparam at value val.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_DPARAMETER(mesh,sol,dparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: dparam
REAL(KIND=8), INTENT(IN) :: val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2341 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_edge()

int MMG3D_Set_edge ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
v0first extremity of the edge.
v1second extremity of the edge.
refedge reference.
posedge position in the mesh.
Returns
0 if failed, 1 otherwise.

Set edges of extremities v0, v1 and reference ref at position pos in mesh structure (from 1 to nb_edges included)

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_EDGE(mesh,v0,v1,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1090 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_edges()

int MMG3D_Set_edges ( MMG5_pMesh  mesh,
int *  edges,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
edgespointer toward the array of edges. Vertices of the $i^{th}$ edge are stored in edge[(i-1)*2]@2.
refsedges references. refs[i-1] is the ref of the $i^{th}$ edge.
Returns
0 if failed, 1 otherwise.

Set vertices and references of the mesh edges.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_EDGES(mesh,edges,refs,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: edges(*),refs(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1168 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_handGivenMesh()

void MMG3D_Set_handGivenMesh ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.

To mark as ended a mesh given without using the API functions (for example, mesh given by mesh->point[i] = 0 ...). Not recommanded.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_HANDGIVENMESH(mesh)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
END SUBROUTINE

Definition at line 1859 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_inputMeshName()

int MMG3D_Set_inputMeshName ( MMG5_pMesh  mesh,
const char *  meshin 
)
Parameters
meshpointer toward the mesh structure.
meshininput mesh name.
Returns
1.

Set the name of input mesh.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_INPUTMESHNAME(mesh,meshin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 63 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_inputSolName()

int MMG3D_Set_inputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solin 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
solinname of the input solution file.
Returns
1.

Set the name of input solution file.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_INPUTSOLNAME(mesh,sol,solin,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solin
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 68 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_iparameter()

int MMG3D_Set_iparameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  iparam,
int  val 
)

functions to set parameters

Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
iparaminteger parameter to set (see MMG3D_Param structure).
valvalue for the parameter.
Returns
0 if failed, 1 otherwise.

Set integer parameter iparam at value val.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_IPARAMETER(mesh,sol,iparam,val,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: iparam,val
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2104 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_ithSol_inSolsAtVertices()

int MMG3D_Set_ithSol_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s,
int  pos 
)
Parameters
solpointer toward the array of solutions
iposition of the solution field that we want to set.
ssolution(s) at mesh vertex pos.
posindex of the vertex on which we set the solution.
Returns
0 if failed, 1 otherwise.

Set values of the solution at the ith field of the solution array and at position pos (pos from 1 to nb_vertices included and i from 1 to nb_sols).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_ITHSOL_INSOLSATVERTICES(sol,i,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i,pos
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1746 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_ithSols_inSolsAtVertices()

int MMG3D_Set_ithSols_inSolsAtVertices ( MMG5_pSol  sol,
int  i,
double *  s 
)
Parameters
solpointer toward the array of solutions
iposition of the solution field that we want to set.
stable of the solutions at mesh vertices. The solution at vertex k is given by s[k-1] for a scalar sol, s[3*(k-1)]@3 for a vectorial solution and s[6*(k-1)]@6 for a tensor solution.
Returns
0 if failed, 1 otherwise.

Get values of the ith field of the solution array by array (i from 1 to nb_sols).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_ITHSOLS_INSOLSATVERTICES(sol,i,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: sol
INTEGER, INTENT(IN) :: i
REAL(KIND=8), DIMENSION(*),INTENT(OUT) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1803 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_localParameter()

int MMG3D_Set_localParameter ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  typ,
int  ref,
double  hmin,
double  hmax,
double  hausd 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
typtype of entity (triangle, edge,...).
refreference of the entity.
hminminimal edge size.
hmaxmaximal edge size.
hausdvalue of the Hausdorff number.
Returns
0 if failed, 1 otherwise.

Set local parameters: set the hausdorff value at val for all elements of type typ and reference ref.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_LOCALPARAMETER(mesh,sol,typ,ref,&
hmin,hmax,hausd,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typ,ref
REAL(KIND=8), INTENT(IN) :: hmin,hmax,hausd
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2404 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_meshSize()

int MMG3D_Set_meshSize ( MMG5_pMesh  mesh,
int  np,
int  ne,
int  nprism,
int  nt,
int  nquad,
int  na 
)
Parameters
meshpointer toward the mesh structure.
npnumber of vertices.
nenumber of tetrahedra.
nprismnumber of prisms.
ntnumber of triangles.
nquadnumber of quads.
nanumber of edges.
Returns
0 if failed, 1 otherwise.

Set the number of vertices, tetrahedra, prisms, triangles, quadrilaterals and edges of the mesh and allocate the associated tables. If call twice, reset the whole mesh to realloc it at the new size

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_MESHSIZE(mesh,np,ne,nprism,nt,nquad,na,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER :: np,ne,nprism,nt,nquad,na
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 258 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_multiMat()

int MMG3D_Set_multiMat ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  ref,
int  split,
int  rin,
int  rex 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
refinput tetra reference.
splitMMG5_MMAT_NoSplit if the entity must not be splitted, MMG5_MMAT_Split otherwise
rininternal reference after ls discretization
rexexternal reference after ls discretization
Returns
0 if failed, 1 otherwise.

Set the reference mapping for the elements of ref ref in ls discretization mode.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_MULTIMAT(mesh,sol,ref,split,rin,rex,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: ref,split,rin,rex
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 2477 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_normalAtVertex()

int MMG3D_Set_normalAtVertex ( MMG5_pMesh  mesh,
int  k,
double  n0,
double  n1,
double  n2 
)
Parameters
meshpointer toward the mesh structure.
kpoint index
n0x componant of the normal at point k.
n1y componant of the normal at point k.
n2z componant of the normal at point k.
Returns
1 if success.

Set normals (n0,n1,n2) at point k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_NORMALATVERTEX(mesh,k,n0,n1,n2,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
REAL(KIND=8), INTENT(IN) :: n0,n1,n2
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1372 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_outputMeshName()

int MMG3D_Set_outputMeshName ( MMG5_pMesh  mesh,
const char *  meshout 
)
Parameters
meshpointer toward the mesh structure.
meshoutname of the output mesh file.
Returns
1.

Set the name of output mesh file.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_OUTPUTMESHNAME(mesh,meshout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh
CHARACTER(LEN=*), INTENT(IN) :: meshout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 72 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_outputSolName()

int MMG3D_Set_outputSolName ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
const char *  solout 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
soloutname of the output solution file.
Returns
0 if failed, 1 otherwise.

Set the name of output solution file.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_OUTPUTSOLNAME(mesh,sol,solout,strlen0,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,sol
CHARACTER(LEN=*), INTENT(IN) :: solout
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 77 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_parallelTriangle()

int MMG3D_Set_parallelTriangle ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
ktriangle index.
Returns
1.

Set triangle k as parallel (triangle at the interface between two processors, ie, this triangle is required). (k from 1 to nb_tria included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_PARALLELTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1310 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_parallelTriangles()

int MMG3D_Set_parallelTriangles ( MMG5_pMesh  mesh,
int *  parIdx,
int  npar 
)
Parameters
meshpointer toward the mesh structure.
parIdxtable of the indices of the parallel trias.
nparnumber of triangles between processors.
Returns
1.

Set the parallel triangles (triangles at the interface between processors, ie this triangles are required).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: parIdx
INTEGER, INTENT(IN) :: npar
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1326 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_prism()

int MMG3D_Set_prism ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  v2,
int  v3,
int  v4,
int  v5,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
v0first vertex of prism.
v1second vertex of prism.
v2third vertex of prism.
v3fourth vertex of prism.
v4fifth vertex of prism.
v5sixth vertex of prism.
refprism reference.
posprism position in the mesh.
Returns
0 if failed, 1 otherwise.

Set prisms of vertices v0, v1,v2,v3,v4,v5 and reference ref at position pos in mesh structure (from 1 to nb_prisms included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_PRISM(mesh,v0,v1,v2,v3,v4,v5,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,v2,v3,v4,v5,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 709 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_prisms()

int MMG3D_Set_prisms ( MMG5_pMesh  mesh,
int *  prisms,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
prismsvertices of the prisms of the mesh Vertices of the $i^{th}$ prism are stored in prism[(i-1)*6]@6.
refstable of the prisms references. References of the $i^{th}$ prisms is stored in refs[i-1].
Returns
0 if failed, 1 otherwise.

Set vertices and references of the mesh prisms.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

! SUBROUTINE MMG3D_SET_PRISMS(mesh,prisms,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*), INTENT(IN) :: prisms,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 795 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_quadrilateral()

int MMG3D_Set_quadrilateral ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  v2,
int  v3,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
v0first vertex of quadrilateral.
v1second vertex of quadrilateral.
v2third vertex of quadrilateral.
v3fourth vertex of quadrilateral.
refquadrilateral reference.
posquadrilateral position in the mesh.
Returns
0 if failed, 1 otherwise.

Set quadrilateral of vertices v0, v1, v2, v3 and reference ref at position pos in mesh structure (from 1 to nb_quadrangles included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_QUADRILATERAL(mesh,v0,v1,v2,v3,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,v2,v3,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 973 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_quadrilaterals()

int MMG3D_Set_quadrilaterals ( MMG5_pMesh  mesh,
int *  quads,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
quadspointer toward the table of the quads vertices Vertices of the $i^{th}$ quadra are stored in quads[(i-1)*3]@3.
refspointer toward the table of the quadrilateral references. refs[i-1] is the ref of the $i^{th}$ quadra.
Returns
0 if failed, 1 otherwise.

Set vertices and references of the mesh quadrilaterals.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

! SUBROUTINE MMG3D_SET_QUADRILATERALS(mesh,quads,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER,DIMENSION(*), INTENT(IN) :: quads,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 1046 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredEdge()

int MMG3D_Set_requiredEdge ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kedge index.
Returns
1.

Set edge k as required.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1360 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTetrahedra()

int MMG3D_Set_requiredTetrahedra ( MMG5_pMesh  mesh,
int *  reqIdx,
int  nreq 
)
Parameters
meshpointer toward the mesh structure.
reqIdxtable of the indices of the required elements.
nreqnumber of required elements
Returns
1.

Set the required Tetra.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER, INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1252 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTetrahedron()

int MMG3D_Set_requiredTetrahedron ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kelement index.
Returns
1.

Set element k as required (k from 1 to nb_tetra included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDTETRAHEDRON(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1240 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTriangle()

int MMG3D_Set_requiredTriangle ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
ktriangle index.
Returns
1.

Set triangle k as required (k from 1 to nb_tria included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1272 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredTriangles()

int MMG3D_Set_requiredTriangles ( MMG5_pMesh  mesh,
int *  reqIdx,
int  nreq 
)
Parameters
meshpointer toward the mesh structure.
reqIdxtable of the indices of the required trias.
nreqnumber of required trias
Returns
1.

Set the required triangles

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER, INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1288 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_requiredVertex()

int MMG3D_Set_requiredVertex ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kvertex index.
Returns
1.

Set point k as required (k from 1 to nb_vertices included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1227 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_ridge()

int MMG3D_Set_ridge ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kedge index.
Returns
1.

Set ridge at edge k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_RIDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1348 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_scalarSol()

int MMG3D_Set_scalarSol ( MMG5_pSol  met,
double  s,
int  pos 
)
Parameters
metpointer toward the sol structure.
ssolution scalar value.
posposition of the solution in the mesh.
Returns
0 if failed, 1 otherwise.

Set scalar value s at position pos in solution structure (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_SCALARSOL(met,s,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: s
INTEGER, INTENT(IN) :: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1426 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_scalarSols()

int MMG3D_Set_scalarSols ( MMG5_pSol  met,
double *  s 
)
Parameters
metpointer toward the sol structure.
stable of the scalar solutions values. s[i-1] is the solution at vertex i.
Returns
0 if failed, 1 otherwise.

Set scalar solutions at mesh vertices.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_SCALARSOLS(met,s,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: s
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1490 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_solsAtVerticesSize()

int MMG3D_Set_solsAtVerticesSize ( MMG5_pMesh  mesh,
MMG5_pSol sol,
int  nsols,
int  nentities,
int *  typSol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward an allocatable sol structure.
nsolsnumber of solutions per entity
nentitiesnumber of vertices
typSolArray of size nsols listing the type of the solutions (scalar, vectorial...).
Returns
0 if failed, 1 otherwise.

Initialize an array of solutions field defined at vertices: set dimension, types and number of data. To use to initialize an array of solution fields (not used by Mmg itself).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_SOLSATVERTICESSIZE(mesh,sol,nsols,nentities,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: nsols,nentities
INTEGER, INTENT(IN) :: typSol(*)
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Sol tab allocation

Definition at line 155 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_solSize()

int MMG3D_Set_solSize ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
int  typEntity,
int  np,
int  typSol 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward the sol structure.
typEntitytype of solutions entities (vertices, triangles...).
npnumber of solutions.
typSoltype of solution (scalar, vectorial...).
Returns
0 if failed, 1 otherwise.

Initialize a solution field: set dimension, types and number of data. To use to initialize a metric, a level-set or a displacement field.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_SOLSIZE(mesh,sol,typEntity,np,typSol,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh,sol
INTEGER, INTENT(IN) :: typEntity,np,typSol
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 110 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tensorSol()

int MMG3D_Set_tensorSol ( MMG5_pSol  met,
double  m11,
double  m12,
double  m13,
double  m22,
double  m23,
double  m33,
int  pos 
)
Parameters
metpointer toward the sol structure.
m11value of the tensorial solution at position (1,1) in the tensor
m12value of the tensorial solution at position (1,2) in the tensor
m13value of the tensorial solution at position (1,3) in the tensor
m22value of the tensorial solution at position (2,2) in the tensor
m23value of the tensorial solution at position (2,3) in the tensor
m33value of the tensorial solution at position (3,3) in the tensor
posposition of the solution in the mesh (begin to 1).
Returns
0 if failed, 1 otherwise.

Set tensorial values at position pos in solution structure. (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_TENSORSOL(met,m11,m12,m13,m22,m23,m33,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: m11,m12,m13,m22,m23,m33
INTEGER, INTENT(IN) :: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1623 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tensorSols()

int MMG3D_Set_tensorSols ( MMG5_pSol  met,
double *  sols 
)
Parameters
metpointer toward the sol structure.
solstable of the tensorial solutions. sols[6*(i-1)]@6 is the solution at vertex i
Returns
0 if failed, 1 otherwise.

Set tensorial values by array.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_TENSORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1701 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_tetrahedra()

int MMG3D_Set_tetrahedra ( MMG5_pMesh  mesh,
int *  tetra,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
tetravertices of the tetras of the mesh Vertices of the $i^{th}$ tetra are stored in tetra[(i-1)*4]@4.
refstable of the tetrahedra references. References of the $i^{th}$ tetra is stored in refs[i-1].
Returns
0 if failed, 1 otherwise.

Set vertices and references of the mesh tetrahedra.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

! SUBROUTINE MMG3D_SET_TETRAHEDRA(mesh,tetra,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER, DIMENSION(*), INTENT(IN) :: tetra,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 628 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_tetrahedron()

int MMG3D_Set_tetrahedron ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  v2,
int  v3,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
v0first vertex of tetrahedron.
v1second vertex of tetrahedron.
v2third vertex of tetrahedron.
v3fourth vertex of tetrahedron.
reftetrahedron reference.
postetrahedron position in the mesh.
Returns
0 if failed, 1 otherwise.

Set tetrahedra of vertices v0, v1,v2,v3 and reference ref at position pos in mesh structure (from 1 to nb_tetra included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_TETRAHEDRON(mesh,v0,v1,v2,v3,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,v2,v3,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 515 of file API_functions_3d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_Set_triangle()

int MMG3D_Set_triangle ( MMG5_pMesh  mesh,
int  v0,
int  v1,
int  v2,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
v0first vertex of triangle.
v1second vertex of triangle.
v2third vertex of triangle.
reftriangle reference.
postriangle position in the mesh.
Returns
0 if failed, 1 otherwise.

Set triangle of vertices v0, v1, v2 and reference ref at position pos in mesh structure (from 1 to nb_triangle included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_TRIANGLE(mesh,v0,v1,v2,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: v0,v1,v2,ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 854 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_triangles()

int MMG3D_Set_triangles ( MMG5_pMesh  mesh,
int *  tria,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
triapointer toward the table of the tria vertices Vertices of the $i^{th}$ tria are stored in tria[(i-1)*3]@3.
refspointer toward the table of the triangle references. refs[i-1] is the ref of the $i^{th}$ tria.
Returns
0 if failed, 1 otherwise.

Set vertices and references of the mesh triangles.

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

! SUBROUTINE MMG3D_SET_TRIANGLES(mesh,tria,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! INTEGER,DIMENSION(*), INTENT(IN) :: tria,refs
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 930 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vectorSol()

int MMG3D_Set_vectorSol ( MMG5_pSol  met,
double  vx,
double  vy,
double  vz,
int  pos 
)
Parameters
metpointer toward the sol structure.
vxx value of the vectorial solution.
vyy value of the vectorial solution.
vzz value of the vectorial solution.
posposition of the solution in the mesh (begin to 1).
Returns
0 if failed, 1 otherwise.

Set vectorial value $(v_x,v_y,v_z)$ at position pos in solution structure. (pos from 1 to nb_vertices included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_VECTORSOL(met,vx,vy,vz,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8), INTENT(IN) :: vx,vy,vz
INTEGER, INTENT(IN) :: pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1516 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vectorSols()

int MMG3D_Set_vectorSols ( MMG5_pSol  met,
double *  sols 
)
Parameters
metpointer toward the sol structure.
solstable of the vectorial solutions sols[3*(i-1)]@3 is the solution at vertex i
Returns
0 if failed, 1 otherwise.

Set vectorial solutions at mesh vertices

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_VECTORSOLS(met,sols,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: met
REAL(KIND=8),DIMENSION(*), INTENT(IN) :: sols
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1585 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vertex()

int MMG3D_Set_vertex ( MMG5_pMesh  mesh,
double  c0,
double  c1,
double  c2,
int  ref,
int  pos 
)
Parameters
meshpointer toward the mesh structure.
c0coordinate of the point along the first dimension.
c1coordinate of the point along the second dimension.
c2coordinate of the point along the third dimension.
refpoint reference.
posposition of the point in the mesh.
Returns
1.

Set vertex of coordinates c0, c1,c2 and reference ref at position pos in mesh structure (from 1 to nb_vertices included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_SET_VERTEX(mesh,c0,c1,c2,ref,pos,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
REAL(KIND=8), INTENT(IN) :: c0,c1,c2
INTEGER, INTENT(IN) :: ref,pos
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 356 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Set_vertices()

int MMG3D_Set_vertices ( MMG5_pMesh  mesh,
double *  vertices,
int *  refs 
)
Parameters
meshpointer toward the mesh structure.
verticestable of the points coor. The coordinates of the $i^{th}$ point are stored in vertices[(i-1)*3]@3.
refstable of points references. The ref of the $i^th$ point is stored in refs[i-1].
Returns
1.

Set vertices coordinates and references in mesh structure

Remarks
Fortran interface: (commentated in order to allow to pass %val(0) instead of the refs array)

! SUBROUTINE MMG3D_SET_VERTICES(mesh,vertices,refs,retval)
! MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
! REAL(KIND=8), INTENT(IN) :: vertices(*)
! INTEGER,INTENT(IN) :: refs(*)
! INTEGER, INTENT(OUT) :: retval
! END SUBROUTINE

Definition at line 452 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_setfunc()

void MMG3D_setfunc ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)

To associate function pointers without calling MMG3D_mmg3dlib

Parameters
meshpointer toward the mesh structure (unused).
metpointer toward the sol structure (unused).

Set function pointers for caltet, lenedg, lenedgCoor defsiz, gradsiz... depending if the readed metric is anisotropic or isotropic

Remarks
Fortran interface:

SUBROUTINE MMG3D_SETFUNC(mesh,met)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
END SUBROUTINE

Definition at line 36 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_stockOptions()

int MMG3D_stockOptions ( MMG5_pMesh  mesh,
MMG5_Info info 
)
Parameters
meshpointer toward the mesh structure.
infopointer toward the info structure.
Returns
1.

Store the info structure in the mesh structure.

Remarks
Fortran interface:

SUBROUTINE MMG3D_STOCKOPTIONS(mesh,info,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,info
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 942 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_switch_metricStorage()

int MMG3D_switch_metricStorage ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure
metpointer toward the sol structure
Returns
1 if success

Switch the m22 and m23 value of the metric to allow to pass from the API storage to the medit one.

Remarks
Fortran interface:

SUBROUTINE MMG3D_SWITCH_METRICSTORAGE(mesh,met,retval)
MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh,met
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1366 of file libmmg3d_tools.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_corner()

int MMG3D_Unset_corner ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kvertex index.
Returns
1.

Remove corner attribute at point pos (from 1 to nb_vertices included).

Remarks
Fortran interface

SUBROUTINE MMG3D_UNSET_CORNER(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1221 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_parallelTriangle()

int MMG3D_Unset_parallelTriangle ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
ktriangle index.
Returns
1.

Remove parallel attribute from triangle k (ie tria aren't preserved anymore). (k from 1 to nb_tria included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1318 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_parallelTriangles()

int MMG3D_Unset_parallelTriangles ( MMG5_pMesh  mesh,
int *  parIdx,
int  npar 
)
Parameters
meshpointer toward the mesh structure.
parIdxtable of the indices of the parallel trias.
nparnumber of triangles between processors.
Returns
1.

Remove parallel attributes from triangles (ie tria aren't preserved anymore).

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_PARALLELTRIANGLES(mesh,parIdx,npar,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: parIdx
INTEGER, INTENT(IN) :: npar
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1337 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredEdge()

int MMG3D_Unset_requiredEdge ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kedge index.
Returns
1.

Remove required attribute from edge k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDEDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1366 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTetrahedra()

int MMG3D_Unset_requiredTetrahedra ( MMG5_pMesh  mesh,
int *  reqIdx,
int  nreq 
)
Parameters
meshpointer toward the mesh structure.
reqIdxtable of the indices of the required elements.
nreqnumber of required elements
Returns
1.

Remove required attribute from a list of Tetra whose indices are contained in array reqIdx.

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRA(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER, INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1262 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTetrahedron()

int MMG3D_Unset_requiredTetrahedron ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kelement index.
Returns
1.

Remove required attribute from element k (k from 1 to nb_tetra included).

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDTETRAHEDRON(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1246 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTriangle()

int MMG3D_Unset_requiredTriangle ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
ktriangle index.
Returns
1.

Remove required attribute from triangle k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDTRIANGLE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1280 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredTriangles()

int MMG3D_Unset_requiredTriangles ( MMG5_pMesh  mesh,
int *  reqIdx,
int  nreq 
)
Parameters
meshpointer toward the mesh structure.
reqIdxtable of the indices of the required trias.
nreqnumber of required trias
Returns
1.

Remove required attribute from triangles

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDTRIANGLES(mesh,reqIdx,nreq,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, DIMENSION(*),INTENT(IN) :: reqIdx
INTEGER, INTENT(IN) :: nreq
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1299 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_requiredVertex()

int MMG3D_Unset_requiredVertex ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kvertex index.
Returns
1.

Remove required attribute from point k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_REQUIREDVERTEX(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1234 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_Unset_ridge()

int MMG3D_Unset_ridge ( MMG5_pMesh  mesh,
int  k 
)
Parameters
meshpointer toward the mesh structure.
kedge index.
Returns
1.

Remove ridge attribute at edge k.

Remarks
Fortran interface:

SUBROUTINE MMG3D_UNSET_RIDGE(mesh,k,retval)
MMG5_DATA_PTR_T,INTENT(INOUT) :: mesh
INTEGER, INTENT(IN) :: k
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 1354 of file API_functions_3d.c.

Here is the caller graph for this function:

◆ MMG3D_usage()

int MMG3D_usage ( char *  prog)
Parameters
progpointer toward the program name.
return1 if success, 0 if fail.

Print help for mmg3d options.

Remarks
Fortran interface:

SUBROUTINE MMG3D_USAGE(prog,strlen0,retval)
CHARACTER(LEN=*), INTENT(IN) :: prog
INTEGER, INTENT(IN) :: strlen0
INTEGER, INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 119 of file libmmg3d_tools.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MMG3D_lenedgCoor

double(* MMG3D_lenedgCoor) (double *ca, double *cb, double *sa, double *sb)
Parameters
capointer toward the coordinates of the first edge's extremity.
cbpointer toward the coordinates of the second edge's extremity.
mapointer toward the metric associated to the first edge's extremity.
mbpointer toward the metric associated to the second edge's extremity.
Returns
edge length.

Compute length of edge $[ca,cb]$ (with ca and cb coordinates of edge extremities) according to the size prescription.

Remarks
Fortran interface:

SUBROUTINE MMG3D_LENEDGCOOR(ca,cb,sa,sb,retval)
REAL(KIND=8), INTENT(IN) :: ca,cb,sa,sb
REAL(KIND=8), INTENT(OUT) :: retval
END SUBROUTINE

Definition at line 4 of file mmg3dexterns.c.

MMG3D_Chk_meshData
int MMG3D_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Definition: API_functions_3d.c:1875
MMG3D_Set_iparameter
int MMG3D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, int val)
Definition: API_functions_3d.c:2104
MMG5_Sol::np
int np
Definition: libmmgtypes.h:636
MMG5_Point::c
double c[3]
Definition: libmmgtypes.h:253
MMG3D_IPARAM_mem
Definition: libmmg3d.h:70
MMG5_Sol
Definition: libmmgtypes.h:633
MMG5_ARG_ppDisp
#define MMG5_ARG_ppDisp
Definition: libmmgtypes.h:126
MMG5_Triangle
Definition: libmmgtypes.h:226
MMG3D_Set_meshSize
int MMG3D_Set_meshSize(MMG5_pMesh mesh, int np, int ne, int nprism, int nt, int nquad, int na)
Definition: API_functions_3d.c:258
main
int main(int argc, char *argv[])
Definition: mmg2d.c:654
MMG5_ARG_start
#define MMG5_ARG_start
Definition: libmmgtypes.h:87
MMG3D_IPARAM_numberOfLocalParam
Definition: libmmg3d.h:84
MMG3D_mmg3dmov
int MMG3D_mmg3dmov(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol disp)
Definition: libmmg3d.c:1482
MMG3D_loadMesh
int MMG3D_loadMesh(MMG5_pMesh mesh, const char *filename)
Definition: inout_3d.c:1187
MMG5_Mesh::point
MMG5_pPoint point
Definition: libmmgtypes.h:612
MMG3D_Set_handGivenMesh
void MMG3D_Set_handGivenMesh(MMG5_pMesh mesh)
Definition: API_functions_3d.c:1859
MMG5_Point::ref
int ref
Definition: libmmgtypes.h:258
MMG3D_saveSol
int MMG3D_saveSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Definition: inout_3d.c:2417
MMG3D_DPARAM_hmin
Definition: libmmg3d.h:93
MMG3D_DPARAM_hgrad
Definition: libmmg3d.h:97
MMG5_Sol::m
double * m
Definition: libmmgtypes.h:642
MMG5_ARG_end
#define MMG5_ARG_end
Definition: libmmgtypes.h:173
MMG3D_saveMesh
int MMG3D_saveMesh(MMG5_pMesh mesh, const char *filename)
Definition: inout_3d.c:1398
MMG5_STRONGFAILURE
#define MMG5_STRONGFAILURE
Definition: libmmgtypes.h:59
MMG3D_DPARAM_hmax
Definition: libmmg3d.h:94
MMG3D_Set_localParameter
int MMG3D_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, int ref, double hmin, double hmax, double hausd)
Definition: API_functions_3d.c:2404
MMG5_LOWFAILURE
#define MMG5_LOWFAILURE
Definition: libmmgtypes.h:51
MMG3D_Init_mesh
int MMG3D_Init_mesh(const int starter,...)
Definition: API_functions_3d.c:44
MMG5_Mesh::tetra
MMG5_pTetra tetra
Definition: libmmgtypes.h:614
MMG5_ARG_ppMesh
#define MMG5_ARG_ppMesh
Definition: libmmgtypes.h:96
MMG3D_Set_scalarSol
int MMG3D_Set_scalarSol(MMG5_pSol met, double s, int pos)
Definition: API_functions_3d.c:1426
MMG3D_Set_solSize
int MMG3D_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, int np, int typSol)
Definition: API_functions_3d.c:110
MMG5_Mesh
MMG mesh structure.
Definition: libmmgtypes.h:575
MMG3D_IPARAM_debug
Definition: libmmg3d.h:71
MMG5_ARG_ppMet
#define MMG5_ARG_ppMet
Definition: libmmgtypes.h:116
MMG3D_loadSol
int MMG3D_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Definition: inout_3d.c:2249
MMG3D_DPARAM_hausd
Definition: libmmg3d.h:96
MMG3D_Free_all
int MMG3D_Free_all(const int starter,...)
Definition: API_functions_3d.c:2486
MMG5_Tetra::ref
int ref
Definition: libmmgtypes.h:384
MMG3D_IPARAM_verbose
Definition: libmmg3d.h:69
MMG3D_mmg3dlib
int MMG3D_mmg3dlib(MMG5_pMesh mesh, MMG5_pSol met)
Definition: libmmg3d.c:970
MMG5_Scalar
Definition: libmmgtypes.h:213
MMG3D_Set_dparameter
int MMG3D_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
Definition: API_functions_3d.c:2341
ier
int ier
Definition: API_functionsf_2d.c:730
MMG3D_IPARAM_lag
Definition: libmmg3d.h:76
filename
MMG5_pMesh char * filename
Definition: API_functionsf_3d.c:1014
MMG5_Vertex
Definition: libmmgtypes.h:224
MMG5_Tetra::v
int v[4]
Definition: libmmgtypes.h:383