First steps in purging the tracking of mock particles: no longer present in jovoz2

This commit is contained in:
Paul M. Sutter 2025-01-09 18:21:26 +08:00
parent a1d0b675c7
commit 091cf5d1dc
5 changed files with 10 additions and 20 deletions

View file

@ -103,8 +103,7 @@ void readAdjacencyFile(const string& adjfile, PARTICLE*& p, pid_t& np)
}
}
void readVolumeFile(const std::string& volfile, PARTICLE *p, pid_t np,
pid_t mockIndex)
void readVolumeFile(const std::string& volfile, PARTICLE *p, pid_t np)
throw(FileError)
{
ifstream vol(volfile.c_str());
@ -125,7 +124,7 @@ void readVolumeFile(const std::string& volfile, PARTICLE *p, pid_t np,
for (pid_t i = 0; i < np; i++) {
vol.read((char*)&p[i].dens, sizeof(float));
if (((p[i].dens < 1e-30) || (p[i].dens > 1e30)) && (i < mockIndex)) {
if ((p[i].dens < 1e-30) || (p[i].dens > 1e30)) {
cout << format("Whacked-out volume found, of particle %d: %f") % i % p[i].dens << endl;
p[i].dens = 1.;
}