mmg3d
|
Tools for local search around coordinates based on octree. More...
Tools for local search around coordinates based on octree.
An octree of the nodes is created and used for local neighbor search. This helps deciding if a position is too close to other nodes to refine with an insertion of a new node.
commande test : ctest -D Experimental -VV avec tunel ssh ouvert ssh : ssh -f -L 2000:vulcain.bordeaux.inria.fr:80 jmerc sleep <temps voulu>=""> at@v ulcai n.bo rdeau x.in ria.f r
se connecter : localhost:2000/CDash
int _MMG3D_addOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree | q, | ||
const int | no | ||
) |
pointer | toward the mesh structure |
q | pointer toward the global octree structure |
no | index of the point to add to the octree |
Add the vertex of index no to the octree.
int _MMG3D_addOctreeRec | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree 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 octree cell. |
Add vertex in the suitable quadrant of the octree. 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.
int _MMG3D_delOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree | q, | ||
const int | no | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree. |
no | reference of the vertex to be deleted. |
Delete the vertex no from the octree structure.
int _MMG3D_delOctreeRec | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
const int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree 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 octree cell. |
Delete vertex no from the octree. This function is recursively called until we reach the terminal octree 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.
int _MMG3D_delOctreeVertex | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | indNo | ||
) |
q | pointer toward a terminal octree cell (containing vertex) |
no | index of the point to delete from the octree |
Delete the vertex of index no from the terminal octree cell, merge the cells if necessary.
void _MMG3D_freeOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree * | q | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward a pointer toward the global octree. |
Free the global octree structure.
void _MMG3D_freeOctree_s | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the octree cell |
nv | number of vertices in the cell subtree |
Free the octree cell.
int _MMG3D_getListSquare | ( | MMG5_pMesh | mesh, |
double * | ani, | ||
_MMG3D_pOctree | q, | ||
double * | rect, | ||
_MMG3D_octree_s *** | qlist | ||
) |
mesh | pointer toward the mesh structure |
ani | metric to use for the cell ordering from closest to farthest |
q | pointer toward the global octree structure. |
rect | rectangle that we want to intersect with the subtree. We define it given: the coordinates of one corner of the rectangle and the length of the rectangle in each dimension. |
qlist | pointer toward the list of pointer over the sub octrees that intersect rect. |
List the number of octree cells that intersect the rectangle rect.
int _MMG3D_getListSquareRec | ( | _MMG3D_octree_s * | q, |
double * | center, | ||
double * | rect, | ||
_MMG3D_octree_s *** | qlist, | ||
double * | dist, | ||
double * | ani, | ||
double | l0, | ||
int | nc, | ||
int | dim, | ||
int * | index | ||
) |
q | pointer toward the octree 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 toward the list of pointer over the sub octrees that intersect rect. |
dist | pointer toward the list of distances between center of the octree 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 octree cells that intersect rect |
List the number of octree cells that intersect the rectangle rect. To avoid counting of the cells, a maximum is set.
int64_t _MMG3D_getOctreeCoordinate | ( | _MMG3D_pOctree | q, |
double * | ver, | ||
int | dim | ||
) |
q | pointer toward the global octree. |
ver | coordinates of the point. |
dim | space dimension (should be 3). |
Get the integer containing the coordinates
int _MMG3D_initOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree |
nv | maximum number of vertices in each cell before subdivision |
Initialisation of the octree cell.
void _MMG3D_initOctree_s | ( | _MMG3D_octree_s * | q | ) |
q | pointer toward the octree cell |
Initialisation of the octree cell.
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.
int _MMG3D_isCellIncluded | ( | double * | cellCenter, |
double | l, | ||
double * | zoneCenter, | ||
double | l0 | ||
) |
cellCenter | 3 coordinates of the center of the octree cell to test. |
l | size of the cell |
zoneCenter | 3 coordinates of the center of the search zone |
radius | of the search zone |
void _MMG3D_mergeBranches | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | dim, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree cell. |
dim | dimension of the space (=3) |
nv | maximum number of points in an octree cell. |
Merge branches that have a parent counting less than nv vertices.
void _MMG3D_mergeBranchesRec | ( | _MMG3D_octree_s * | q0, |
_MMG3D_octree_s * | q, | ||
int | dim, | ||
int | nv, | ||
int * | index | ||
) |
q0 | pointer toward an octree cell. |
q | pointer toward an octree cell. |
dim | dimension of the space (=3). |
nv | maximum number of points in an octree 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.
int _MMG3D_moveOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree | q, | ||
int | no, | ||
double * | newVer, | ||
double * | oldVer | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree. |
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 octree 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 octree. (ie: one move at a time in the mesh and the octree)
int _MMG3D_octreein_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
_MMG3D_pOctree | octree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
octree | pointer toward the octree structure. |
ip | index of point to check. |
Check if the vertex ip is not too close from another one (for an anisotropic metric).
int _MMG3D_octreein_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
_MMG3D_pOctree | octree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
octree | pointer toward the octree structure. |
ip | index of point to check. |
Check if the vertex ip is not too close from another one (for an isotropic metric).
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.
void _MMG3D_placeInListOctree | ( | _MMG3D_octree_s ** | qlist, |
_MMG3D_octree_s * | q, | ||
int | index, | ||
int | size | ||
) |
qList | list of pointer on octree. |
q | pointer on octree 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.
void _MMG3D_printArbre | ( | _MMG3D_pOctree | q | ) |
q | pointer toward the global octree structure |
Print the octree.
void _MMG3D_printArbreDepth | ( | _MMG3D_octree_s * | q, |
int | depth, | ||
int | nv, | ||
int | dim | ||
) |
q | pointer toward an octree 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.
void _MMG3D_printSubArbre | ( | _MMG3D_octree_s * | q, |
int | nv, | ||
int | dim | ||
) |
q | pointer toward an octree cell |
nv | maximum number of vertices in an octree leaf |
dim | spacial dimension |
Print the octree.
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. |
int* _MMG3D_sizeArbre | ( | _MMG3D_pOctree | q, |
int | dim | ||
) |
q | pointer toward the global octree structure |
dim | dimension in which we work |
Print the octree memory size.
|
inlinestatic |
q | pointer toward the global octree |
Print the memory size of the octree for point stored with a linked list.
|
inlinestatic |
q | pointer toward an octree cell |
nv | number of vertices in the subtree |
dim | dimension in which we work |
Print the memory size of the octree for point stored with a linked list.
void _MMG3D_sizeArbreRec | ( | _MMG3D_octree_s * | q, |
int | nv, | ||
int | dim, | ||
int * | s1, | ||
int * | s2 | ||
) |
q | pointer toward an octree cell |
nv | maximum number of vertices in an octree leaf |
dim | dimension in which we work |
s | size of the octree |
Print the memory size of the octree.
|
inlinestatic |
q | pointer toward the global octree |
???