void LsodarOSI::updateState(const unsigned int level) { // Compute all required (ie time-dependent) data for the DS of the OSI. DSIterator it; if (level == 1) // ie impact case: compute velocity { for (it = OSIDynamicalSystems->begin(); it != OSIDynamicalSystems->end(); ++it) { SP::LagrangianDS lds = std11::static_pointer_cast<LagrangianDS>(*it); lds->computePostImpactVelocity(); } } else if (level == 2) { double time = simulationLink->model()->currentTime(); for (it = OSIDynamicalSystems->begin(); it != OSIDynamicalSystems->end(); ++it) (*it)->update(time); } else RuntimeException::selfThrow("LsodarOSI::updateState(index), index is out of range. Index = " + level); }