| 440 | } |
| 441 | |
| 442 | int ParticleGroup::pointlist(VDouble &pointdata) { |
| 443 | int ndm = OPS_GetNDM(); |
| 444 | pointdata.clear(); |
| 445 | pointdata.reserve(particles.size() * (3 * ndm + 1)); |
| 446 | for (auto particle : particles) { |
| 447 | auto tag = particle->getTag(); |
| 448 | const auto& crds = particle->getCrds(); |
| 449 | const auto& vel = particle->getVel(); |
| 450 | const auto& accel = particle->getAccel(); |
| 451 | double p = particle->getPressure(); |
| 452 | pointdata.push_back(tag); |
| 453 | for (int j = 0; j < ndm; ++j) { |
| 454 | pointdata.push_back(crds[j]); |
| 455 | } |
| 456 | for (int j = 0; j < ndm; ++j) { |
| 457 | pointdata.push_back(vel[j]); |
| 458 | } |
| 459 | for (int j = 0; j < ndm; ++j) { |
| 460 | pointdata.push_back(accel[j]); |
| 461 | } |
| 462 | pointdata.push_back(p); |
| 463 | } |
| 464 | |
| 465 | return 0; |
| 466 | } |
| 467 | |
| 468 | int ParticleGroup::pointlist(const VDouble &pointdata, int ndm) { |
| 469 | VDouble crds(ndm); |
no test coverage detected