ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/acismesh/m3d_fin.cpp
Revision: 1
Committed: Mon Jun 11 22:53:07 2007 UTC (17 years, 11 months ago)
File size: 1864 byte(s)
Log Message:

File Contents

# User Rev Content
1 1 /*****************************************************************
2    
3     m3d_fin.cpp Type:Func
4    
5     Statistique du maillage 3D
6    
7     Date de creation : 9-9-1997 10 :58 :4
8     Derniere version : 9-9-1997 10 :58 :4
9    
10     Vincent FRANCOIS
11    
12     *****************************************************************/
13    
14    
15    
16    
17    
18     /**************************/
19     /* include */
20     #include <stdio.h>
21     #include "const.h"
22     #include "struct.h"
23     #include "memoire.h"
24     #include "prototype.h"
25    
26     /**************************/
27     /* variables globales */
28     extern struct environnement env;
29     extern struct s_mesh *mesh;
30    
31    
32    
33     /**************************/
34     /* programme principal */
35    
36     void m3d_fin(void)
37     {
38     struct s_tetra *tet;
39     int i;
40    
41    
42    
43    
44     mesh->critmoy=0.;
45     mesh->critmin=1.;
46     mesh->critmax=0.;
47     mesh->tabcrit[0]=0;
48     mesh->tabcrit[1]=0;
49     mesh->tabcrit[2]=0;
50     mesh->tabcrit[3]=0;
51     for (i=0;i<mesh->nb_tetra;i++)
52     {
53     tet=ADRESSE(i,tetra,mesh->);
54     tet->crit=m3d_cal_qual(tet->n1,tet->n2,tet->n3,tet->n4);
55     mesh->critmoy=mesh->critmoy+tet->crit;
56     if (mesh->critmin>tet->crit) mesh->critmin=tet->crit;
57     if (mesh->critmax<tet->crit) mesh->critmax=tet->crit;
58     if (tet->crit>0.5) mesh->tabcrit[3]++;
59     else if (tet->crit>0.2) mesh->tabcrit[2]++;
60     else if (tet->crit>0.1) mesh->tabcrit[1]++;
61     else mesh->tabcrit[0]++;
62     }
63     }