[yt-dev] Question: adding new fields for GAMER

Hsi-Yu Schive hyschive at ntu.edu.tw
Mon Oct 29 06:54:55 PDT 2012


Dear all,

I'm trying to add new fields used in GAMER by editing the file "field.py",
but I'm confused about the following declarations.

   KnownGAMERFields = FieldInfoContainer()
   add_gamer_field = KnownGAMERFields.add_field

   GAMERFieldInfo = FieldInfoContainer.create_with_fallback(FieldInfo)
   add_field = GAMERFieldInfo.add_field

What is the difference between "KnownGAMERField" and "GAMERFieldInfo"?
To me, it seems that they are both instantiations of the class FieldInfoContainer,
except that GAMERFieldInfo has a fallback function "FieldInfo".
Similarly, what's the difference between "add_gamer_field" and "add_field"?

Thanks in advance for the help!!

Sincerely,
Hsi-Yu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20121029/cbfe14ae/attachment.htm>


More information about the yt-dev mailing list