[kernel] update interactions/indexsets when a DS is removed
fixes a crash in deleted_cube.py, where a contact interaction still
existed in indexSet1 that referred to the DS that was already removed
from DSG[0].
@@ -292,6 +292,12 @@ bool Simulation::initializeNSDSChangelog()
initializeInteraction(getTk(), inter);
interactionInitialized = true;
}
+ else if (change.typeOfChange == NonSmoothDynamicalSystem::rmDynamicalSystem)
+ {
+ // also need to force an update in this case since indexSet1 may
+ // still have Interactions that refer to DSs that are not in graph
+ interactionInitialized = true;
+ }
}
_nsdsChangeLogPosition = _nsds->changeLogPosition();
