yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #17427
[Question #669986]: how are interactions calculated
New question #669986 on Yade:
https://answers.launchpad.net/yade/+question/669986
Good evening,
I was wondering, how are interactions calculated?
I dug into the trunk code and found this in InteractionContainer.cpp
void InteractionContainer::postLoad__calledFromScene(const shared_ptr<BodyContainer>& bb){
bodies=&bb->body;
clear();
FOREACH(const shared_ptr<Interaction>& I, interaction){
Body::id_t id1=I->getId1(), id2=I->getId2();
if (!(*bodies)[id1] || !(*bodies)[id2]) {
return;
} else {
insert(I);
}
}
interaction.clear();
}
But i dont really understand this line if (!(*bodies)[id1] || !(*bodies)[id2]) {
and i am not sure it is even relevant
Thanks in advance
John
--
You received this question notification because your team yade-users is
an answer contact for Yade.