Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
#include "libmmgtypes.h"
Go to the source code of this file.
Data Structures | |
struct | MMG3D_PROctree_s |
struct | MMG3D_PROctree |
Typedefs | |
typedef struct MMG3D_PROctree_s | MMG3D_PROctree_s |
typedef MMG3D_PROctree * | MMG3D_pPROctree |
typedef MMG3D_PROctree* MMG3D_pPROctree |
Definition at line 52 of file PRoctree_3d_private.h.
typedef struct MMG3D_PROctree_s MMG3D_PROctree_s |
PROctree cell: cellule for point region octree (to speed-up the research of the closest point to another one).
int MMG3D_addPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree * | q, | ||
const MMG5_int | no | ||
) |
int MMG3D_addPROctreeRec | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
double * | ver, | ||
const MMG5_int | no, | ||
int | nv | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to an PROctree cell. |
ver | vertex coordinates scaled such that the quadrant is [0;1]x[0;1]x[0;1] |
no | vertex index in the mesh. |
nv | maximum number of points in an PROctree cell. |
Add vertex in the suitable quadrant of the PROctree. This function is recursively called until we reach the last one. At each step, the vertex coordinates are scaled such as the quadrant is the [0;1]x[0;1]x[0;1] box.
Definition at line 650 of file PRoctree_3d.c.
int MMG3D_delPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree | q, | ||
const int | no | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to the global PROctree. |
no | reference of the vertex to be deleted. |
Delete the vertex no from the PROctree structure.
Definition at line 977 of file PRoctree_3d.c.
int MMG3D_delPROctreeRec | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
double * | ver, | ||
const MMG5_int | no, | ||
const int | nv | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to an PROctree cell. |
ver | vertex coordinates scaled such that the quadrant is [0;1]x[0;1]x[0;1] |
no | vertex index in the mesh. |
nv | maximum number of points in an PROctree cell. |
Delete vertex no from the PROctree. This function is recursively called until we reach the terminal PROctree cell containing the vertex no. At each step, the vertex coordinates are scaled such as the quadrant is the [0;1]x[0;1]x[0;1] box.
Definition at line 896 of file PRoctree_3d.c.
int MMG3D_delPROctreeVertex | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
MMG5_int | indNo | ||
) |
q | pointer to a terminal PROctree cell (containing vertex) |
no | index of the point to delete from the PROctree |
Delete the vertex of index no from the terminal PROctree cell, merge the cells if necessary.
Definition at line 800 of file PRoctree_3d.c.
void MMG3D_freePROctree | ( | MMG5_pMesh | , |
MMG3D_PROctree ** | q | ||
) |
void MMG3D_freePROctree_s | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
int | nv | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to the PROctree cell |
nv | number of vertices in the cell subtree |
Free the PROctree cell.
Definition at line 113 of file PRoctree_3d.c.
int MMG3D_getListSquare | ( | MMG5_pMesh | , |
double * | , | ||
MMG3D_PROctree * | , | ||
double * | , | ||
MMG3D_PROctree_s *** | |||
) |
int MMG3D_getListSquareRec | ( | MMG3D_PROctree_s * | q, |
double * | center, | ||
double * | rect, | ||
MMG3D_PROctree_s *** | qlist, | ||
double * | dist, | ||
double * | ani, | ||
double | l0, | ||
int | nc, | ||
int | dim, | ||
int * | index | ||
) |
q | pointer to the PROctree cell. |
center | coordinates of the centre of the current subtree. |
rect | rectangle that we want to intersect with the subtree. We define it given: the coordinates of one corner of the rectange and the length of the rectangle in each dimension. |
qlist | pointer to the list of pointer over the sub PROctrees that intersect rect. |
dist | pointer to the list of distances between center of the PROctree cells in qlist and the last 3 elements are the coordinates of the center of the whole recangle. |
ani | metric of the point. |
l0 | radius of the search zone. |
nc | number max of cell in the list +3 (the three last. |
dim | dimension =3. |
index | number of PROctree cells that intersect rect |
List the number of PROctree cells that intersect the rectangle rect. To avoid counting of the cells, a maximum is set.
Definition at line 443 of file PRoctree_3d.c.
int64_t MMG3D_getPROctreeCoordinate | ( | MMG3D_pPROctree | q, |
double * | ver, | ||
int | dim | ||
) |
q | pointer to the global PROctree. |
ver | coordinates of the point. |
dim | space dimension (should be 3). |
Get the integer containing the coordinates
Definition at line 183 of file PRoctree_3d.c.
int MMG3D_initPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree * | q, | ||
int | nv | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to the global PROctree |
nv | maximum number of vertices in each cell before subdivision |
Initialisation of the PROctree cell.
Definition at line 65 of file PRoctree_3d.c.
void MMG3D_initPROctree_s | ( | MMG3D_PROctree_s * | q | ) |
q | pointer to the PROctree cell |
Initialisation of the PROctree cell.
Definition at line 48 of file PRoctree_3d.c.
int MMG3D_intersectRect | ( | double * | rectin, |
double * | rectinout | ||
) |
rectin | rectangle to intersect, is not modified. |
rectinout | rectangle to intersect, is set to the intersection. |
Set rectinout to the intersection of the two rectangles. Rectangles are defined by: the coordinates of the lower left corner of the rectange and the length of the rectangle in each dimension.
Definition at line 385 of file PRoctree_3d.c.
int MMG3D_isCellIncluded | ( | double * | cellCenter, |
double | l, | ||
double * | zoneCenter, | ||
double | l0 | ||
) |
cellCenter | 3 coordinates of the center of the PROctree cell to test. |
l | size of the cell |
zoneCenter | 3 coordinates of the center of the search zone |
radius | of the search zone |
Definition at line 265 of file PRoctree_3d.c.
void MMG3D_mergeBranches | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
int | dim, | ||
int | nv | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to an PROctree cell. |
dim | dimension of the space (=3) |
nv | maximum number of points in an PROctree cell. |
Merge branches that have a parent counting less than nv vertices.
Definition at line 864 of file PRoctree_3d.c.
void MMG3D_mergeBranchesRec | ( | MMG3D_PROctree_s * | q0, |
MMG3D_PROctree_s * | q, | ||
int | dim, | ||
int | nv, | ||
int * | index | ||
) |
q0 | pointer to an PROctree cell. |
q | pointer to an PROctree cell. |
dim | dimension of the space (=3). |
nv | maximum number of points in an PROctree cell. |
index | next index in the array to be filled. |
Merge sub-branches q of q0, in their parent q0. q0 should contain no more than nv vertices.
Definition at line 835 of file PRoctree_3d.c.
int MMG3D_movePROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree | q, | ||
MMG5_int | no, | ||
double * | newVer, | ||
double * | oldVer | ||
) |
mesh | pointer to the mesh structure. |
q | pointer to the global PROctree. |
no | index of the moved point. |
newVer | new coordinates for the moved point. |
oldVer | old coordinates for the moved point. |
Move one point in the PROctree structure. /!\ the vertex of index no can have either the new or the old coordinates in the mesh but all other vertice should have the same coordinates as when they were inserted into the PROctree. (ie: one move at a time in the mesh and the PROctree)
Definition at line 225 of file PRoctree_3d.c.
void MMG3D_placeInListDouble | ( | double * | distList, |
double | dist, | ||
int | index, | ||
int | size | ||
) |
distList | list of values. |
dist | value to insert in the list. |
index | position of the element before the place where dist should be inserted. |
size | size of the list before insertion. |
Insert the value dist in the list distList at position index+1. Moves other data so nothing is lost. No memory check performed, this function should be called with coherent parameters.
Definition at line 298 of file PRoctree_3d.c.
void MMG3D_placeInListPROctree | ( | MMG3D_PROctree_s ** | qlist, |
MMG3D_PROctree_s * | q, | ||
int | index, | ||
int | size | ||
) |
qList | list of pointer on PROctree. |
q | pointer on PROctree to be inserted in the list. |
index | position of the element before the place where q should be inserted. |
size | size of the list before insertion. |
Insert the pointer q in the list qList at position index+1. Moves other data so nothing is lost. No memory check performed, this function should be called with coherent parameters.
Definition at line 316 of file PRoctree_3d.c.
void MMG3D_printArbre | ( | MMG3D_PROctree * | q | ) |
void MMG3D_printArbreDepth | ( | MMG3D_PROctree_s * | q, |
int | depth, | ||
int | nv, | ||
int | dim | ||
) |
q | pointer to an PROctree cell |
depth | depth of the subtree |
nv | number of vertices in the subtree |
dim | dimension in which we work |
Print the depth depth of the subtree of q.
Definition at line 1005 of file PRoctree_3d.c.
int MMG3D_PROctreein_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG3D_pPROctree | PROctree, | ||
MMG5_int | ip, | ||
double | lmax | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the solution structure. |
PROctree | pointer to the PROctree structure. |
ip | index of point to check. |
lmax | threshold to check minimal distance between points. |
Check if the vertex ip is not too close from another one (for an anisotropic metric).
Definition at line 1225 of file PRoctree_3d.c.
int MMG3D_PROctreein_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG3D_pPROctree | PROctree, | ||
MMG5_int | ip, | ||
double | lmax | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the solution structure. |
PROctree | pointer to the PROctree structure. |
ip | index of point to check. |
lmax | threshold to check minimal distance between points. |
Check if the vertex ip is not too close from another one (for an isotropic metric).
Definition at line 1143 of file PRoctree_3d.c.
int MMG3D_seekIndex | ( | double * | distList, |
double | dist, | ||
int | indexMin, | ||
int | indexMax | ||
) |
distList | ordered list of value from smallest to largest. |
dist | value to be compared to elements in the list. |
indexMin | minimum index of the list. |
indexMax | maximum index of the list. |
Definition at line 337 of file PRoctree_3d.c.
int * MMG3D_sizeArbre | ( | MMG3D_PROctree * | q, |
int | dim | ||
) |
void MMG3D_sizeArbreRec | ( | MMG3D_PROctree_s * | q, |
int | nv, | ||
int | dim, | ||
int * | s1, | ||
int * | s2 | ||
) |
q | pointer to an PROctree cell |
nv | maximum number of vertices in an PROctree leaf |
dim | dimension in which we work |
s | size of the PROctree |
Print the memory size of the PROctree.
Definition at line 1077 of file PRoctree_3d.c.