Ok, thank you. I think it should work for me. ______________________________ [ENG] Best Regards [GER] Mit freundlichen Grüßen [RUS] С наилучшими пожеланиями [UKR] З найкращими побажаннями
Anton Gladkyy 2009/8/10 Václav Šmilauer <[email protected]> > > > I want to calculate the total number of cohesive contacts in my > > model. > > How can I declare the global variable for that? > > No globals, sorry. You can make a variable static in some of your > classes, but it is discouraged in general (e.g. you would not be able to > use O.switchWorld() consistently). You have to update that number > somehow, anyways. > > If you need that number just once in a while, count the interactions > like this: > > long n=0; > FOREACH(const shared_ptr<Interaction>& I, *rootBody->interaction){ > if(I->isReal()) n++; } > > In python, you can use O.interactions.countReal(). > > HTH, Vaclav > > > _______________________________________________ > Mailing list: > https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > Post to : [email protected] > Unsubscribe : > https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
_______________________________________________ yade-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/yade-users
