24#ifndef LIBMMGS_PRIVATE_H
25#define LIBMMGS_PRIVATE_H
34#define MMGS_ALPHAD 3.464101615137755
37#define MMGS_LOPTS 0.71
41#define MMGS_BADKAL 2.e-2
42#define MMGS_NULKAL 1.e-4
44#define MMGS_NPMAX 500000
45#define MMGS_NTMAX 1000000
46#define MMGS_XPMAX 500000
49#define MS_SIN(tag) ((tag & MG_CRN) || (tag & MG_REQ) || (tag & MG_NOM))
53#define MMGS_RETURN_AND_FREE(mesh,met,ls,val)do \
55 if ( !MMGS_Free_all(MMG5_ARG_start, \
56 MMG5_ARG_ppMesh,&mesh,MMG5_ARG_ppMet,&met, \
59 return MMG5_LOWFAILURE; \
66#define MMGS_POINT_REALLOC(mesh,sol,ip,wantedGap,law,o,tag ) do \
69 assert ( mesh && mesh->point ); \
70 MMG5_TAB_RECALLOC(mesh,mesh->point,mesh->npmax,wantedGap,MMG5_Point, \
71 "larger point table",law); \
73 mesh->npnil = mesh->np+1; \
74 for (klink=mesh->npnil; klink<mesh->npmax-1; klink++) \
75 mesh->point[klink].tmp = klink+1; \
79 MMG5_ADD_MEM(mesh,(sol->size*(mesh->npmax-sol->npmax))*sizeof(double), \
80 "larger solution",law); \
81 MMG5_SAFE_REALLOC(sol->m,sol->size*(sol->npmax+1), \
82 sol->size*(mesh->npmax+1),double, \
83 "larger solution",law); \
85 sol->npmax = mesh->npmax; \
88 ip = MMGS_newPt(mesh,o,tag); \
94#define MMGS_TRIA_REALLOC( mesh,jel,wantedGap,law ) do \
96 MMG5_int klink,oldSiz; \
98 oldSiz = mesh->ntmax; \
100 MMG5_CHK_INT32_OVERFLOW(wantedGap,oldSiz,3,5,law); \
102 MMG5_TAB_RECALLOC(mesh,mesh->tria,mesh->ntmax,wantedGap,MMG5_Tria, \
103 "larger tria table",law); \
105 mesh->nenil = mesh->nt+1; \
106 for (klink=mesh->nenil; klink<mesh->ntmax-1; klink++) \
107 mesh->tria[klink].v[2] = klink+1; \
109 if ( mesh->adja ) { \
111 MMG5_ADD_MEM(mesh,3*(mesh->ntmax-oldSiz)*sizeof(MMG5_int), \
112 "larger adja table",law); \
113 MMG5_SAFE_RECALLOC(mesh->adja,3*oldSiz+5,3*mesh->ntmax+5,MMG5_int \
114 ,"larger adja table",law); \
118 jel = MMGS_newElt(mesh); \
142int bouletrid(
MMG5_pMesh mesh,MMG5_int start,MMG5_int ip,
int *il1,MMG5_int *l1,
int *il2,MMG5_int *l2,MMG5_int *ip0,MMG5_int *ip1);
173int paratmet(
double c0[3],
double n0[3],
double m[6],
double c1[3],
double n1[3],
double mt[6]);
211 double llold,
double lam0,
double lam1,
double lam2,
212 double nn1[3],
double nn2[3],
double to[3]);
int swpedg(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *list, int ilist, int8_t typchk)
MMG5_int MMGS_newPt(MMG5_pMesh mesh, double c[3], double n[3])
int MMGS_assignEdge(MMG5_pMesh mesh)
int MMGS_bdryUpdate(MMG5_pMesh mesh)
int MMG5_intridmet(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, double, double *, double *)
int MMG5_split2_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
int MMGS_analys_for_norver(MMG5_pMesh mesh)
int MMGS_intmet33_ani(MMG5_pMesh, MMG5_pSol, MMG5_int, int8_t, MMG5_int, double)
int MMGS_moveTowardPoint(MMG5_pMesh mesh, MMG5_pPoint p0, MMG5_pPoint p, double llold, double lam0, double lam1, double lam2, double nn1[3], double nn2[3], double to[3])
size_t MMG5_memSize(void)
int movridpt_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *list, int ilist)
int MMG5_mmgsBezierCP(MMG5_pMesh, MMG5_Tria *, MMG5_pBezier, int8_t ori)
int MMGS_Init_mesh_var(va_list argptr)
double caleltsig_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel)
int MMGS_split1(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i, MMG5_int *vx)
int setref(MMG5_pMesh, MMG5_int, MMG5_int, int)
int chkswp(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i, int8_t typchk, double(*MMGS_lenEdg)(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, int8_t), double(*MMGS_caltri)(MMG5_pMesh, MMG5_pSol, MMG5_pTria))
int MMGS_split3_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
int MMGS_gradsiz_ani(MMG5_pMesh mesh, MMG5_pSol met)
int MMG5_mmgsChkmsh(MMG5_pMesh, int, MMG5_int)
int MMGS_regver(MMG5_pMesh mesh)
int colver(MMG5_pMesh mesh, MMG5_int *list, int ilist)
int curvpo(MMG5_pMesh, MMG5_pSol)
int8_t typelt(MMG5_pPoint p[3], int8_t *ia)
int MMGS_mmgs2(MMG5_pMesh, MMG5_pSol, MMG5_pSol)
int MMGS_outqua(MMG5_pMesh, MMG5_pSol)
int MMGS_hashTria(MMG5_pMesh)
MMG5_int MMGS_indPt(MMG5_pMesh mesh, MMG5_int kp)
int MMGS_analys(MMG5_pMesh mesh)
int MMGS_delElt(MMG5_pMesh mesh, MMG5_int iel)
int MMGS_zaldy(MMG5_pMesh mesh)
int swapar(MMG5_pMesh mesh, MMG5_int k, int i)
int MMGS_setMeshSize_alloc(MMG5_pMesh mesh)
int MMGS_inqua(MMG5_pMesh, MMG5_pSol)
int chkedg(MMG5_pMesh, MMG5_int)
int movintpt_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *list, int ilist)
void MMGS_delPt(MMG5_pMesh mesh, MMG5_int ip)
int MMGS_surfballRotation(MMG5_pMesh, MMG5_pPoint, MMG5_int *, int, double r[3][3], double *, double n[3])
int colver3(MMG5_pMesh mesh, MMG5_int *list)
int MMGS_split3(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
int MMGS_defsiz_iso(MMG5_pMesh mesh, MMG5_pSol met)
int MMGS_Free_all_var(va_list argptr)
int MMGS_defsiz_ani(MMG5_pMesh mesh, MMG5_pSol met)
int boulechknm(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list)
int MMG5_mmgsRenumbering(int, MMG5_pMesh, MMG5_pSol, MMG5_pSol, MMG5_int *)
int MMGS_simbulgept(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i, MMG5_int ip)
int MMG5_mmgs1(MMG5_pMesh, MMG5_pSol, MMG5_int *)
int intmet_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
double caleltsig_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel)
int MMGS_Free_names_var(va_list argptr)
int MMGS_doSol_iso(MMG5_pMesh, MMG5_pSol)
int MMGS_split1_sim(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i, MMG5_int *vx)
int intmet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
int MMGS_paramDisp(MMG5_pMesh, MMG5_int, int8_t, MMG5_int, MMG5_int, double, double[3])
int MMGS_bezierInt(MMG5_pBezier, double *, double *, double *, double *)
int paratmet(double c0[3], double n0[3], double m[6], double c1[3], double n1[3], double mt[6])
int chkmet(MMG5_pMesh, MMG5_pSol)
void MMGS_keep_only1Subdomain(MMG5_pMesh mesh, MMG5_int nsd)
int litcol(MMG5_pMesh mesh, MMG5_int k, int8_t i, double kal)
int MMGS_split2(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
int MMGS_prilen(MMG5_pMesh mesh, MMG5_pSol met, int)
int MMGS_setadj(MMG5_pMesh mesh)
MMG5_int MMGS_indElt(MMG5_pMesh mesh, MMG5_int kel)
int MMGS_memOption(MMG5_pMesh mesh)
int MMGS_set_metricAtPointsOnReqEdges(MMG5_pMesh, MMG5_pSol, int8_t)
int intregmet(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, double s, double mr[6])
int MMGS_doSol_ani(MMG5_pMesh, MMG5_pSol)
int MMGS_gradsizreq_ani(MMG5_pMesh mesh, MMG5_pSol met)
MMG5_int MMGS_newElt(MMG5_pMesh mesh)
int colver2(MMG5_pMesh mesh, MMG5_int *ilist)
int MMGS_Free_structures_var(va_list argptr)
int chkcol(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int *list, int8_t typchk, double(*MMGS_lenEdg)(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, int8_t), double(*MMGS_caltri)(MMG5_pMesh, MMG5_pSol, MMG5_pTria))
int bouletrid(MMG5_pMesh mesh, MMG5_int start, MMG5_int ip, int *il1, MMG5_int *l1, int *il2, MMG5_int *l2, MMG5_int *ip0, MMG5_int *ip1)
int movintpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *list, int ilist)
int litswp(MMG5_pMesh mesh, MMG5_int k, int8_t i, double kal)
int movridpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *list, int ilist)
int split1b(MMG5_pMesh mesh, MMG5_int k, int8_t i, MMG5_int ip)
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.