| 509 | } |
| 510 | |
| 511 | void Simulation::reset() |
| 512 | { |
| 513 | // reset fluid models |
| 514 | for (unsigned int i = 0; i < numberOfFluidModels(); i++) |
| 515 | getFluidModel(i)->reset(); |
| 516 | |
| 517 | // reset boundary models |
| 518 | for (unsigned int i = 0; i < numberOfBoundaryModels(); i++) |
| 519 | getBoundaryModel(i)->reset(); |
| 520 | |
| 521 | if (getBoundaryHandlingMethod() == BoundaryHandlingMethods::Akinci2012) |
| 522 | updateBoundaryVolume(); |
| 523 | |
| 524 | performNeighborhoodSearchSort(); |
| 525 | if (m_timeStep) |
| 526 | m_timeStep->reset(); |
| 527 | |
| 528 | m_animationFieldSystem->reset(); |
| 529 | |
| 530 | m_counter = 0; |
| 531 | |
| 532 | TimeManager::getCurrent()->setTime(0.0); |
| 533 | } |
| 534 | |
| 535 | void Simulation::setSimulationMethod(const int val) |
| 536 | { |