Hi everybody,

I have a problem when removing a ChBody from ChSystemMulticore at Runtime. 
At the moment I am trying to bring my physics simulation from single core 
to multicore and however I run into some runtime crashes when I try the 
following:

I create some ChBodies which are connected with some ChLinks - all are 
added to ChSystemMulticore. This works perfectly fine. However at some 
point I am removing ALL elements from the simulation calling:

mySystem.Clear()  -> This calls ChSystem.Clear();

However if I try to continue my simulation after adding another ChBodies I 
run into a runtime exception in ChSystemMulticore::ClearForceVariables() 
(namly a vector-out-of-range-error):

    for (int i = 0; i < (signed)data_manager->num_rigid_bodies; i++) {
        assembly.bodylist[i]->VariablesFbReset();
    }


I did some debugging and the reason is, that after calling ChSystem.Clear() 
the data_manager of ChSystemMulticore still has num_rigid_bodies > 0.
This looks like a bug to me?

I tried to simply set num_rigid_bodies = 0 after calling Clear(), but this 
is obviously a stupid idea and let to some other crashes...


I am not that deep into Project Chrono, but is there a nice way to delete 
elements from a ChSystemMulticore Class? Maybe if somebody can give me a 
hint what I need to delete inside the data_manager I might be able to fix 
it myself.


Thanks, 
Frank

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/d0dec61b-e190-4078-8ff3-039936f582d8n%40googlegroups.com.

Reply via email to