MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / removeParticles

Method removeParticles

SRC/element/PFEMElement/ParticleGroup.cpp:400–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void 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
414int ParticleGroup::line(const VDouble &p1, const VDouble &p2, int num,
415 const VDouble &vel0, double p0) {

Callers 1

addParticlesMethod · 0.80

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected