332 |
|
extern char *atos(); |
333 |
|
register int i; |
334 |
|
int n; |
335 |
< |
double len[3], maxlen, d; |
335 |
> |
double len[3], d; |
336 |
|
char buf[64]; |
337 |
|
|
338 |
|
if (!vdef(SECTION)) { |
366 |
|
&gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2], |
367 |
|
&gp->grid[0], &gp->grid[1], &gp->grid[2]) < 12) |
368 |
|
badvalue(SECTION); |
369 |
– |
maxlen = 0.; |
369 |
|
for (i = 0; i < 3; i++) |
370 |
< |
if ((len[i] = VLEN(gp->xv[i])) > maxlen) |
371 |
< |
maxlen = len[i]; |
372 |
< |
if (!vdef(GRID)) |
373 |
< |
d = 0.125*maxlen; |
374 |
< |
else if ((d = vflt(GRID)) <= FTINY) |
370 |
> |
len[i] = VLEN(gp->xv[i]); |
371 |
> |
if (!vdef(GRID)) { |
372 |
> |
d = 2/5e5*( len[0]*len[0]*(len[1]*len[1] + |
373 |
> |
len[2]*len[2] + 4*len[1]*len[2]) |
374 |
> |
+ len[1]*len[1]*len[2]*(len[2] + 4*len[0]) |
375 |
> |
+ 4*len[0]*len[1]*len[2]*len[2] ); |
376 |
> |
d = sqrt(sqrt(d)); |
377 |
> |
} else if ((d = vflt(GRID)) <= FTINY) |
378 |
|
badvalue(GRID); |
379 |
|
for (i = 0; i < 3; i++) |
380 |
|
if (gp->grid[i] <= 0) |