1 |
|
1 |
/*****************************************************************
|
2 |
|
|
|
3 |
|
|
m3d_ord_tet.cpp Type:Func
|
4 |
|
|
|
5 |
|
|
Tri des qualite des tetra
|
6 |
|
|
|
7 |
|
|
Date de creation : 19-4-1999 9 :41 :15
|
8 |
|
|
Derniere version : 19-4-1999 9 :41 :15
|
9 |
|
|
|
10 |
|
|
Vincent FRANCOIS
|
11 |
|
|
|
12 |
|
|
*****************************************************************/
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
/**************************/
|
19 |
|
|
/* include */
|
20 |
|
|
#include <stdio.h>
|
21 |
|
|
#include <math.h>
|
22 |
|
|
#include "const.h"
|
23 |
|
|
#include "memoire.h"
|
24 |
|
|
#include "struct.h"
|
25 |
|
|
#include "prototype.h"
|
26 |
|
|
|
27 |
|
|
/**************************/
|
28 |
|
|
/* variables globales */
|
29 |
|
|
extern struct environnement env;
|
30 |
|
|
extern struct s_mesh *mesh;
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
/**************************/
|
36 |
|
|
/* programme principal */
|
37 |
|
|
|
38 |
|
|
void m3d_ord_tet(struct s_tetra *tet)
|
39 |
|
|
{
|
40 |
|
|
int num;
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
num=(int)(tet->crit*10.);
|
46 |
|
|
if (num>9) num=9;
|
47 |
|
|
if (mesh->tete_tetra[num]==NULL)
|
48 |
|
|
{
|
49 |
|
|
mesh->tete_tetra[num]=tet;
|
50 |
|
|
tet->precedent=NULL;
|
51 |
|
|
tet->suivant=NULL;
|
52 |
|
|
mesh->queue_tetra[num]=tet;
|
53 |
|
|
}
|
54 |
|
|
else
|
55 |
|
|
{
|
56 |
|
|
tet->precedent=mesh->queue_tetra[num];
|
57 |
|
|
mesh->queue_tetra[num]->suivant=tet;
|
58 |
|
|
mesh->queue_tetra[num]=tet;
|
59 |
|
|
tet->suivant=NULL;
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
}
|