mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Initialize volume of the box.
This commit is contained in:
parent
26132586c0
commit
1553601028
1 changed files with 4 additions and 2 deletions
|
@ -54,12 +54,14 @@ void PositionData::findExtrema()
|
|||
xyz_max[i] = -BF;
|
||||
}
|
||||
|
||||
V0=1;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (pid_t p = 0; p < np; p++)
|
||||
{
|
||||
xyz_min[p] = min(xyz_min[p], xyz[p][i]);
|
||||
xyz_max[p] = max(xyz_max[p], xyz[p][i]);
|
||||
xyz_min[i] = min(xyz_min[i], xyz[i][p]);
|
||||
xyz_max[i] = max(xyz_max[i], xyz[i][p]);
|
||||
}
|
||||
V0 *= (xyz_max[i]-xyz_min[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue