mmg2d
locate_2d.c File Reference
#include "mmg2d.h"
Include dependency graph for locate_2d.c:

Macros

#define EPST   -1e-18
 

Functions

int MMG2D_coorbary (MMG5_pMesh mesh, MMG5_pTria pt, double c[2], double *det, double *l1, double *l2)
 
int MMG2D_isInTriangle (MMG5_pMesh mesh, 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, int k, int ia, int ib)
 
int MMG2D_findTria (MMG5_pMesh mesh, int ip)
 
int MMG2D_locateEdge (MMG5_pMesh mesh, int ia, int ib, int *kdep, int *list)
 

Detailed Description

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

Macro Definition Documentation

◆ EPST

#define EPST   -1e-18

Function Documentation

◆ MMG2D_coorbary()

int MMG2D_coorbary ( MMG5_pMesh  mesh,
MMG5_pTria  pt,
double  c[2],
double *  det,
double *  l1,
double *  l2 
)
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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_cutEdgeTriangle()

int MMG2D_cutEdgeTriangle ( MMG5_pMesh  mesh,
int  k,
int  ia,
int  ib 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_findTria()

int MMG2D_findTria ( MMG5_pMesh  mesh,
int  ip 
)

Return the index of one triangle containing ip

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

◆ MMG2D_isInTriangle()

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

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

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

◆ MMG2D_locateEdge()

int MMG2D_locateEdge ( MMG5_pMesh  mesh,
int  ia,
int  ib,
int *  kdep,
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

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