[yt-dev] Clarification of particle fields

Douglas Harvey Rudd drudd at uchicago.edu
Wed Mar 13 07:14:03 PDT 2013


Hi all,

We've been working on adding particle support to our ARTIO frontend and matching ART particle species to YT.  I'd like a clarification of the expected behavior of "all" when dealing with particles.  In ART, there are some variables (fields) that are only associated with a subset of particles.  Mainly this happens for stars, of course, but might also occur for hydrodynamic tracers, etc.  The current behavior, if I understand it, is to load 0 for any particle that does not have the requested variable, as this matches the way Enzo dealt with stars.  

Supporting this behavior in ARTIO causes some headaches, since we'd need to load a different variable in order to determine the number of empty entries, and makes the code significantly less elegant. 

What I'd like to do is generate an error for any request for ("all","field") if field is not supported by all particle types in the file.  This would force the user to explicitly request the subset of particles for which that variable is defined, say ("star","field") or ("nbody","field").

Are there any objections to this?  It means that code written with an Enzo perspective may generate an error if applied to an ARTIO dataset.  I assume as particle type support improves in YT that some convention will develop to handle these cases.

Douglas Rudd
Scientific Computing Consultant
Research Computing Center
drudd at uchicago.edu






More information about the yt-dev mailing list