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

Various algorithmic and algebraic tools. More...

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

Go to the source code of this file.

Functions

int MMG5_isbr (MMG5_pMesh mesh, MMG5_int ref)
 
int MMG5_norface (MMG5_pMesh mesh, MMG5_int k, int iface, double n[3])
 
int MMG5_directsurfball (MMG5_pMesh mesh, MMG5_int ip, MMG5_int *list, int ilist, double n[3])
 
int MMG5_startedgsurfball (MMG5_pMesh mesh, MMG5_int nump, MMG5_int numq, MMG5_int *list, int ilist)
 
int MMG5_BezierRidge (MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no1, double *no2, double *to)
 
int MMG5_BezierRef (MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no, double *to)
 
int MMG5_BezierNom (MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double *o, double *no, double *to)
 
int MMG5_BezierReg (MMG5_pMesh mesh, MMG5_int ip0, MMG5_int ip1, double s, double v[3], double *o, double *no)
 
MMG5_int MMG3D_indElt (MMG5_pMesh mesh, MMG5_int kel)
 
MMG5_int MMG3D_indPt (MMG5_pMesh mesh, MMG5_int kp)
 
void MMG5_printTetra (MMG5_pMesh mesh, char *fileName)
 
int MMG3D_localParamReg (MMG5_pMesh mesh, MMG5_int ip, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, double *hausd_ip, double *hmin_ip, double *hmax_ip)
 
int MMG3D_localParamNm (MMG5_pMesh mesh, MMG5_int iel, int iface, int ia, double *hausd_ip, double *hmin_ip, double *hmax_ip)
 
static void MMG3D_mark_usedVertices (MMG5_pMesh mesh)
 
static void MMG3D_keep_subdomainElts (MMG5_pMesh mesh, int nsd)
 
void MMG3D_keep_only1Subdomain (MMG5_pMesh mesh, int nsd)
 

Variables

int8_t ddb
 

Detailed Description

Various algorithmic and algebraic tools.

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 tools_3d.c.

Function Documentation

◆ MMG3D_indElt()

MMG5_int MMG3D_indElt ( MMG5_pMesh  mesh,
MMG5_int  kel 
)

find the element number in packed numerotation

Definition at line 860 of file tools_3d.c.

Here is the caller graph for this function:

◆ MMG3D_indPt()

MMG5_int MMG3D_indPt ( MMG5_pMesh  mesh,
MMG5_int  kp 
)

find the point number in packed numerotation

Definition at line 916 of file tools_3d.c.

Here is the caller graph for this function:

◆ MMG3D_keep_only1Subdomain()

void MMG3D_keep_only1Subdomain ( MMG5_pMesh  mesh,
int  nsd 
)
Parameters
meshpointer toward the mesh structure.
nsdindex of subdomain to keep.

Keep only subdomain of index nsd and remove other subdomains.

Definition at line 1391 of file tools_3d.c.

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

◆ MMG3D_keep_subdomainElts()

static void MMG3D_keep_subdomainElts ( MMG5_pMesh  mesh,
int  nsd 
)
static
Parameters
meshpointer toward the mesh structure.
nsdsubdomain index.

Remove tetra that do not belong to subdomain of index nsd

Definition at line 1342 of file tools_3d.c.

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

◆ MMG3D_localParamNm()

int MMG3D_localParamNm ( MMG5_pMesh  mesh,
MMG5_int  iel,
int  iface,
int  ia,
double *  hausd_ip,
double *  hmin_ip,
double *  hmax_ip 
)
Parameters
meshpointer toward the mesh structure.
ielindex of tetra in which we work
ifaceindex of face in iel
iaindex of edge in iel along which we want to compute the local parameters
hausd_ippointer toward the local hausdorff parameter to compute
hmin_ippointer toward the local minimal edge size to compute
hmax_ippointer toward the local maximal edge size to compute
Returns
1 if success, 0 if fail

Compute the local parameters at non manifold point ip.

Definition at line 1143 of file tools_3d.c.

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

◆ MMG3D_localParamReg()

int MMG3D_localParamReg ( MMG5_pMesh  mesh,
MMG5_int  ip,
int64_t *  listv,
int  ilistv,
MMG5_int *  lists,
int  ilists,
double *  hausd_ip,
double *  hmin_ip,
double *  hmax_ip 
)
Parameters
meshpointer toward the mesh structure.
ipglobal index of point in which we want to compute the local parameters
listvpointer toward the ball of ip
ilistvnumber of tetra in the ball of ip
listspointer toward the surface ball of ip
ilistsnumber of tetra in the surface ball of ip
hausd_ippointer toward the local hausdorff parameter to compute
hmin_ippointer toward the local minimal edge size to compute
hmax_ippointer toward the local maximal edge size to compute
Returns
1 if success, 0 if fail

Compute the local parameters at point ip (the volume and surface ball of point must be provided).

Definition at line 1023 of file tools_3d.c.

Here is the caller graph for this function:

◆ MMG3D_mark_usedVertices()

static void MMG3D_mark_usedVertices ( MMG5_pMesh  mesh)
inlinestatic
Parameters
meshpointer toward the mesh structure.

Mark the mesh vertices that belong to triangles or quadrangles as used (for Mmgs or Mmg2d).

Definition at line 1289 of file tools_3d.c.

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

◆ MMG5_BezierNom()

int MMG5_BezierNom ( MMG5_pMesh  mesh,
MMG5_int  ip0,
MMG5_int  ip1,
double  s,
double *  o,
double *  no,
double *  to 
)
inline
Parameters
meshmesh
ip0first edge extremity
ip1second edge extremity
sparameter value
opoint coordinates
nonormal at point o (to fill)
totangent at point o along edge ip0 ip1 (to fill)
Returns
0 if fail, 1 otherwise
Warning
return 1 without filling no if the edge has 2 singular extremities.

Compute point located at parameter value s from point ip0, as well as interpolate of normals, tangent for a NOM edge

Definition at line 527 of file tools_3d.c.

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

◆ MMG5_BezierRef()

int MMG5_BezierRef ( MMG5_pMesh  mesh,
MMG5_int  ip0,
MMG5_int  ip1,
double  s,
double *  o,
double *  no,
double *  to 
)
inline
Parameters
meshmesh
ip0first edge extremity
ip1second edge extremity
sparameter value
opoint coordinates
nonormal at point o (to fill)
totangent at point o (to fill)
Returns
0 if fail, 1 otherwise
Warning
return 1 without filling no if the edge has 2 singular extremities.

Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a REF edge.

Definition at line 352 of file tools_3d.c.

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

◆ MMG5_BezierReg()

int MMG5_BezierReg ( MMG5_pMesh  mesh,
MMG5_int  ip0,
MMG5_int  ip1,
double  s,
double  v[3],
double *  o,
double *  no 
)
inline
Parameters
meshmesh
ip0first edge extremity
ip1second edge extremity
sparameter value
vreference normal
opoint coordinates
nonormal at point o (to fill)
Returns
0 if fail, 1 otherwise
Warning
return 1 without filling no if the edge has 2 singular extremities.

Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a regular edge ; v = ref vector (normal) for choice of normals if need be

Definition at line 694 of file tools_3d.c.

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

◆ MMG5_BezierRidge()

int MMG5_BezierRidge ( MMG5_pMesh  mesh,
MMG5_int  ip0,
MMG5_int  ip1,
double  s,
double *  o,
double *  no1,
double *  no2,
double *  to 
)
inline
Parameters
meshmesh
ip0first edge extremity
ip1second edge extremity
sparameter value
opoint coordinates
no1normal at point o (to fill)
no2normal at point o (to fill)
totangent at point o (to fill)
Returns
0 if fail, 1 otherwise
Warning
return 1 without filling no1 and no2 if the edge has 2 singular extremities.

Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a RIDGE edge

Definition at line 145 of file tools_3d.c.

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

◆ MMG5_directsurfball()

int MMG5_directsurfball ( MMG5_pMesh  mesh,
MMG5_int  ip,
MMG5_int *  list,
int  ilist,
double  n[3] 
)
inline

If need be, invert the travelling sense of surfacic ball so that it is travelled in the direct sense with respect to direction n anchored at point ip (ip = global num.): return 2 = orientation reversed, 1 otherwise

Definition at line 66 of file tools_3d.c.

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

◆ MMG5_isbr()

int MMG5_isbr ( MMG5_pMesh  mesh,
MMG5_int  ref 
)

Return 1 if reference ref is in the br table, 0 otherwise

Definition at line 42 of file tools_3d.c.

◆ MMG5_norface()

int MMG5_norface ( MMG5_pMesh  mesh,
MMG5_int  k,
int  iface,
double  n[3] 
)

Compute normal to face iface of tetra k, exterior to tetra k

Definition at line 52 of file tools_3d.c.

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

◆ MMG5_printTetra()

void MMG5_printTetra ( MMG5_pMesh  mesh,
char *  fileName 
)

Debug function (not use in clean code): print mesh->tetra structure

Definition at line 973 of file tools_3d.c.

◆ MMG5_startedgsurfball()

int MMG5_startedgsurfball ( MMG5_pMesh  mesh,
MMG5_int  nump,
MMG5_int  numq,
MMG5_int *  list,
int  ilist 
)

If need be, reorder the surfacic ball of point ip, so that its first element has edge (p,q) (nump,q = global num) as edge MMG5_iprv2[ip] of face iface. return 2 = orientation reversed, 1 otherwise

Definition at line 91 of file tools_3d.c.

Here is the caller graph for this function:

Variable Documentation

◆ ddb

int8_t ddb
extern

Definition at line 42 of file mmg3d1_delone.c.