| 398 | } |
| 399 | |
| 400 | void ParticleGroup::removeParticles(const VInt &rm) { |
| 401 | if (rm.size() != particles.size()) return; |
| 402 | VParticle newp; |
| 403 | for (unsigned int i = 0; i < particles.size(); ++i) { |
| 404 | Particle *p = particles[i]; |
| 405 | if (p != 0 && rm[i] == 0) { |
| 406 | newp.push_back(p); |
| 407 | } else if (p != 0) { |
| 408 | delete p; |
| 409 | } |
| 410 | } |
| 411 | particles = newp; |
| 412 | } |
| 413 | |
| 414 | int ParticleGroup::line(const VDouble &p1, const VDouble &p2, int num, |
| 415 | const VDouble &vel0, double p0) { |
no test coverage detected