adding constants to ParticleArray

1 view
Skip to first unread message

Pankaj Pandey

unread,
May 8, 2011, 8:23:59 AM5/8/11
to pysp...@googlegroups.com
For some funcs i'm writing, there's a need for constants for particle arrays (elastic modulus etc.). I've locally added it to ParticleArray in a very similar way to properties.
i.e. a dict `constants` which holds all constant properties for the particle array.
I'd like to get an opinion if this approach is fine or else any other way to achieve the same thing.

Kaushik .

unread,
May 8, 2011, 10:17:01 AM5/8/11
to pysp...@googlegroups.com
I have not been following the development properly. But there used to be an Entity class which could hold properties that 
were not 'per' particle. Can't that not be used here ? Sorry if this comment is totally out of place !
--
shekhar

pankaj pandey

unread,
May 8, 2011, 11:05:33 AM5/8/11
to pysp...@googlegroups.com
Yes, Entity was useful and i liked it for the extensible inheritance and default properties it provided but now its been removed and each particlearray instead has an int attribute 'type' to categorize the array (0=fluid,1=solid). So there's no place now to store constants. Thanks for your input though, good to hear from you.

Pankaj Pandey

unread,
May 8, 2011, 11:15:52 AM5/8/11
to pysp...@googlegroups.com
I've added the changes to a clone i've created at http://code.google.com/r/pankaj86-pysph/source/detail?r=cb53e365c7f7f24df65be883da5154e57eaaf406#
This should make it easier to test, communicate and review changes before pushing into mainline default branch without cluttering the main repo

Prabhu Ramachandran

unread,
May 8, 2011, 9:04:14 PM5/8/11
to pysp...@googlegroups.com, Pankaj Pandey

Looks good to me. Do you think we should move to github given that it
would make it easier to fork/branch and re-merge than what we can do
with googlecode?

cheers,
--
Prabhu Ramachandran http://www.aero.iitb.ac.in/~prabhu

Reply all
Reply to author
Forward
0 new messages