| 33 | } |
| 34 | |
| 35 | void TimeStep::clearAccelerations(const unsigned int fluidModelIndex) |
| 36 | { |
| 37 | Simulation *sim = Simulation::getCurrent(); |
| 38 | FluidModel *model = sim->getFluidModel(fluidModelIndex); |
| 39 | const unsigned int count = model->numActiveParticles(); |
| 40 | const Vector3r grav(sim->getVecValue<Real>(Simulation::GRAVITATION)); |
| 41 | for (unsigned int i=0; i < count; i++) |
| 42 | { |
| 43 | // Clear accelerations of dynamic particles |
| 44 | Vector3r& a = model->getAcceleration(i); |
| 45 | if ((model->getMass(i) != 0.0) && (model->getParticleState(i) == ParticleState::Active)) |
| 46 | { |
| 47 | a = grav; |
| 48 | } |
| 49 | else |
| 50 | { |
| 51 | a.setZero(); |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | #ifdef USE_AVX |
| 57 |
nothing calls this directly
no test coverage detected