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

File Contents

# Content
1 /*****************************************************************
2
3 eval_fdn2b_eps.c Type:Func
4
5 Calcul de la densite en un point d une surface non plane
6
7 Date de creation : Wed May 14 17:53:55 1997
8
9 Derniere version : Tue Jul 29 11:20:33 1997
10
11
12
13
14
15
16
17
18 Vincent FRANCOIS
19
20 *****************************************************************/
21
22
23
24
25
26 /**************************/
27 /* include */
28 #include <stdio.h>
29 #include <string.h>
30 #include <math.h>
31 #include <stdlib.h>
32 #include "const.h"
33 #include "memoire.h"
34 #include "struct.h"
35 #include "prototype.h"
36
37
38 /**************************/
39 /* variables globales */
40 extern struct environnement env;
41 extern struct s_mesh *mesh;
42 extern struct s_acis *acis;
43
44
45
46 /**************************/
47 /* programme principal */
48
49 float eval_fdn2_eps(struct s_face *face,float u,float v)
50 {
51 float x,y,z,du,dv,de,dg;
52 float e,g,dens,xuu[4],xuv[4],xvv[4];
53 float xu[4],xv[4];
54 float m1[4],m2[4],m3[4];
55
56 du=0.;dv=0.;
57 if (strcmp(acis->type_entite[face->surface],"plane-surface")==0)
58 {
59 return(env.dens*10000.);
60 }
61 e=eval_face(face,&u,&v,E,&x,&y,&z,du,dv);
62 g=eval_face(face,&u,&v,G,&x,&y,&z,du,dv);
63 de=eval_face(face,&u,&v,EU,&x,&y,&z,du,dv);
64 dg=eval_face(face,&u,&v,GV,&x,&y,&z,du,dv);
65 eval_face(face,&u,&v,DUU,&xuu[0],&xuu[1],&xuu[2],du,dv);
66 eval_face(face,&u,&v,DUV,&xuv[0],&xuv[1],&xuv[2],du,dv);
67 eval_face(face,&u,&v,DVV,&xvv[0],&xvv[1],&xvv[2],du,dv);
68 eval_face(face,&u,&v,DU,&xu[0],&xu[1],&xu[2],du,dv);
69 eval_face(face,&u,&v,DV,&xv[0],&xv[1],&xv[2],du,dv);
70 m1[0]=(float)(xuu[0]/e-0.5*xu[0]*de/e/e);
71 m1[1]=(float)(xuu[1]/e-0.5*xu[1]*de/e/e);
72 m1[2]=(float)(xuu[2]/e-0.5*xu[2]*de/e/e);
73 m2[0]=(float)(xuv[0]/sqrt((double)(e*g)));
74 m2[1]=(float)(xuv[1]/sqrt((double)(e*g)));
75 m2[2]=(float)(xuv[2]/sqrt((double)(e*g)));
76 m3[0]=(float)(xvv[0]/g-0.5*xv[0]*dg/g/g);
77 m3[1]=(float)(xvv[1]/g-0.5*xv[1]*dg/g/g);
78 m3[2]=(float)(xvv[2]/g-0.5*xv[2]*dg/g/g);
79 NORME(m1);
80 NORME(m2);
81 NORME(m3);
82 if (env.relatif==0) dens=(float)sqrt((double)(4.5*env.epsilon/(m1[3]+2*m2[3]+m3[3])));
83 else dens=(float)sqrt((double)(4.5*env.epsilon/(m1[3]+2*m2[3]+m3[3])/(m1[3]+2*m2[3]+m3[3])));
84
85 return(dens);
86 }