Line | |
---|
1 | subroutine pvoldp |
---|
2 | c calculate the volume occupied by a typical superparticle |
---|
3 | c----------------------------------------------------------------------- |
---|
4 | include 'param_sz.h' |
---|
5 | include 'coordcom.h' |
---|
6 | include 'ncordscom.h' |
---|
7 | include 'psizescom.h' |
---|
8 | include 'ucom.h' |
---|
9 | c |
---|
10 | double precision xp,x,y,z,xav,yav,zav,xavsq,yavsq,zavsq,ag |
---|
11 | integer*4 i |
---|
12 | c-------------------------------------------------------------------------- |
---|
13 | c* |
---|
14 | c |
---|
15 | xp = float(ngood)**.666667 |
---|
16 | if (ngood.lt.8) return |
---|
17 | xav = 0. |
---|
18 | yav = 0. |
---|
19 | zav = 0. |
---|
20 | xavsq = 0. |
---|
21 | yavsq = 0. |
---|
22 | zavsq = 0. |
---|
23 | do 100 i = 1,ngood |
---|
24 | x = cord(1,i) |
---|
25 | y = cord(3,i) |
---|
26 | z = cord(5,i) |
---|
27 | xav = xav + x |
---|
28 | xavsq = xavsq + x*x |
---|
29 | yav = yav + y |
---|
30 | yavsq = yavsq + y*y |
---|
31 | zav = zav + z |
---|
32 | zavsq = zavsq + z*z |
---|
33 | 100 continue |
---|
34 | ag = ngood |
---|
35 | xsqsiz =pvfac*(xavsq/ag - (xav/ag)**2)/xp |
---|
36 | ysqsiz =pvfac*(yavsq/ag - (yav/ag)**2)/xp |
---|
37 | zsqsiz =pvfac*(zavsq/ag - (zav/ag)**2)/xp |
---|
38 | if(xsqsiz*ysqsiz*zsqsiz.le.0.) then |
---|
39 | write(ndiag,*) ' element part ref ',cord(7,1),' volume negatif' |
---|
40 | return |
---|
41 | endif |
---|
42 | xyzvol = dsqrt(xsqsiz*ysqsiz*zsqsiz) |
---|
43 | return |
---|
44 | end |
---|
45 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
Note: See
TracBrowser
for help on using the repository browser.