mmgs
|
Various tools for the mmg applications. More...
#include "mmgcommon.h"
Functions | |
int | MMG5_devangle (double *n1, double *n2, double crit) |
int | MMG5_nonUnitNorPts (MMG5_pMesh mesh, int ip1, int ip2, int ip3, double *n) |
double | MMG5_nonorsurf (MMG5_pMesh mesh, MMG5_pTria pt) |
int | MMG5_norpts (MMG5_pMesh mesh, int ip1, int ip2, int ip3, double *n) |
int | MMG5_nortri (MMG5_pMesh mesh, MMG5_pTria pt, double *n) |
void | MMG5_mn (double m[6], double n[6], double mn[9]) |
int | MMG5_rmtr (double r[3][3], double m[6], double mr[6]) |
int | MMG5_rotmatrix (double n[3], double r[3][3]) |
int | MMG5_invmat (double *m, double *mi) |
int | MMG5_invmatg (double m[9], double mi[9]) |
int | MMG5_invmat33 (double m[3][3], double mi[3][3]) |
int | MMG5_sys33sym (double a[6], double b[3], double r[3]) |
void | MMG5_printTria (MMG5_pMesh mesh, char *fileName) |
size_t | MMG5_memSize (void) |
void | MMG5_memOption_memSet (MMG5_pMesh mesh) |
static int | MMG5_Alloc_inode (MMG5_pMesh mesh, MMG5_iNode **node) |
int | MMG5_Add_inode (MMG5_pMesh mesh, MMG5_iNode **liLi, int val) |
void | MMG5_Free_ilinkedList (MMG5_pMesh mesh, MMG5_iNode *liLi) |
static int | MMG5_Alloc_dnode (MMG5_pMesh mesh, MMG5_dNode **node) |
int | MMG5_Add_dnode (MMG5_pMesh mesh, MMG5_dNode **liLi, int k, double val) |
void | MMG5_Free_dlinkedList (MMG5_pMesh mesh, MMG5_dNode *liLi) |
double | MMG5_det3pt1vec (double c0[3], double c1[3], double c2[3], double v[3]) |
double | MMG5_det4pt (double c0[3], double c1[3], double c2[3], double c3[3]) |
double | MMG5_orvol (MMG5_pPoint point, int *v) |
double | MMG2D_quickarea (double a[2], double b[2], double c[2]) |
Various tools for the mmg applications.
double MMG2D_quickarea | ( | double | a[2], |
double | b[2], | ||
double | c[2] | ||
) |
a | point coordinates |
b | point coor |
c | point coor |
Compute tria area.
int MMG5_Add_dnode | ( | MMG5_pMesh | mesh, |
MMG5_dNode ** | liLi, | ||
int | k, | ||
double | val | ||
) |
mesh | pointer toward the mesh structure (for count of used memory). |
liLi | pointer toward the address of the root of the linked list. |
k | integer value to add to the linked list. |
val | real value to add to the linked list. |
Add a node with integer value k and real value val to a sorted linked list with unique entries.
int MMG5_Add_inode | ( | MMG5_pMesh | mesh, |
MMG5_iNode ** | liLi, | ||
int | val | ||
) |
mesh | pointer toward the mesh structure (for count of used memory). |
liLi | pointer toward the address of the root of the linked list. |
val | value to add to the linked list. |
Add a node with value val to a sorted linked list with unique entries.
|
inlinestatic |
mesh | pointer toward the mesh structure (for count of used memory). |
node | pointer toward a MMG5_dNode (cell for linked list) |
Node allocation.
|
inlinestatic |
mesh | pointer toward the mesh structure (for count of used memory). |
node | pointer toward a MMG5_iNode (cell for linked list) |
Node allocation.
|
inline |
Compute 3 * 3 determinant : det(c1-c0,c2-c0,v)
|
inline |
Compute 3 * 3 determinant : det(c1-c0,c2-c0,c3-c0)
int MMG5_devangle | ( | double * | n1, |
double * | n2, | ||
double | crit | ||
) |
n1 | first normal |
n2 | second normal |
Check if the angle between n1 and n2 is larger than the ridge criterion. If yes, return 1, 0 otherwise (ridge creation).
void MMG5_Free_dlinkedList | ( | MMG5_pMesh | mesh, |
MMG5_dNode * | liLi | ||
) |
mesh | pointer toward the mesh structure (for count of used memory). |
liLi | pointer toward the root of the linked list. |
Free the memory used by the linked list whose root is liLi.
void MMG5_Free_ilinkedList | ( | MMG5_pMesh | mesh, |
MMG5_iNode * | liLi | ||
) |
mesh | pointer toward the mesh structure (for count of used memory). |
liLi | pointer toward the root of the linked list. |
Free the memory used by the linked list whose root is liLi.
int MMG5_invmat | ( | double * | m, |
double * | mi | ||
) |
m | pointer toward a 3x3 symetric matrix |
mi | pointer toward the computed 3x3 matrix. |
Invert m (3x3 symetric matrix) and store the result on mi
int MMG5_invmat33 | ( | double | m[3][3], |
double | mi[3][3] | ||
) |
m | initial matrix. |
mi | inverted matrix. |
Invert 3x3 non-symmetric matrix stored in 2 dimensions
int MMG5_invmatg | ( | double | m[9], |
double | mi[9] | ||
) |
m | initial matrix. |
mi | inverted matrix. |
Invert 3x3 non-symmetric matrix.
void MMG5_memOption_memSet | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Set the memMax value to its "true" value (50% of the RAM or memory asked by user).
size_t MMG5_memSize | ( | void | ) |
Compute the available memory size of the computer.
void MMG5_mn | ( | double | m[6], |
double | n[6], | ||
double | mn[9] | ||
) |
m | symetric matrix |
n | symetric matrix |
mn | result |
Compute product m*n (mn stored in columns: mn[1] = mn[1][0]).
|
inline |
mesh | pointer toward the mesh stucture. |
pt | triangle for which we compute the surface. |
Compute non-oriented surface area of a triangle.
|
inline |
mesh | pointer toward the mesh stucture. |
ip1 | first point of face. |
ip2 | second point of face. |
ip3 | third point of face. |
n | pointer to store the computed normal. |
Compute non-normalized face normal given three points on the surface.
|
inline |
mesh | pointer toward the mesh stucture. |
ip1 | first point of face. |
ip2 | second point of face. |
ip3 | third point of face. |
n | pointer to store the computed normal. |
Compute normalized face normal given three points on the surface.
|
inline |
mesh | pointer toward the mesh stucture. |
pt | pointer toward the triangle structure. |
n | pointer to store the computed normal. |
Compute triangle normal.
|
inline |
point | Pointer toward the points array |
v | pointer toward the point indices |
Compute oriented volume of a tetrahedron
void MMG5_printTria | ( | MMG5_pMesh | mesh, |
char * | fileName | ||
) |
mesh | pointer toward the mesh structure. |
fileName | pointer toward the file name. |
Debug function (not use in clean code): write mesh->tria structure in file.
|
inline |
r | 3x3 matrix |
m | symetric matrix |
mr | result |
Compute product R*M*tR when M is symmetric
|
inline |
n | pointer toward the vector that we want to send on the third vector of canonical basis. |
r | computed rotation matrix. |
Compute rotation matrix that sends vector n to the third vector of canonical basis.
|
inline |
a | matrix to invert. |
b | last member. |
r | vector of unknowns. |
Solve symmetric system
.