122 fprintf(stderr,
"\n ## Warning: %s: maximal memory authorized must"
123 " be strictly positive.\n",__func__);
124 fprintf(stderr,
" Reset to default value.\n");
145 fprintf(stderr,
"\n ## Warning: %s: angle detection parameter"
146 " set to default value\n",__func__);
167 if ( val < 0 || val > 2 )
176 fprintf(stderr,
"\n ## Error: %s"
177 " \"lagrangian motion\" option unavailable (-lag):\n"
178 " set the USE_ELAS CMake's flag to ON when compiling the mmg3d"
179 " library to enable this feature.\n",__func__);
217 fprintf(stderr,
"\n ## Warning: %s: new local parameter values\n",__func__);
224 printf(
" Exit program.\n");
228 MMG5_int inival = MMG5_INTMAX;
242 fprintf(stderr,
"\n ## Warning: %s: new level-set based references values\n",__func__);
247 printf(
" Exit program.\n");
260 fprintf(stderr,
"\n ## Warning: %s: new multi materials values\n",__func__);
266 printf(
" Exit program.\n");
275 fprintf(stderr,
"\n ## Error: %s: unknown type of parameter\n",__func__);
296 fprintf(stderr,
"\n ## Error: hmin value must be strictly lower than hmax one"
301 fprintf(stderr,
"\n ## Error: hmin must be strictly positive "
302 "(minimal edge length).\n");
311 fprintf(stderr,
"\n ## Error: hmin value must be strictly lower than hmax one"
316 fprintf(stderr,
"\n ## Error: hmax must be strictly positive "
317 "(maximal edge length).\n");
345 fprintf(stderr,
"\n ## Error: %s: hausdorff number must be"
346 " strictly positive.\n",__func__);
356 if (val < 0.0 || val > 1.0) {
357 fprintf(stderr,
"\n ## Error: %s: Coordinate regularization parameter must be comprised between 0 and 1.\n",__func__);
373 fprintf(stderr,
"\n ## Error: %s: unknown type of parameter\n",
381 double hmin,
double hmax,
double hausd){
386 fprintf(stderr,
"\n ## Error: %s: You must set the number of local"
387 " parameters",__func__);
388 fprintf(stderr,
" with the MMG2D_Set_iparameters function before setting");
389 fprintf(stderr,
" values in local parameters structure. \n");
393 fprintf(stderr,
"\n ## Error: %s: unable to set a new local parameter.\n",
395 fprintf(stderr,
" max number of local parameters: %d\n",
mesh->
info.
npar);
399 fprintf(stderr,
"\n ## Warning: %s: you must apply your local parameters",
401 fprintf(stderr,
" on triangles (MMG5_Triangle or %d) or edges"
403 fprintf(stderr,
"\n ## Unknown type of entity: ignored.\n");
407 fprintf(stderr,
"\n ## Error: %s: negative references are not allowed.\n",
412 fprintf(stderr,
"\n ## Error: %s: negative hmin value is not allowed.\n",
417 fprintf(stderr,
"\n ## Error: %s: negative hmax value is not allowed.\n",
422 fprintf(stderr,
"\n ## Error: %s: negative hausd value is not allowed.\n",
430 if ( par->
elt == typ && par->
ref == ref ) {
435 fprintf(stderr,
"\n ## Warning: %s: new parameters (hausd, hmin and hmax)",
437 fprintf(stderr,
" for entities of type %d and of ref %" MMG5_PRId
"\n",typ,ref);
458 fprintf(stderr,
"\n ## Error: %s: unexpected entity type: %s.\n",
469 int split,MMG5_int rin,MMG5_int rout){
482 fprintf(stderr,
"\n ## Warning: %s: old mesh deletion.\n",__func__);
506 fprintf(stderr,
"\n ## Error: %s: not enough memory (%d).\n",
523 fprintf(stderr,
"\n ## Warning: %s: old solution deletion.\n",__func__);
526 fprintf(stderr,
"\n ## Error: %s: mmg2d need a solution imposed on vertices.\n",
543 fprintf(stderr,
"\n ## Error: %s: type of solution not yet implemented.\n",
557 printf(
" Exit program.\n");
565 MMG5_int np,
int *typSol) {
572 fprintf(stderr,
"\n ## Warning: %s: old solutions array deletion.\n",
585 for ( j=0; j<nsols; ++j ) {
590 sprintf(data,
"sol_%d",j);
595 sprintf(data,
"sol_%d.o",j);
601 fprintf(stderr,
"\n ## Error: %s: unable to set the size of the"
602 " solution num %d.\n",__func__,j);
612 if ( typEntity != NULL )
615 if ( typSol != NULL ) {
616 if (
sol->size == 1 )
618 else if (
sol->size == 2 )
620 else if (
sol->size == 3 )
635 MMG5_int* np,
int* typSol) {
640 fprintf(stderr,
"\n ## Error: %s: your mesh structure must be allocated"
641 " and filled\n",__func__);
651 if ( typSol != NULL ) {
652 typSol[j] = psl->
type;
678 for (k=1; k<=
mesh->
na; k++) {
690 fprintf(stderr,
"\n ## Error: %s: you must set the number of points with the",
692 fprintf(stderr,
" MMG2D_Set_meshSize function before setting vertices in mesh\n");
697 fprintf(stderr,
"\n ## Error: %s: unable to allocate a new point.\n",
699 fprintf(stderr,
" max number of points: %" MMG5_PRId
"\n",
mesh->
npmax);
705 fprintf(stderr,
"\n ## Error: %s: attempt to set new vertex at position %" MMG5_PRId
".",
707 fprintf(stderr,
" Overflow of the given number of vertices: %" MMG5_PRId
"\n",
mesh->
np);
708 fprintf(stderr,
" ## Check the mesh size, its compactness or the position");
709 fprintf(stderr,
" of the vertex.\n");
728 assert ( k <= mesh->np );
734 assert ( k <= mesh->np );
740 assert ( k <= mesh->np );
747 assert ( k <= mesh->np );
753 int* isCorner,
int* isRequired) {
758 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of points.\n",
760 fprintf(stderr,
" You must pass here exactly one time (the first time ");
761 fprintf(stderr,
"you call the MMG2D_Get_vertex function).\n");
762 fprintf(stderr,
" If not, the number of call of this function");
763 fprintf(stderr,
" exceed the number of points: %" MMG5_PRId
"\n ",
mesh->
np);
770 fprintf(stderr,
" ## Error: %s: unable to get point.\n",__func__);
771 fprintf(stderr,
" The number of call of MMG2D_Get_vertex function");
772 fprintf(stderr,
" exceed the number of points: %" MMG5_PRId
"\n ",
mesh->
np);
780 int* isCorner,
int* isRequired, MMG5_int idx) {
782 if ( idx < 1 || idx >
mesh->
np ) {
783 fprintf(stderr,
"\n ## Error: %s: unable to get point at position %" MMG5_PRId
".\n",
785 fprintf(stderr,
" Your vertices numbering goes from 1 to %" MMG5_PRId
"\n",
mesh->
np);
794 if ( isCorner != NULL ) {
801 if ( isRequired != NULL ) {
821 ppt->
c[0] = vertices[j];
822 ppt->
c[1] = vertices[j+1];
828 ppt->
ref = refs[i-1];
840 int* areCorners,
int* areRequired) {
849 vertices[j] = ppt->
c[0];
850 vertices[j+1] = ppt->
c[1];
856 if ( areCorners !=NULL ) {
863 if ( areRequired != NULL ) {
882 fprintf(stderr,
" ## Error: %s: You must set the number of elements with the",
884 fprintf(stderr,
" MMG2D_Set_meshSize function before setting elements in mesh\n");
889 fprintf(stderr,
" ## Error: %s: unable to allocate a new element.\n",
891 fprintf(stderr,
" max number of element: %" MMG5_PRId
"\n",
mesh->
ntmax);
897 fprintf(stderr,
"\n ## Error: %s: attempt to set new triangle at position %" MMG5_PRId
".",
899 fprintf(stderr,
" Overflow of the given number of triangle: %" MMG5_PRId
"\n",
mesh->
nt);
900 fprintf(stderr,
" ## Check the mesh size, its compactness or the position");
901 fprintf(stderr,
" of the triangle.\n");
922 fprintf(stderr,
"\n ## Error: %s: triangle %" MMG5_PRId
" has null area.\n",
924 for ( ip=0; ip<3; ip++ ) {
926 for ( j=0; j<3; j++ ) {
927 if ( fabs(ppt->
c[j])>0. ) {
928 fprintf(stderr,
" Check that you don't have a sliver triangle.\n");
942 fprintf(stderr,
"\n ## Warning: %s: %" MMG5_PRId
" triangles reoriented\n",
953 assert ( k <= mesh->nt );
966 assert ( k <= mesh->nt );
969 pt->
tag[0] &= ~MG_REQ;
970 pt->
tag[1] &= ~MG_REQ;
971 pt->
tag[2] &= ~MG_REQ;
983 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of"
984 " triangles.\n",__func__);
985 fprintf(stderr,
" You must pass here exactly one time (the first time ");
986 fprintf(stderr,
"you call the MMG2D_Get_triangle function).\n");
987 fprintf(stderr,
" If not, the number of call of this function");
988 fprintf(stderr,
" exceed the number of triangles: %" MMG5_PRId
"\n ",
mesh->
nt);
995 fprintf(stderr,
"\n ## Error: %s: unable to get triangle.\n",
997 fprintf(stderr,
" The number of call of MMG2D_Get_triangle function");
998 fprintf(stderr,
" can not exceed the number of triangles: %" MMG5_PRId
"\n ",
mesh->
nt);
1010 if ( isRequired != NULL ) {
1029 for (i=1;i<=
mesh->
nt;i++)
1033 ptt->
v[0] = tria[j] ;
1034 ptt->
v[1] = tria[j+1];
1035 ptt->
v[2] = tria[j+2];
1037 ptt->
ref = refs[i-1];
1044 for( ii=0 ; ii<3 ; ii++)
1051 fprintf(stderr,
"\n ## Error: %s: triangle %" MMG5_PRId
" has null area.\n",
1053 for ( ip=0; ip<3; ip++ ) {
1056 for ( jj=0; jj<3; jj++ ) {
1057 if ( fabs(ppt->
c[jj])>0. ) {
1058 fprintf(stderr,
" Check that you don't have a sliver triangle.\n");
1066 ptt->
v[2] = ptt->
v[1];
1072 fprintf(stderr,
"\n ## Warning: %s: %" MMG5_PRId
" triangles reoriented\n",
1084 for (i=1;i<=
mesh->
nt;i++)
1088 tria[j] = ptt->
v[0];
1089 tria[j+1] = ptt->
v[1];
1090 tria[j+2] = ptt->
v[2];
1093 refs[i-1] = ptt->
ref ;
1094 if ( areRequired != NULL ) {
1097 areRequired[i-1] = 1;
1099 areRequired[i-1] = 0;
1109 fprintf(stderr,
"\n ## Error: %s: You must set the number of quadrilaterals with the",
1111 fprintf(stderr,
" MMG2D_Set_meshSize function before setting elements in mesh\n");
1116 fprintf(stderr,
"\n ## Error: %s: attempt to set new quad at position %" MMG5_PRId
".",
1118 fprintf(stderr,
" Overflow of the given number of quads: %" MMG5_PRId
"\n",
mesh->
nquad);
1119 fprintf(stderr,
"\n ## Check the mesh size, its compactness or the position");
1120 fprintf(stderr,
" of the quad.\n");
1140 MMG5_int* ref,
int* isRequired) {
1141 static MMG5_int nqi = 0;
1146 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of"
1147 " quadrilaterals.\n",__func__);
1148 fprintf(stderr,
" You must pass here exactly one time (the first time ");
1149 fprintf(stderr,
"you call the MMG2D_Get_quadrilateral function).\n");
1150 fprintf(stderr,
" If not, the number of call of this function");
1151 fprintf(stderr,
" exceed the number of quadrilaterals: %" MMG5_PRId
"\n ",
mesh->
nquad);
1158 fprintf(stderr,
"\n ## Error: %s: unable to get quadra.\n",__func__);
1159 fprintf(stderr,
" The number of call of MMG2D_Get_quadrilateral function");
1160 fprintf(stderr,
" can not exceed the number of quadra: %" MMG5_PRId
"\n ",
mesh->
nquad);
1169 if ( ref != NULL ) {
1173 if ( isRequired != NULL ) {
1193 pq->
v[0] = quadra[j];
1194 pq->
v[1] = quadra[j+1];
1195 pq->
v[2] = quadra[j+2];
1196 pq->
v[3] = quadra[j+3];
1199 pq->
ref = refs[i-1];
1218 quadra[j] = pq->
v[0];
1219 quadra[j+1] = pq->
v[1];
1220 quadra[j+2] = pq->
v[2];
1221 quadra[j+3] = pq->
v[3];
1224 refs[i-1] = pq->
ref ;
1226 if ( areRequired != NULL ) {
1229 areRequired[i-1] = 1;
1232 areRequired[i-1] = 0;
1244 fprintf(stderr,
"\n ## Error: %s: you must set the number of elements"
1245 " with the",__func__);
1246 fprintf(stderr,
" MMG2D_Set_meshSize function before setting elements in mesh\n");
1251 fprintf(stderr,
"\n ## Error: %s: attempt to set new edge at position %" MMG5_PRId
".",
1253 fprintf(stderr,
" Overflow of the given number of edge: %" MMG5_PRId
"\n",
mesh->
na);
1254 fprintf(stderr,
" ## Check the mesh size, its compactness or the position");
1255 fprintf(stderr,
" of the edge.\n");
1274 assert ( k <= mesh->na );
1286 assert ( k <= mesh->na );
1290 ped->
tag &= ~MG_REQ;
1299 assert ( k <= mesh->na );
1314 ,
int* isRidge,
int* isRequired) {
1320 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of edges.\n",
1322 fprintf(stderr,
" You must pass here exactly one time (the first time ");
1323 fprintf(stderr,
"you call the MMG2D_Get_edge function).\n");
1324 fprintf(stderr,
" If not, the number of call of this function");
1325 fprintf(stderr,
" exceed the number of edges.\n ");
1326 fprintf(stderr,
" Please, call the MMG2D_Get_meshSize function to get"
1327 " this number.\n ");
1334 fprintf(stderr,
"\n ## Error: %s: unable to get edge.\n",__func__);
1335 fprintf(stderr,
" The number of call of MMG2D_Get_edge function");
1336 fprintf(stderr,
" can not exceed the number of edges: %" MMG5_PRId
"\n ",
mesh->
na);
1352 if ( isRidge != NULL ) {
1359 if ( isRequired != NULL ) {
1372 for (i=1;i<=
mesh->
na;i++)
1392 for (i=1;i<=
mesh->
na;i++)
1401 if ( areRidges != NULL ) {
1408 if ( areRequired != NULL ) {
1410 areRequired[i-1] = 1;
1412 areRequired[i-1] = 0;
1423 if ( k < 1 || k >
mesh->
nt ) {
1424 fprintf(stderr,
"\n ## Error: %s: unable to access to triangle %" MMG5_PRId
".\n",
1426 fprintf(stderr,
" Tria numbering goes from 1 to %" MMG5_PRId
"\n",
mesh->
nt);
1432 if ( (!met) || (!met->
m) || met->
size==1 ) {
1446 fprintf(stderr,
"\n ## Error: %s: You must set the number of"
1447 " solution with the",__func__);
1448 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1449 fprintf(stderr,
" in solution structure \n");
1453 if ( pos >= met->
npmax ) {
1454 fprintf(stderr,
"\n ## Error: %s: unable to set a new solution.\n",
1456 fprintf(stderr,
" max number of solutions: %" MMG5_PRId
"\n",met->
npmax);
1460 if ( pos > met->
np ) {
1461 fprintf(stderr,
"\n ## Error: %s: attempt to set new solution"
1462 " at position %" MMG5_PRId
".",__func__,pos);
1463 fprintf(stderr,
" Overflow of the given number of solutions: %" MMG5_PRId
"\n",met->
np);
1464 fprintf(stderr,
" ## Check the solution size, its compactness or the position");
1465 fprintf(stderr,
" of the solution.\n");
1477 if ( met->
npi == met->
np ) {
1480 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter"
1481 " of points.\n",__func__);
1482 fprintf(stderr,
" You must pass here exactly one time (the first time ");
1483 fprintf(stderr,
"you call the MMG2D_Get_scalarSol function).\n");
1484 fprintf(stderr,
" If not, the number of call of this function");
1485 fprintf(stderr,
" exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1491 if ( met->
npi > met->
np ) {
1492 fprintf(stderr,
"\n ## Error: %s: unable to get solution.\n",
1494 fprintf(stderr,
" The number of call of MMG2D_Get_scalarSol function");
1495 fprintf(stderr,
" can not exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1499 *s = met->
m[met->
npi];
1508 fprintf(stderr,
"\n ## Error: %s: you must set the number of"
1509 " solution with the",__func__);
1510 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1511 fprintf(stderr,
" in solution structure \n");
1515 for ( k=0; k<met->
np; ++k )
1524 for ( k=0; k<met->
np; ++k )
1534 fprintf(stderr,
"\n ## Error: %s: you must set the number of"
1535 " solution with the",__func__);
1536 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1537 fprintf(stderr,
" in solution structure \n");
1541 fprintf(stderr,
"\n ## Error: %s: unable to set a new solution.\n",
1543 fprintf(stderr,
" Minimal index of the solution position must be 1.\n");
1546 if ( pos >= met->
npmax ) {
1547 fprintf(stderr,
"\n ## Error: %s: unable to set a new solution.\n",
1549 fprintf(stderr,
" max number of solutions: %" MMG5_PRId
"\n",met->
npmax);
1553 if ( pos > met->
np ) {
1554 fprintf(stderr,
"\n ## Error: %s: attempt to set new solution"
1555 " at position %" MMG5_PRId
".",__func__,pos);
1556 fprintf(stderr,
" Overflow of the given number of solutions: %" MMG5_PRId
"\n",met->
np);
1557 fprintf(stderr,
"\n ## Check the solution size, its compactness or the position");
1558 fprintf(stderr,
" of the solution.\n");
1562 isol = (pos-1) * met->
size + 1;
1565 met->
m[isol+1] = vy;
1575 if ( met->
npi == met->
np ) {
1578 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of points.\n",
1580 fprintf(stderr,
" You must pass here exactly one time (the first time ");
1581 fprintf(stderr,
"you call the MMG2D_Get_vectorSol function).\n");
1582 fprintf(stderr,
" If not, the number of call of this function");
1583 fprintf(stderr,
" exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1589 if ( met->
npi > met->
np ) {
1590 fprintf(stderr,
"\n ## Error: %s: unable to get solution.\n",__func__);
1591 fprintf(stderr,
" The number of call of MMG2D_Get_vectorSol function");
1592 fprintf(stderr,
" can not exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1596 *vx = met->
m[met->
size*(met->
npi-1)+1];
1597 *vy = met->
m[met->
size*(met->
npi-1)+2];
1607 fprintf(stderr,
"\n ## Error: %s: you must set the number of"
1608 " solution with the",__func__);
1609 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1610 fprintf(stderr,
" in solution structure \n");
1614 for ( k=0; k<met->
np; ++k ) {
1628 for ( k=0; k<met->
np; ++k ) {
1645 fprintf(stderr,
"\n ## Error: %s: you must set the number of"
1646 " solution with the",__func__);
1647 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1648 fprintf(stderr,
" in solution structure \n");
1652 if ( pos >= met->
npmax ) {
1653 fprintf(stderr,
"\n ## Error: %s: unable to set a new solution.\n",
1655 fprintf(stderr,
" max number of solutions: %" MMG5_PRId
"\n",met->
npmax);
1659 if ( pos > met->
np ) {
1660 fprintf(stderr,
"\n ## Error: %s: attempt to set new solution "
1661 "at position %" MMG5_PRId
".",__func__,pos);
1662 fprintf(stderr,
" Overflow of the given number of solutions: %" MMG5_PRId
"\n",met->
np);
1663 fprintf(stderr,
" ## Check the solution size, its compactness or the position");
1664 fprintf(stderr,
" of the solution.\n");
1667 isol = pos * met->
size;
1668 met->
m[isol ] = m11;
1669 met->
m[isol + 1] = m12;
1670 met->
m[isol + 2] = m22;
1679 if ( met->
npi == met->
np ) {
1682 fprintf(stderr,
"\n ## Warning: %s: reset the internal counter of points.\n",
1684 fprintf(stderr,
" You must pass here exactly one time (the first time ");
1685 fprintf(stderr,
"you call the MMG2D_Get_tensorSol function).\n");
1686 fprintf(stderr,
" If not, the number of call of this function");
1687 fprintf(stderr,
" exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1693 if ( met->
npi > met->
np ) {
1694 fprintf(stderr,
"\n ## Error: %s: unable to get solution.\n",__func__);
1695 fprintf(stderr,
" The number of call of MMG2D_Get_tensorSol function");
1696 fprintf(stderr,
" can not exceed the number of points: %" MMG5_PRId
"\n ",met->
np);
1701 *m11 = met->
m[isol ];
1702 *m12 = met->
m[isol+1];
1703 *m22 = met->
m[isol+2];
1713 fprintf(stderr,
"\n ## Error: %s: You must set the number"
1714 " of solution with the",__func__);
1715 fprintf(stderr,
" MMG2D_Set_solSize function before setting values");
1716 fprintf(stderr,
" in solution structure \n");
1720 for ( k=0; k<met->
np; ++k ) {
1735 for ( k=0; k<met->
np; ++k ) {
1753 switch ( psl->
type ) {
1767 fprintf(stderr,
"\n ## Error: %s: unexpected type of solution: %s.\n",
1781 switch ( psl->
type ) {
1795 fprintf(stderr,
"\n ## Error: %s: unexpected type of solution: %s\n",
1809 switch ( psl->
type ) {
1823 fprintf(stderr,
"\n ## Error: %s: unexpected type of solution: %s.\n",
1838 switch ( psl->
type ) {
1852 fprintf(stderr,
"\n ## Error: %s: unexpected type of solution: %s\n",
1863 fprintf(stderr,
"\n ## Error: %s: if you don't use the MMG2D_loadMesh function,",
1865 fprintf(stderr,
" you must call the MMG2D_Set_meshSize function to have a");
1866 fprintf(stderr,
" valid mesh.\n");
1867 fprintf(stderr,
" Missing datas.\n");
1871 if ( met->
npi != met->
np ) {
1872 fprintf(stderr,
"\n ## Error: %s: if you don't use the MMG2D_loadMet function,",
1874 fprintf(stderr,
" you must call the MMG2D_Set_solSize function to have a");
1875 fprintf(stderr,
" valid solution.\n");
1876 fprintf(stderr,
" Missing datas.\n");
1884 fprintf(stderr,
" ** MISSING DATA.\n");
1885 fprintf(stderr,
" Check that your mesh contains points.\n");
1886 fprintf(stderr,
" Exit program.\n");
1892 fprintf(stderr,
" ** 2 DIMENSIONAL MESH NEEDED. Exit program.\n");
1895 if ( met->
dim != 2 ) {
1896 fprintf(stderr,
" ** WRONG DIMENSION FOR METRIC. Exit program.\n");
1900 if ( !met ->ver ) met ->
ver = 2;
const char * MMG5_Get_typeName(enum MMG5_type typ)
int MMG5_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
int MMG5_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
int MMG5_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
int MMG5_Free_allSols(MMG5_pMesh mesh, MMG5_pSol *sol)
int MMG5_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
void MMG5_Init_parameters(MMG5_pMesh mesh)
const char * MMG5_Get_entitiesName(enum MMG5_entities ent)
void MMG5_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
int MMG2D_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
Set level-set base reference.
int MMG2D_Set_scalarSol(MMG5_pSol met, double s, MMG5_int pos)
Set a single value of a sol structure.
int MMG2D_Get_ithSols_inSolsAtVertices(MMG5_pSol sol, int i, double *s)
Get one out of several scalar solutions at all vertices in the mesh.
void MMG2D_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters (stored in the Info structure).
void MMG2D_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
int MMG2D_Set_quadrilateral(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int v3, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of a single quadrangle in a mesh.
int MMG2D_Unset_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from edge k.
int MMG2D_Set_vertex(MMG5_pMesh mesh, double c0, double c1, MMG5_int ref, MMG5_int pos)
Set the coordinates and reference of a single vertex.
int MMG2D_Set_scalarSols(MMG5_pSol met, double *s)
Set all values of a scalar sol structure.
int MMG2D_Init_mesh(const int starter,...)
Initialize a mesh structure and optionally the associated solution and metric structures.
int MMG2D_Get_vectorSols(MMG5_pSol met, double *sols)
Get all elements of a vector sol structure.
int MMG2D_Set_iparameter(MMG5_pMesh mesh, MMG5_pSol sol, int iparam, MMG5_int val)
Set integer parameter iparam to value val.
int MMG2D_Set_meshSize(MMG5_pMesh mesh, MMG5_int np, MMG5_int nt, MMG5_int nquad, MMG5_int na)
Set the numbers of entities in the mesh.
int MMG2D_Set_requiredEdge(MMG5_pMesh mesh, MMG5_int k)
Give edge k the "required" attribute.
int MMG2D_Get_quadrilateral(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *v3, MMG5_int *ref, int *isRequired)
Get the vertices and reference of the next quadrangle of the mesh.
int MMG2D_Set_tensorSol(MMG5_pSol met, double m11, double m12, double m22, MMG5_int pos)
Set a single element of a tensor sol structure.
int MMG2D_Get_vectorSol(MMG5_pSol met, double *vx, double *vy)
Get the next element of a vector sol structure.
int MMG2D_Set_edge(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int ref, MMG5_int pos)
Define a single edge.
int MMG2D_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.
int MMG2D_Unset_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from triangle k.
int MMG2D_Set_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs)
Set the vertices and references of all triangles in a mesh.
int MMG2D_GetByIdx_vertex(MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired, MMG5_int idx)
Get the coordinates and reference of a specific vertex in the mesh.
int MMG2D_Free_allSols(MMG5_pMesh mesh, MMG5_pSol *sol)
Deallocate an array of solution fields.
int MMG2D_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.
int MMG2D_Get_scalarSol(MMG5_pSol met, double *s)
Get the scalar solution value s of next element of a solution.
int MMG2D_Get_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs, int *areCorners, int *areRequired)
Get the coordinates and references of all vertices in the mesh.
int MMG2D_Unset_corner(MMG5_pMesh mesh, MMG5_int k)
Remove the "corner" attribute from a vertex.
int MMG2D_Get_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int *typEntity, MMG5_int *np, int *typSol)
Get the number of solutions, their dimension and their type.
int MMG2D_Get_tensorSol(MMG5_pSol met, double *m11, double *m12, double *m22)
Get the next element of a tensor sol structure.
int MMG2D_Set_solSize(MMG5_pMesh mesh, MMG5_pSol sol, int typEntity, MMG5_int np, int typSol)
Set the size and type of a solution field.
int MMG2D_Free_structures(const int starter,...)
Structure deallocations before return.
int MMG2D_Chk_meshData(MMG5_pMesh mesh, MMG5_pSol met)
Check if the number of given entities match with mesh and sol size.
int MMG2D_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
int MMG2D_Set_tensorSols(MMG5_pSol met, double *sols)
Set all elements of a tensor sol structure.
int MMG2D_Set_inputMeshName(MMG5_pMesh mesh, const char *meshin)
Set the name of the input mesh.
int MMG2D_Get_vertex(MMG5_pMesh mesh, double *c0, double *c1, MMG5_int *ref, int *isCorner, int *isRequired)
Get the coordinates and reference ref of the next vertex of a mesh.
int MMG2D_Get_scalarSols(MMG5_pSol met, double *s)
Get all elements of a scalar sol structure.
int MMG2D_Set_vectorSol(MMG5_pSol met, double vx, double vy, MMG5_int pos)
Set a single vector value in a sol structure.
int MMG2D_Get_edge(MMG5_pMesh mesh, MMG5_int *e0, MMG5_int *e1, MMG5_int *ref, int *isRidge, int *isRequired)
Get the vertices and reference of the next edge in the mesh.
double MMG2D_Get_triangleQuality(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k)
Get the quality measure of a single triangle in the mesh.
int MMG2D_Set_triangle(MMG5_pMesh mesh, MMG5_int v0, MMG5_int v1, MMG5_int v2, MMG5_int ref, MMG5_int pos)
Set the vertices and reference of a single triangle in a mesh.
int MMG2D_Set_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int nsols, MMG5_int np, int *typSol)
Initialize an array of solutions field defined at vertices.
int MMG2D_Get_tensorSols(MMG5_pSol met, double *sols)
Get all elements of a tensor sol structure.
int MMG2D_Get_meshSize(MMG5_pMesh mesh, MMG5_int *np, MMG5_int *nt, MMG5_int *nquad, MMG5_int *na)
Get the number of vertices, triangles and edges of the mesh.
int MMG2D_Get_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs, int *areRidges, int *areRequired)
Get the vertices and references of all edges in a mesh.
int MMG2D_Get_quadrilaterals(MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs, int *areRequired)
Get the vertices and references of all quadrangles of the mesh.
int MMG2D_Set_localParameter(MMG5_pMesh mesh, MMG5_pSol sol, int typ, MMG5_int ref, double hmin, double hmax, double hausd)
Set local parameters.
int MMG2D_Set_vertices(MMG5_pMesh mesh, double *vertices, MMG5_int *refs)
Set the coordinates and references of all vertices in the mesh.
int MMG2D_Get_triangle(MMG5_pMesh mesh, MMG5_int *v0, MMG5_int *v1, MMG5_int *v2, MMG5_int *ref, int *isRequired)
Get the vertices and reference of the next triangle in the mesh.
int MMG2D_Set_vectorSols(MMG5_pSol met, double *sols)
Set all values in a vector sol structure.
int MMG2D_Set_corner(MMG5_pMesh mesh, MMG5_int k)
Assign the "corner" attribute to a vertex.
int MMG2D_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int *refs)
Set the vertices and references of all edges in a mesh.
int MMG2D_Set_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Assign the "required" attribute to a vertex.
int MMG2D_Get_ithSol_inSolsAtVertices(MMG5_pSol sol, int i, double *s, MMG5_int pos)
Get one out of several scalar solutions at a specific vertex.
int MMG2D_Set_parallelEdge(MMG5_pMesh mesh, MMG5_int k)
Give edge k the "parallel" attribute.
int MMG2D_Set_dparameter(MMG5_pMesh mesh, MMG5_pSol sol, int dparam, double val)
Set double parameter dparam to value val.
int MMG2D_Free_all(const int starter,...)
Deallocations before return.
int MMG2D_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rin, MMG5_int rout)
Set the reference mapping for the elements of ref ref in LS discretization mode.
int MMG2D_Get_solsAtVerticesSize(MMG5_pMesh mesh, MMG5_pSol *sol, int *nsols, MMG5_int *np, int *typSol)
Get the number of elements and dimension of a solution defined on vertices.
int MMG2D_Get_triangles(MMG5_pMesh mesh, MMG5_int *tria, MMG5_int *refs, int *areRequired)
Get the vertices and references of all triangles in the mesh.
int MMG2D_Set_inputParamName(MMG5_pMesh mesh, const char *fparamin)
Set the name of the input parameter file.
int MMG2D_Set_quadrilaterals(MMG5_pMesh mesh, MMG5_int *quadra, MMG5_int *refs)
Set the vertices and references of all quadrangles in a mesh.
int MMG2D_Free_names(const int starter,...)
Structure deallocations before return.
int MMG2D_Unset_requiredVertex(MMG5_pMesh mesh, MMG5_int k)
Remove the "required" attribute from a vertex.
int MMG2D_Set_outputMeshName(MMG5_pMesh mesh, const char *meshout)
Set the name of the output mesh file.
int MMG2D_Set_requiredTriangle(MMG5_pMesh mesh, MMG5_int k)
Give triangle k the "required" attribute.
int MMG2D_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
MMG5_pMesh MMG5_pSol * sol
if(!ier) exit(EXIT_FAILURE)
va_start(argptr, starter)
API headers and documentation for the mmg2d library.
@ MMG2D_IPARAM_numsubdomain
@ MMG2D_IPARAM_numberOfLocalParam
@ MMG2D_IPARAM_numberOfLSBaseReferences
@ MMG2D_IPARAM_numberOfMat
@ MMG2D_DPARAM_angleDetection
int MMG2D_setMeshSize_alloc(MMG5_pMesh)
int MMG2D_memOption(MMG5_pMesh mesh)
double MMG2D_caltri_ani(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
double MMG2D_caltri_iso(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
int MMG2D_Free_all_var(va_list argptr)
int MMG2D_Free_structures_var(va_list argptr)
int MMG2D_Free_names_var(va_list argptr)
int MMG2D_Init_mesh_var(va_list argptr)
LIBMMG_CORE_EXPORT int MMG5_Set_multiMat(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int ref, int split, MMG5_int rin, MMG5_int rex)
#define MMG5_VOLFRAC
API header for the common part of the MMG libraries.
LIBMMG_CORE_EXPORT int MMG5_Set_lsBaseReference(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int br)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
double MMG2D_quickarea(double a[2], double b[2], double c[2])
#define MMG5_INCREASE_MEM_MESSAGE()
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MMG5_DEL_MEM(mesh, ptr)
Structure to store edges of am MMG mesh.
To store user-defined references in the mesh (useful in LS mode)
Local parameters for a specific entity and reference.
Structure to store vertices of an MMG mesh.
Structure to store quadrangles of an MMG mesh.
Structure to store triangles of a MMG mesh.