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

Functions for ball of points computation. More...

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

Go to the source code of this file.

Functions

int MMG5_boulevolp (MMG5_pMesh mesh, MMG5_int start, int ip, int64_t *list)
 
int MMG3D_findEdge (MMG5_pMesh mesh, MMG5_pTetra pt, MMG5_int k, MMG5_int na, MMG5_int nb, int error, int8_t *mmgWarn, int8_t *ia)
 
static void MMG3D_compute_tangent (MMG5_pMesh mesh, int nump, int ip0, int ip1, double t[3])
 
int MMG5_boulenm (MMG5_pMesh mesh, MMG5_int start, int ip, int iface, double n[3], double t[3])
 
int MMG5_boulenmInt (MMG5_pMesh mesh, MMG5_int start, int ip, double t[3])
 
int MMG5_boulernm (MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int start, int ip, MMG5_int *ng, MMG5_int *nr, MMG5_int *nm)
 
int MMG5_boulesurfvolp (MMG5_pMesh mesh, MMG5_int start, int ip, int iface, int64_t *listv, int *ilistv, MMG5_int *lists, int *ilists, int isnm)
 
int MMG5_boulesurfvolpNom (MMG5_pMesh mesh, MMG5_int start, int ip, int iface, int64_t *listv, int *ilistv, MMG5_int *lists, int *ilists, MMG5_int *refmin, MMG5_int *refplus, int isnm)
 
int MMG5_bouletrid (MMG5_pMesh mesh, MMG5_int start, int iface, int ip, int *il1, MMG5_int *l1, int *il2, MMG5_int *l2, MMG5_int *ip0, MMG5_int *ip1)
 
static int MMG3D_settag_oneDir (MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int16_t tag, int edg, MMG5_int piv, MMG5_int adj)
 
int MMG5_settag (MMG5_pMesh mesh, MMG5_int start, int ia, int16_t tag, int edg)
 
static int MMG3D_deltag_oneDir (MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int16_t tag, MMG5_int piv, MMG5_int adj)
 
int MMG5_deltag (MMG5_pMesh mesh, MMG5_int start, int ia, int16_t tag)
 
int MMG5_coquil (MMG5_pMesh mesh, MMG5_int start, int ia, int64_t *list, int8_t *isbdy)
 
int MMG5_srcbdy (MMG5_pMesh mesh, MMG5_int start, int ia)
 
void MMG5_coquilFaceErrorMessage (MMG5_pMesh mesh, MMG5_int k1, MMG5_int k2)
 
int MMG3D_coquilFaceFirstLoop (MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int8_t iface, int8_t ia, int64_t *list, int *ilist, MMG5_int *it1, MMG5_int *it2, MMG5_int *piv, MMG5_int *adj, int8_t *hasadja, int *nbdy, int silent)
 
void MMG3D_coquilFaceSecondLoopInit (MMG5_pMesh mesh, MMG5_int piv, int8_t *iface, int8_t *ia, int64_t *list, int *ilist, MMG5_int *it1, MMG5_int *pradj, MMG5_int *adj)
 
int MMG5_coquilface (MMG5_pMesh mesh, MMG5_int start, int8_t iface, int ia, int64_t *list, MMG5_int *it1, MMG5_int *it2, int silent)
 
int16_t MMG5_coquilTravel (MMG5_pMesh mesh, MMG5_int na, MMG5_int nb, MMG5_int *adj, MMG5_int *piv, int8_t *iface, int8_t *i)
 
int16_t MMG5_openCoquilTravel (MMG5_pMesh mesh, MMG5_int na, MMG5_int nb, MMG5_int *adj, MMG5_int *piv, int8_t *iface, int8_t *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.

Definition in file boulep_3d.c.

Function Documentation

◆ MMG3D_compute_tangent()

static void MMG3D_compute_tangent ( MMG5_pMesh  mesh,
int  nump,
int  ip0,
int  ip1,
double  t[3] 
)
inlinestatic

Definition at line 146 of file boulep_3d.c.

Here is the caller graph for this function:

◆ MMG3D_coquilFaceFirstLoop()

int MMG3D_coquilFaceFirstLoop ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  na,
MMG5_int  nb,
int8_t  iface,
int8_t  ia,
int64_t *  list,
int *  ilist,
MMG5_int *  it1,
MMG5_int *  it2,
MMG5_int *  piv,
MMG5_int *  adj,
int8_t *  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, 1 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.

Definition at line 1686 of file boulep_3d.c.

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

◆ MMG3D_coquilFaceSecondLoopInit()

void MMG3D_coquilFaceSecondLoopInit ( MMG5_pMesh  mesh,
MMG5_int  piv,
int8_t *  iface,
int8_t *  ia,
int64_t *  list,
int *  ilist,
MMG5_int *  it1,
MMG5_int *  pradj,
MMG5_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.

Definition at line 1787 of file boulep_3d.c.

Here is the caller graph for this function:

◆ MMG3D_deltag_oneDir()

static int MMG3D_deltag_oneDir ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  na,
MMG5_int  nb,
int16_t  tag,
MMG5_int  piv,
MMG5_int  adj 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
naedge vertex
nbedge vertex
tagnew edge tag
pivglobal index of the pivot to set the sense of travel
adjindex of adjacent tetra for the travel
Returns
-1 if fail, start if shell has been completely travelled, 0 otherwise

Remove the tag tag of edge ia in tetra start by travelling its shell in one direction (given by the pivot piv).

Definition at line 1297 of file boulep_3d.c.

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

◆ MMG3D_findEdge()

int MMG3D_findEdge ( MMG5_pMesh  mesh,
MMG5_pTetra  pt,
MMG5_int  k,
MMG5_int  na,
MMG5_int  nb,
int  error,
int8_t *  mmgWarn,
int8_t *  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;

Definition at line 113 of file boulep_3d.c.

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

◆ MMG3D_settag_oneDir()

static int MMG3D_settag_oneDir ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  na,
MMG5_int  nb,
int16_t  tag,
int  edg,
MMG5_int  piv,
MMG5_int  adj 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
naedge vertex
nbedge vertex
tagnew edge tag
edgnew edge ref
pivglobal index of the pivot to set the sense of travel
adjindex of adjacent tetra for the travel
Returns
-1 if fail, start if shell has been completely travelled, 0 otherwise

Set tag and ref of the edge na nb from tetra start by traveling its shell in one direction (given by the pivot piv).

Definition at line 1170 of file boulep_3d.c.

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

◆ MMG5_boulenm()

int MMG5_boulenm ( MMG5_pMesh  mesh,
MMG5_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.

Definition at line 196 of file boulep_3d.c.

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

◆ MMG5_boulenmInt()

int MMG5_boulenmInt ( MMG5_pMesh  mesh,
MMG5_int  start,
int  ip,
double  t[3] 
)
Parameters
meshpointer toward the mesh structure.
starttetra index.
ippoint index.
tcomputed tangent vector.
Returns
0 when more than two NOM points are attached to ip, 1 if sucess.

Travel the ball of the internal non manifold point ip in tetra start and calculate the tangent vector to the underlying curve.

Remarks
we are not able to compute tangent along non-manifold points for edge-connected meshes. In this case the point doesn't have xpoint nor tangent or normal.

Definition at line 342 of file boulep_3d.c.

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

◆ MMG5_boulernm()

int MMG5_boulernm ( MMG5_pMesh  mesh,
MMG5_Hash hash,
MMG5_int  start,
int  ip,
MMG5_int *  ng,
MMG5_int *  nr,
MMG5_int *  nm 
)
Parameters
meshpointer toward the mesh structure.
hashpointer toward an allocated hash table.
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.
nmpointer toward the number of non-manifold 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.

Definition at line 455 of file boulep_3d.c.

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

◆ MMG5_boulesurfvolp()

int MMG5_boulesurfvolp ( MMG5_pMesh  mesh,
MMG5_int  start,
int  ip,
int  iface,
int64_t *  listv,
int *  ilistv,
MMG5_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.
isnm1 if ip is non-manifold, 0 otherwise.
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* tet index + index of point surfacic ball.
  • lists[k] = 4* tet index + index of boundary 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.

Definition at line 607 of file boulep_3d.c.

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

◆ MMG5_boulesurfvolpNom()

int MMG5_boulesurfvolpNom ( MMG5_pMesh  mesh,
MMG5_int  start,
int  ip,
int  iface,
int64_t *  listv,
int *  ilistv,
MMG5_int *  lists,
int *  ilists,
MMG5_int *  refmin,
MMG5_int *  refplus,
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.
refminreturn the reference of one of the two subdomains in presence
refplusreturn the reference of the other subdomain in presence
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.

Definition at line 771 of file boulep_3d.c.

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

◆ MMG5_bouletrid()

int MMG5_bouletrid ( MMG5_pMesh  mesh,
MMG5_int  start,
int  iface,
int  ip,
int *  il1,
MMG5_int *  l1,
int *  il2,
MMG5_int *  l2,
MMG5_int *  ip0,
MMG5_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.

Definition at line 952 of file boulep_3d.c.

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

◆ MMG5_boulevolp()

int MMG5_boulevolp ( MMG5_pMesh  mesh,
MMG5_int  start,
int  ip,
int64_t *  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.

Definition at line 54 of file boulep_3d.c.

Here is the caller graph for this function:

◆ MMG5_coquil()

int MMG5_coquil ( MMG5_pMesh  mesh,
MMG5_int  start,
int  ia,
int64_t *  list,
int8_t *  isbdy 
)
Parameters
meshpointer toward the mesh structure
startindex of the starting tetra
iaindex of the edge
listlist of tetra sharing the edge ia
isbdy1 if edge is bdy, 0 otherwise (note that at interface of 2 domains the edge shell of a bdy edge can be closed)
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.

Definition at line 1403 of file boulep_3d.c.

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

◆ MMG5_coquilface()

int MMG5_coquilface ( MMG5_pMesh  mesh,
MMG5_int  start,
int8_t  iface,
int  ia,
int64_t *  list,
MMG5_int *  it1,
MMG5_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.

Definition at line 1843 of file boulep_3d.c.

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

◆ MMG5_coquilFaceErrorMessage()

void MMG5_coquilFaceErrorMessage ( MMG5_pMesh  mesh,
MMG5_int  k1,
MMG5_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.

Definition at line 1613 of file boulep_3d.c.

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

◆ MMG5_coquilTravel()

int16_t MMG5_coquilTravel ( MMG5_pMesh  mesh,
MMG5_int  na,
MMG5_int  nb,
MMG5_int *  adj,
MMG5_int *  piv,
int8_t *  iface,
int8_t *  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.

Definition at line 1959 of file boulep_3d.c.

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

◆ MMG5_deltag()

int MMG5_deltag ( MMG5_pMesh  mesh,
MMG5_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.

Definition at line 1344 of file boulep_3d.c.

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,
MMG5_int  na,
MMG5_int  nb,
MMG5_int *  adj,
MMG5_int *  piv,
int8_t *  iface,
int8_t *  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.

Definition at line 2011 of file boulep_3d.c.

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

◆ MMG5_settag()

int MMG5_settag ( MMG5_pMesh  mesh,
MMG5_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
edgedge 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.

Definition at line 1228 of file boulep_3d.c.

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

◆ MMG5_srcbdy()

int MMG5_srcbdy ( MMG5_pMesh  mesh,
MMG5_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.

Definition at line 1554 of file boulep_3d.c.

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

Variable Documentation

◆ info

MMG5_Info info
extern