Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions
inout_s.c File Reference

Input / Output Functions. More...

#include "libmmgs.h"
#include "libmmgs_private.h"
#include <math.h>
Include dependency graph for inout_s.c:

Go to the source code of this file.

Functions

int MMGS_loadMesh (MMG5_pMesh mesh, const char *filename)
 
int MMGS_loadMshMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMGS_loadMshMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMGS_loadGenericMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMGS_saveMesh (MMG5_pMesh mesh, const char *filename)
 
int MMGS_saveMshMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 
int MMGS_saveMshMesh_and_allData (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMGS_loadSol (MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
 
int MMGS_loadAllSols (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMGS_saveSol (MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
 
int MMGS_saveAllSols (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
 
int MMGS_saveGenericMesh (MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
 

Detailed Description

Input / Output Functions.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5
Todo:
doxygen documentation.

Definition in file inout_s.c.

Function Documentation

◆ MMGS_loadAllSols()

int MMGS_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 MMGS_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 1382 of file inout_s.c.

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

◆ MMGS_loadGenericMesh()

int MMGS_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.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 759 of file inout_s.c.

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

◆ MMGS_loadMesh()

int MMGS_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 MMGS_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

Definition at line 41 of file inout_s.c.

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

◆ MMGS_loadMshMesh()

int MMGS_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 field at MSH file format (.msh extension). We read only low-order points, edges, tria, quad, tetra and prisms.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 640 of file inout_s.c.

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

◆ MMGS_loadMshMesh_and_allData()

int MMGS_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 MMGS_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 701 of file inout_s.c.

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

◆ MMGS_loadSol()

int MMGS_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
0 if failed, 1 otherwise.

Load metric field. The solution file (at medit file format) must contains only 1 solution: the metric.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 1307 of file inout_s.c.

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

◆ MMGS_saveAllSols()

int MMGS_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 in a solution file at medit file format.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 1515 of file inout_s.c.

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

◆ MMGS_saveGenericMesh()

int MMGS_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 MMGS_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 1604 of file inout_s.c.

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

◆ MMGS_saveMesh()

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

Save mesh data.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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

Definition at line 837 of file inout_s.c.

Here is the caller graph for this function:

◆ MMGS_saveMshMesh()

int MMGS_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 field at MSH file format (.msh extension). Save file at ASCII format for .msh extension, at binary format for .mshb one.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 1297 of file inout_s.c.

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

◆ MMGS_saveMshMesh_and_allData()

int MMGS_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 MMGS_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 1302 of file inout_s.c.

Here is the call graph for this function:

◆ MMGS_saveSol()

int MMGS_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 at medit file format.

Remarks
Fortran interface:

‍ SUBROUTINE MMGS_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 1478 of file inout_s.c.

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