92#include "mmg/mmgs/mmgs_export.h"
93#include "mmg/common/libmmgtypes.h"
347 MMG5_int nentities,
int *typSol);
398 double c2, MMG5_int ref, MMG5_int pos);
446 MMG5_int v2, MMG5_int ref,MMG5_int pos);
730 int *areRidges,
int *areRequired);
886 double m22,
double m23,
double m33, MMG5_int pos);
1055 double hmin,
double hmax,
double hausd);
1084 int split,MMG5_int rmin, MMG5_int rplus);
1176 MMG5_int* nentities,
int* typSol);
1208 int* isCorner,
int* isRequired);
1237 int* isCorner,
int* isRequired,MMG5_int idx);
1268 int* areCorners,
int* areRequired);
1297 MMG5_int* ref,
int* isRequired);
1353 int* isRidge,
int* isRequired);
1490 double *m22,
double *m23,
double *m33);
2324 MMG5_int* ref, MMG5_int idx);
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh char * filename
LIBMMGS_EXPORT int MMGS_loadMesh(MMG5_pMesh mesh, const char *filename)
Load a mesh (in .mesh/.mesb format) from file.
LIBMMGS_EXPORT int MMGS_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field vtu Vtk file format (.vtu extension).
LIBMMGS_EXPORT int MMGS_Get_adjaVerticesFast(MMG5_pMesh mesh, MMG5_int ip, MMG5_int start, MMG5_int lispoi[MMGS_LMAX])
Find adjacent vertices of a triangle.
LIBMMGS_EXPORT int MMGS_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
LIBMMGS_EXPORT int MMGS_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
LIBMMGS_EXPORT int MMGS_mmgslib(MMG5_pMesh mesh, MMG5_pSol met)
Main "program" for mesh adaptation.
LIBMMGS_EXPORT int MMGS_Get_adjaTri(MMG5_pMesh mesh, MMG5_int kel, MMG5_int listri[3])
Return adjacent triangles of a triangle.
LIBMMGS_EXPORT int MMGS_Set_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs)
Set the coordinates and references of all vertices in a mesh.
LIBMMGS_EXPORT int MMGS_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
Set the name of the output mesh file.
LIBMMGS_EXPORT int MMGS_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTU (VTK) format from file.
LIBMMGS_EXPORT int MMGS_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a vertex.
LIBMMGS_EXPORT int MMGS_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTP format.
LIBMMGS_EXPORT int MMGS_Unset_ridge(MMG5_pMesh mesh, MMG5_int k)
Remove the "ridge" attribute from an edge.
LIBMMGS_EXPORT int MMGS_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from an edge.
LIBMMGS_EXPORT int MMGS_Get_scalarSol(MMG5_pSol met, double *s)
Get the next element of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_mmgsls(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
Main "program" for level-set discretization.
LIBMMGS_EXPORT int MMGS_Get_nonBdyEdge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, MMG5_int idx)
Get vertices and reference of a non-boundary edge.
LIBMMGS_EXPORT int MMGS_Set_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Set all elements of one out of multiple solution fields that are defined on vertices.
LIBMMGS_EXPORT int MMGS_Set_ridge(MMG5_pMesh mesh, MMG5_int k)
Assign the "ridge" attribute to an edge.
LIBMMGS_EXPORT int MMGS_Get_scalarSols(MMG5_pSol met, double *s)
Get all elements of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs)
Set the vertices and references of all edges in a mesh.
LIBMMGS_EXPORT int MMGS_saveSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Write an isotropic or anisotropic metric in medit file format.
LIBMMGS_EXPORT int MMGS_Get_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs, int *areRidges, int *areRequired)
Get vertices, references and attributes of all edges in the mesh.
LIBMMGS_EXPORT int MMGS_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTP (VTK) format from file.
LIBMMGS_EXPORT int MMGS_Get_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired)
Get the vertices, references, and required attributes of all triangles in the mesh.
LIBMMGS_EXPORT int MMGS_Clean_isoSurf(MMG5_pMesh mesh)
Clean data (triangles and edges) linked to isosurface.
LIBMMGS_EXPORT int MMGS_loadAllSols(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load one or more solutions in a solution file in medit file format.
LIBMMGS_EXPORT int MMGS_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos)
Set a single element of a scalar solution structure.
LIBMMGS_EXPORT int MMGS_loadMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and all data from a file in MSH format.
LIBMMGS_EXPORT int MMGS_saveMshMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in MSH format, ascii or binary depending on the filename extensi...
LIBMMGS_EXPORT int MMGS_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to an edge.
LIBMMGS_EXPORT int MMGS_Get_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs, int *areCorners, int *areRequired)
Get the coordinates, references and attributes of all vertices in the mesh.
LIBMMGS_EXPORT int MMGS_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_Set_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double n0, double n1, double n2)
Set the normal orientation at a single vertex.
LIBMMGS_EXPORT int MMGS_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
Initialize an array of solution fields: set dimension, types and number of fields.
LIBMMGS_EXPORT int MMGS_Get_tensorSols(MMG5_pSol met, double *sols)
Get all elements of a tensor solution field.
LIBMMGS_EXPORT int MMGS_parsar(int argc, char *argv[], MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
Store command line arguments.
LIBMMGS_EXPORT int MMGS_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTK format from file.
LIBMMGS_EXPORT int MMGS_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int nentities, int *typSol)
Initialize an array of solution fields defined at vertices: set dimension, types and number of fields...
LIBMMGS_EXPORT int MMGS_Set_scalarSols(MMG5_pSol met, double *s)
Set the values of all elements of a scalar solution structure.
LIBMMGS_EXPORT void MMGS_destockOptions(MMG5_pMesh mesh, MMG5_Info *info)
Recover the info structure stored in the mesh structure.
LIBMMGS_EXPORT int MMGS_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field in Vtk file format (.vtk extension).
LIBMMGS_EXPORT int MMGS_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a triangle.
LIBMMGS_EXPORT int(* MMGS_doSol)(MMG5_pMesh mesh, MMG5_pSol met)
Compute an isotropic size map according to the mean of the length of the edges passing through a vert...
LIBMMGS_EXPORT int MMGS_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
Set the name of the input parameter file.
LIBMMGS_EXPORT int MMGS_saveAllSols(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save one or more solutions in a solution file in medit file format.
LIBMMGS_EXPORT int MMGS_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol)
Get the number of elements, dimension, and type of a solution.
LIBMMGS_EXPORT int MMGS_Set_tensorSols(MMG5_pSol met, double *sols)
Set all elements of a tensor solution structure.
LIBMMGS_EXPORT void MMGS_setfunc(MMG5_pMesh mesh, MMG5_pSol met)
Set function pointers for caltet, lenedg, defsiz and gradsiz.
LIBMMGS_EXPORT void MMGS_Set_commonFunc(void)
Set common function pointers between mmgs and mmg3d to the matching mmgs functions.
LIBMMGS_EXPORT int MMGS_Get_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Get one out of several solutions at all vertices in the mesh.
LIBMMGS_EXPORT int MMGS_stockOptions(MMG5_pMesh mesh, MMG5_Info *info)
Store the info structure in the mesh structure.
LIBMMGS_EXPORT int MMGS_saveMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field in MSH file format (.msh extension).
LIBMMGS_EXPORT int MMGS_Get_meshSize(MMG5_pMesh mesh, MMG5_int *np, MMG5_int *nt, MMG5_int *na)
Get the number of vertices, triangles, and edges of the mesh.
LIBMMGS_EXPORT int MMGS_Get_triangle(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *ref, int *isRequired)
Get the vertices, reference, and required attribute of the next triangle in the mesh.
LIBMMGS_EXPORT int MMGS_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of one edge in the mesh.
LIBMMGS_EXPORT int MMGS_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
set an integer parameter of the remesher
LIBMMGS_EXPORT void MMGS_Free_solutions(MMG5_pMesh mesh, MMG5_pSol sol)
Free a solution.
LIBMMGS_EXPORT int MMGS_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Write a mesh and multiple data fields in vtu Vtk file format (.vtu extension).
LIBMMGS_EXPORT int MMGS_loadSol(MMG5_pMesh mesh, MMG5_pSol met, const char *filename)
Load a metric field (or other solution) in medit's .sol format.
LIBMMGS_EXPORT int MMGS_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *nentities, int *typSol)
Get the number of elements, type, and dimensions of several solutions defined on vertices.
LIBMMGS_EXPORT int MMGS_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m13, double *m22, double *m23, double *m33)
Get the next element of a tensor solution structure.
LIBMMGS_EXPORT int MMGS_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
LIBMMGS_EXPORT int MMGS_Set_tensorSol(MMG5_pSol met, double m11, double m12, double m13, double m22, double m23, double m33, MMG5_int pos)
Set a single element of a tensor solution structure.
LIBMMGS_EXPORT int MMGS_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
Set a new level-set base reference.
LIBMMGS_EXPORT int MMGS_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int ref, MMG5_int pos)
Set the coordinates and reference of a single triangle.
LIBMMGS_EXPORT int MMGS_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTU (VTK) format from file.
LIBMMGS_EXPORT int MMGS_Set_vectorSol(MMG5_pSol met, double vx, double vy, double vz, MMG5_int pos)
Set a single element of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Set_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Set a single element of one out of multiple solution fields that are defined on vertices.
LIBMMGS_EXPORT void MMGS_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
LIBMMGS_EXPORT int MMGS_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Get one out of several solutions at a specific vertex.
LIBMMGS_EXPORT int MMGS_GetByIdx_vertex(MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx)
Get the coordinates and reference of a specific vertex in the mesh.
LIBMMGS_EXPORT int MMGS_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
Set the name of the input mesh.
LIBMMGS_EXPORT int MMGS_Get_vectorSol(MMG5_pSol met, double *vx, double *vy, double *vz)
Get the next element of a vector solution structure.
LIBMMGS_EXPORT int MMGS_defaultValues(MMG5_pMesh mesh)
Print the default parameter values.
LIBMMGS_EXPORT int MMGS_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the numbers of given entities match with mesh and solution size and check mesh data.
LIBMMGS_EXPORT int MMGS_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and optionally a solution in VTP (VTK) format from file.
LIBMMGS_EXPORT int MMGS_loadGenericMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and all data from a file. The format will be guessed from the filename extension.
LIBMMGS_EXPORT int MMGS_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTK format from file.
LIBMMGS_EXPORT int MMGS_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
set a real-valued parameter of the remesher
LIBMMGS_EXPORT int MMGS_Get_iparameter(MMG5_pMesh mesh, MMG5_int iparam)
Get the value of an integer parameter of the remesher.
LIBMMGS_EXPORT int MMGS_Get_vectorSols(MMG5_pSol met, double *sols)
Get all elements of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Set_corner(MMG5_pMesh mesh, MMG5_int k)
Assign the "corner" attribute to a vertex.
LIBMMGS_EXPORT int MMGS_Free_all(const int starter,...)
Deallocations before return.
LIBMMGS_EXPORT int MMGS_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rmin, MMG5_int rplus)
Set the reference mapping for the elements of reference ref in level-set discretization mode.
LIBMMGS_EXPORT int MMGS_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTP format.
LIBMMGS_EXPORT int MMGS_saveMesh(MMG5_pMesh mesh, const char *filename)
Save a mesh in .mesh or .meshb format.
double MMGS_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k)
Get the quality measure of a triangle.
LIBMMGS_EXPORT int MMGS_Get_edge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, int *isRidge, int *isRequired)
Get the vertices, reference, and attributes of the next edge in the mesh.
LIBMMGS_EXPORT int MMGS_Free_structures(const int starter,...)
Structure deallocations before return.
LIBMMGS_EXPORT int MMGS_Free_allSols(MMG5_pMesh mesh, MMG5_pSol *sol)
Deallocate an array of solution fields.
LIBMMGS_EXPORT int MMGS_Set_vertex(MMG5_pMesh mesh, double c0, double c1, double c2, MMG5_int ref, MMG5_int pos)
Set the coordinates of a single vertex.
LIBMMGS_EXPORT int MMGS_Set_vectorSols(MMG5_pSol met, double *sols)
Set all elements of a vector solution structure.
LIBMMGS_EXPORT int MMGS_Get_numberOfNonBdyEdges(MMG5_pMesh mesh, MMG5_int *nb_edges)
Get the number of non-boundary edges.
LIBMMGS_EXPORT int MMGS_Free_names(const int starter,...)
Structure deallocations before return.
LIBMMGS_EXPORT int MMGS_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
set a local parameter
LIBMMGS_EXPORT int MMGS_Get_vertex(MMG5_pMesh mesh, double *c0, double *c1, double *c2, MMG5_int *ref, int *isCorner, int *isRequired)
Get the coordinates c0, c1,c2 and reference ref of the next vertex of mesh.
LIBMMGS_EXPORT int MMGS_loadMshMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in .msh format from file.
LIBMMGS_EXPORT int MMGS_usage(char *prog)
Print help for mmgs options.
LIBMMGS_EXPORT int MMGS_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
Set the vertices and references of all triangles in the mesh.
LIBMMGS_EXPORT int MMGS_Set_constantSize(MMG5_pMesh mesh, MMG5_pSol met)
Compute a constant size map.
LIBMMGS_EXPORT int MMGS_Get_normalAtVertex(MMG5_pMesh mesh, MMG5_int k, double *n0, double *n1, double *n2)
Get the normal orientation at an edge.
MMGS_Param
Input parameters for mmg library.
@ MMGS_IPARAM_numberOfLocalParam
@ MMGS_IPARAM_numsubdomain
@ MMGS_DPARAM_angleDetection
@ MMGS_IPARAM_numberOfLSBaseReferences
@ MMGS_IPARAM_numberOfMat
LIBMMGS_EXPORT int MMGS_Compute_eigenv(double m[6], double lambda[3], double vp[3][3])
Compute the real eigenvalues and eigenvectors of a symmetric matrix.
LIBMMGS_EXPORT int MMGS_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
LIBMMGS_EXPORT int MMGS_Unset_corner(MMG5_pMesh mesh, MMG5_int k)
Remove the "corner" attribute from a vertex.
LIBMMGS_EXPORT int MMGS_saveGenericMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save mesh data in a file whose format depends on the filename extension.
LIBMMGS_EXPORT int MMGS_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int na)
Set the number of vertices, triangles and edges of the mesh and allocate the associated tables.
LIBMMGS_EXPORT void MMGS_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters.
Structure to store input parameters of the job.