mmg3d
boulep_3d.c File Reference

Functions for ball of points computation. More...

#include "mmg3d.h"
Include dependency graph for boulep_3d.c:

Functions

int MMG5_boulevolp (MMG5_pMesh mesh, int start, int ip, int *list)
 
int MMG3D_findEdge (MMG5_pMesh mesh, MMG5_pTetra pt, int k, int na, int nb, int error, char *mmgWarn, char *ia)
 
int MMG5_boulenm (MMG5_pMesh mesh, int start, int ip, int iface, double n[3], double t[3])
 
int MMG5_boulernm (MMG5_pMesh mesh, int start, int ip, int *ng, int *nr)
 
int MMG5_boulesurfvolp (MMG5_pMesh mesh, int start, int ip, int iface, int *listv, int *ilistv, int *lists, int *ilists, int isnm)
 
int MMG5_bouletrid (MMG5_pMesh mesh, int start, int iface, int ip, int *il1, int *l1, int *il2, int *l2, int *ip0, int *ip1)
 
int MMG5_settag (MMG5_pMesh mesh, int start, int ia, int16_t tag, int edg)
 
int MMG5_deltag (MMG5_pMesh mesh, int start, int ia, int16_t tag)
 
int MMG5_coquil (MMG5_pMesh mesh, int start, int ia, int *list)
 
int MMG5_srcbdy (MMG5_pMesh mesh, int start, int ia)
 
void MMG5_coquilFaceErrorMessage (MMG5_pMesh mesh, int k1, int k2)
 
int MMG3D_coquilFaceFirstLoop (MMG5_pMesh mesh, int start, int na, int nb, char iface, char ia, int *list, int *ilist, int *it1, int *it2, int *piv, int *adj, char *hasadja, int *nbdy, int silent)
 
void MMG3D_coquilFaceSecondLoopInit (MMG5_pMesh mesh, int piv, char *iface, char *ia, int *list, int *ilist, int *it1, int *pradj, int *adj)
 
int MMG5_coquilface (MMG5_pMesh mesh, int start, char iface, int ia, int *list, int *it1, int *it2, int silent)
 
int16_t MMG5_coquilTravel (MMG5_pMesh mesh, int na, int nb, int *adj, int *piv, char *iface, char *i)
 
int16_t MMG5_openCoquilTravel (MMG5_pMesh mesh, int na, int nb, int *adj, int *piv, char *iface, char *i)
 

Variables

MMG5_Info info
 

Detailed Description

Functions for ball of points computation.

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

Function Documentation

◆ MMG3D_coquilFaceFirstLoop()

int MMG3D_coquilFaceFirstLoop ( MMG5_pMesh  mesh,
int  start,
int  na,
int  nb,
char  iface,
char  ia,
int *  list,
int *  ilist,
int *  it1,
int *  it2,
int *  piv,
int *  adj,
char *  hasadja,
int *  nbdy,
int  silent 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetrahedron.
naglobal index of the 1st extremity of the edge whose shell is computed
nbglobal index of the 2d extremity of the edge whose shell is computed
ifaceindex of the face from which we come.
iaindex of edge whose shell is computed (in tetra).
listpointer toward the list of tetra in the shell (to fill).
ilistpointer toward the number of tetra in the shell (to fill).
it1pointer toward the index of the 1st boundary face sharing ia
it2pointer toward the index of the 2d boundary face sharing ia (to fill).
adjpointer toward the adjacent to treat in the shell (to update)
hasadjapointer toward 0 if we don't have adja through iface, 0 otherwise (to fill)
nbdypointer toward the number of boundaries found minus 1 (to update)
silentif 1, print error message for more than 2 boundary triangles in the shell
Returns
-1 if fail, 1 otherwise

Travel in the shell of the edge until meeting the first tetra or reaching a tetra without adjacent. Fill it2 and list.

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

◆ MMG3D_coquilFaceSecondLoopInit()

void MMG3D_coquilFaceSecondLoopInit ( MMG5_pMesh  mesh,
int  piv,
char *  iface,
char *  ia,
int *  list,
int *  ilist,
int *  it1,
int *  pradj,
int *  adj 
)
Parameters
meshpointer toward the mesh structure.
pivglobal index of the pivot.
ifaceindex of the face from which we come.
iindex of edge whose shell is computed (in tetra).
listpointer toward the list of tetra in the shell (to fill).
ilistpointer toward the number of tetra in the shell (to fill).
it1pointer toward the index of the 1st boundary face sharing ia
pradjpointer toward the first tetra of the shell (to fill).
adjpointer toward the adjacent to treat in the shell (to update)

Initialize the travel in the shell of the edge in reverse direction than in the coquilFaceFirstLoop function.

Here is the caller graph for this function:

◆ MMG3D_findEdge()

int MMG3D_findEdge ( MMG5_pMesh  mesh,
MMG5_pTetra  pt,
int  k,
int  na,
int  nb,
int  error,
char *  mmgWarn,
char *  ia 
)
Parameters
meshpointer toward the mesh structure.
ptpointer toward the working tetra
kindex of the tetra pt.
naindex of the first extermity of the seeking edge.
nbindex of the second extermity of the seeking edge.
error1 if we want to print an error message, 0 for a warning.
mmgWarnstatic variable to print warning only once (not used if error==1)
iapointer toward the edge index (to fill).
Returns
0 if fail, 1 if success.

Find the local index of the edge ia in the tetra pt of index k;

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

◆ MMG5_boulenm()

int MMG5_boulenm ( MMG5_pMesh  mesh,
int  start,
int  ip,
int  iface,
double  n[3],
double  t[3] 
)
Parameters
meshpointer toward the mesh structure.
starttetra index.
ippoint index.
ifaceface index.
ncomputed normal vector.
tcomputed tangent vector.
Returns
0 if point is singular, 1 otherwise.

Define normal and tangent vectors at a non manifold point (ip in start, supported by face iface), enumerating its (outer)surfacic ball.

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

◆ MMG5_boulernm()

int MMG5_boulernm ( MMG5_pMesh  mesh,
int  start,
int  ip,
int *  ng,
int *  nr 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetrahedra.
iplocal index of the point in the tetrahedra start.
ngpointer toward the number of ridges.
nrpointer toward the number of reference edges.
Returns
ns the number of special edges passing through ip, -1 if fail.

Count the numer of ridges and reference edges incident to the vertex ip when ip is non-manifold.

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

◆ MMG5_boulesurfvolp()

int MMG5_boulesurfvolp ( MMG5_pMesh  mesh,
int  start,
int  ip,
int  iface,
int *  listv,
int *  ilistv,
int *  lists,
int *  ilists,
int  isnm 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetra.
ipindex in start of the looked point.
ifaceindex in start of the starting face.
listvpointer toward the computed volumic ball.
ilistvpointer toward the computed volumic ball size.
listspointer toward the computed surfacic ball.
ilistspointer toward the computed surfacic ball size.
isnmis the looked point ip non-manifold?
Returns
-1 if fail, 1 otherwise.

Compute the volumic ball of a SURFACE point p, as well as its surfacic ball, starting from tetra start, with point ip, and face if in tetra volumic ball. listv[k] = 4*number of tet + index of point surfacic ball. lists[k] = 4*number of tet + index of face.

Warning
Don't work for a non-manifold point if start has an adjacent through iface (for example : a non-manifold subdomain). Thus, if ip is non-manifold, must be called only if start has no adjacent through iface.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_bouletrid()

int MMG5_bouletrid ( MMG5_pMesh  mesh,
int  start,
int  iface,
int  ip,
int *  il1,
int *  l1,
int *  il2,
int *  l2,
int *  ip0,
int *  ip1 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetrahedron.
ipindex of the looked ridge point.
ifaceindex in start of the starting face.
il1pointer toward the first ball size.
l1pointer toward the first computed ball (associated to n_1's side).
il2pointer toward the second ball size.
l2pointer toward the second computed ball (associated to n_2's side).
ip0index of the first extremity of the ridge.
ip1index of the second extremity of the ridge.
Returns
0 if fail, 1 otherwise.

Computation of the two surface balls of a ridge point: the list l1 is associated to the normal of face iface. ip0 and ip1 are the indices of the 2 ending point of the ridge. Both lists are returned enumerated in direct order.

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

◆ MMG5_boulevolp()

int MMG5_boulevolp ( MMG5_pMesh  mesh,
int  start,
int  ip,
int *  list 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetrahedra.
iplocal index of the point in the tetrahedra start.
listpointer toward the list of the tetra in the volumic ball of ip.
Returns
0 if fail and the number of the tetra in the ball otherwise.

Fill the volumic ball (i.e. filled with tetrahedra) of point ip in tetra start. Results are stored under the form $4*kel + jel$, kel = number of the tetra, jel = local index of p within kel.

Here is the caller graph for this function:

◆ MMG5_coquil()

int MMG5_coquil ( MMG5_pMesh  mesh,
int  start,
int  ia,
int *  list 
)
Parameters
meshpointer toward the mesh structure
startindex of the starting tetra
iaindex of the edge
listlist of tetra sharing the edge ia
Returns
2*ilist if shell is closed, 2*ilist +1 otherwise, 0 if one of the tet of the shell is required, -1 if fail.

Find all tets sharing edge ia of tetra start.

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

◆ MMG5_coquilface()

int MMG5_coquilface ( MMG5_pMesh  mesh,
int  start,
char  iface,
int  ia,
int *  list,
int *  it1,
int *  it2,
int  silent 
)
Parameters
meshpointer toward the mesh structure.
startindex of the starting tetrahedron.
ifaceindex of the boundary face from which we come.
iaindex of edge whose shell is computed (in tetra).
listpointer toward the list of tetra in the shell (to fill).
it1pointer toward the index of the first boundary face sharing ia (to fill).
it2pointer toward the index of the second boundary face sharing ia (to fill).
silentif 1, print error message for more than 2 boundary triangles in the shell
Returns
-1 if fail, $2*ilist$ if shell is closed, $2*ilist+1$ otherwise.

Find all tets sharing edge ia of tetra start, and stores boundary faces when met. $ it1 $ and $ it2 = 6*iel + iface$, iel = index of tetra, iface = index of face in tetra.

Warning
Don't work if ia has only one boundary face in its shell.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_coquilFaceErrorMessage()

void MMG5_coquilFaceErrorMessage ( MMG5_pMesh  mesh,
int  k1,
int  k2 
)
Parameters
meshpointer toward the mesh structure.
k1should contain a tetra index.
k2should contain a tetra index different from k2.

Print an error message if MMG5_coquilFace detect a boundary topology problem.

Here is the caller graph for this function:

◆ MMG5_coquilTravel()

int16_t MMG5_coquilTravel ( MMG5_pMesh  mesh,
int  na,
int  nb,
int *  adj,
int *  piv,
char *  iface,
char *  i 
)
Parameters
meshpointer toward the mesh structure.
naglobal index of edge extremity.
nbglobal index of edge extremity.
adjstarting tetrahedron at the begining and finish tet at the end.
pivglobal index of the vertex opposite to the travelling face (updated for the finish tet at the end).
ifaceprevious traveling face of the tet (suspected to be boundary), updated.
ilocal index of the edge $[na,nb]$ in tet adj.
Returns
the tag of the face iface of the tetra adj, 0 if the tetra is not boundary, -1 if fail.

Travel around the edge $[na,nb]$ from tetra adj and through the face piv.

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

◆ MMG5_deltag()

int MMG5_deltag ( MMG5_pMesh  mesh,
int  start,
int  ia,
int16_t  tag 
)
Parameters
meshpointer toward the mesh structure
startindex of the starting tetra
iaindex of the edge in tetra start that we want to modify
tagtag to remove
Returns
1 if success, 0 otherwise.

Remove the tag tag of edge ia in tetra start by travelling its shell.

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

◆ MMG5_openCoquilTravel()

int16_t MMG5_openCoquilTravel ( MMG5_pMesh  mesh,
int  na,
int  nb,
int *  adj,
int *  piv,
char *  iface,
char *  i 
)
Parameters
meshpointer toward the mesh structure.
naglobal index of edge extremity.
nbglobal index of edge extremity.
adjstarting tetrahedron at the begining and finish tet at the end.
pivglobal index of the vertex opposite to the travelling face (updated for the finish tet at the end).
ifacetraveling face of the tet (suspected to be boundary), updated.
ilocal index of the edge $[na,nb]$ in tet adj.
Returns
1 if success, 0 if fail.

Travel around the edge $[na,nb]$ from tetra adj and through the face piv. The shell of the edge is open and the tetra adj has no neighbour through the face iface.

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

◆ MMG5_settag()

int MMG5_settag ( MMG5_pMesh  mesh,
int  start,
int  ia,
int16_t  tag,
int  edg 
)
Parameters
meshpointer toward the mesh structure
starttetra from which we start
ialocal index of the edge in start
tagtag to set
edgeedge reference to set
Returns
1 if success, 0 if fail.

Set tag tag and ref edg of edge ia (if need be) in tetra start by travelling its shell.

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

◆ MMG5_srcbdy()

int MMG5_srcbdy ( MMG5_pMesh  mesh,
int  start,
int  ia 
)
Parameters
meshpointer toward the mesh structure.
startstarting tetra.
ialocal edge index in tetra start.
Returns
1 if the edge ia in start is boundary, 0 otherwise, -1 if fail.

Identify whether edge ia in start is a boundary edge by unfolding its shell.

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

Variable Documentation

◆ info

MMG5_Info info