[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2015-02-28 Thread Christian Jakob
** Changed in: yade Status: New => Invalid -- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bugs/1031703 Title: "extra" value for bodies Status in Yet Another Dynamic Engine: Invalid Bug descri

[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-03 Thread Christian Jakob
> I guess Christian has in mind to use e.g. clump volume in some c++ algorithm (right?), else there is little interest in adding variables to bodies. No, in my example I need clump volume to calculate porosity. This is done in python code. But I dont know what other users want to do with their ex

Re: [Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-02 Thread Jan Stránský
2012/8/2 Chareyre <1031...@bugs.launchpad.net> > >3/ store the string representation of desired variable > > Yes that one too. I aprooved when I read it but didn't recall it. > Not sure it would be easier than void pointer though, since it would need > a lot of typecasting. > Your example is ok in

[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-02 Thread Chareyre
Another option is to keep the data outside bodies in a separate table. Saving a table is no big deal, and it doesn't waste memory when the table is empty. -- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bu

[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-02 Thread Chareyre
>3/ store the string representation of desired variable Yes that one too. I aprooved when I read it but didn't recall it. Not sure it would be easier than void pointer though, since it would need a lot of typecasting. Your example is ok in python but the vector3 can't be used in c++ at this poin

Re: [Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-02 Thread Jan Stránský
The problem is not how to access the extra variables in python but how to > implement them in c++. > For storing arbitrary types, I see at least two ways: > 1/ void pointers + some typecasting > 2/ add template parameters to the class Body > > 3/ store the string representation of desired variable

[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-02 Thread Chareyre
The problem is not how to access the extra variables in python but how to implement them in c++. For storing arbitrary types, I see at least two ways: 1/ void pointers + some typecasting 2/ add template parameters to the class Body (2) is forbidden in yade as serialization and python wrapping don

[Yade-dev] [Bug 1031703] Re: "extra" value for bodies

2012-08-01 Thread Christian Jakob
For further explanation (my first ideas): We could first make an easy-to-implement feature, later it could be extended. Lets say we just want to let extra variable be int or float. Also for the start, there is only one extra value allowed for one body (as said, later we can extend if needed)...