Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Macros | Functions
locate_2d.c File Reference
#include "libmmg2d_private.h"
Include dependency graph for locate_2d.c:

Go to the source code of this file.

Macros

#define EPST   -1e-18
 

Functions

int MMG2D_coorbary (MMG5_pMesh mesh, MMG5_pTria pt, double c[2], double *det, double *l1, double *l2)
 
MMG5_int MMG2D_isInTriangle (MMG5_pMesh mesh, MMG5_int k, double c[2])
 
int MMG2D_cutEdge (MMG5_pMesh mesh, MMG5_pTria pt, MMG5_pPoint ppa, MMG5_pPoint ppb)
 
int MMG2D_cutEdgeTriangle (MMG5_pMesh mesh, MMG5_int k, MMG5_int ia, MMG5_int ib)
 
MMG5_int MMG2D_findTria (MMG5_pMesh mesh, MMG5_int ip)
 
int MMG2D_locateEdge (MMG5_pMesh mesh, MMG5_int ia, MMG5_int ib, MMG5_int *kdep, MMG5_int *list)
 

Detailed Description

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

Definition in file locate_2d.c.

Macro Definition Documentation

◆ EPST

#define EPST   -1e-18

Definition at line 33 of file locate_2d.c.

Function Documentation

◆ MMG2D_coorbary()

int MMG2D_coorbary ( MMG5_pMesh  mesh,
MMG5_pTria  pt,
double  c[2],
double *  det,
double *  l1,
double *  l2 
)

Definition at line 37 of file locate_2d.c.

Here is the caller graph for this function:

◆ MMG2D_cutEdge()

int MMG2D_cutEdge ( MMG5_pMesh  mesh,
MMG5_pTria  pt,
MMG5_pPoint  ppa,
MMG5_pPoint  ppb 
)

Definition at line 90 of file locate_2d.c.

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

◆ MMG2D_cutEdgeTriangle()

int MMG2D_cutEdgeTriangle ( MMG5_pMesh  mesh,
MMG5_int  k,
MMG5_int  ia,
MMG5_int  ib 
)

Definition at line 129 of file locate_2d.c.

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

◆ MMG2D_findTria()

MMG5_int MMG2D_findTria ( MMG5_pMesh  mesh,
MMG5_int  ip 
)
Parameters
meshpointer toward mesh
ippoint index
Returns
index of one elt containing k or 0 (if no elt is found)

Return the index of one triangle containing k.

Definition at line 221 of file locate_2d.c.

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

◆ MMG2D_isInTriangle()

MMG5_int MMG2D_isInTriangle ( MMG5_pMesh  mesh,
MMG5_int  k,
double  c[2] 
)

Check whether c lies in triangle k; return k if so, 0 otherwise

Definition at line 69 of file locate_2d.c.

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

◆ MMG2D_locateEdge()

int MMG2D_locateEdge ( MMG5_pMesh  mesh,
MMG5_int  ia,
MMG5_int  ib,
MMG5_int *  kdep,
MMG5_int *  list 
)
Parameters
meshpointer toward the mesh
iaindex of first extremity of the edge
ibindex of second extremity of the edge
kdeppointer toward the index of the first element intersecting the edge
listpointer toward the list of elts intersected by the edge
Returns
4 if the edge exist in the mesh, 0 if fail, ??? otherwise

Calculate the list of all the triangles intersected by edge (ia,ib), starting from kdep = one triangle in the ball of ia; list starts at index 0 (and ends at index lon-1). It stores 3*k + iare, where k is an intersected tria and iare is an intersected edge.

prod1, prod2 and prod3 allow to localize the edge regarding the tria:

  • if all are >0, the edge doesn't cross the tria (same sign for all areas)
  • if 2 are negative and 1 is positive, the edge intersect 2 triangle edges
  • if 2 are 0, the edge pass through 1 of the tria vertices
  • if 3 are 0, the edge coincide with 1 of the tria edges

ia-ib intersect 2 triangle edges => 2 products are <0, 1 is >0

Definition at line 329 of file locate_2d.c.

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