[yt-svn] commit/yt: jzuhone: Making sure that particle fields that are not already known get flagged as particle fields
Bitbucket
commits-noreply at bitbucket.org
Thu Jan 19 13:31:44 PST 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/bc1f4f9b1d66/
changeset: bc1f4f9b1d66
branch: yt
user: jzuhone
date: 2012-01-19 22:29:02
summary: Making sure that particle fields that are not already known get flagged as particle fields
affected #: 1 file
diff -r 2337174bb3f6864eca51dcf7c0a8469e99eb6f14 -r bc1f4f9b1d666fe215bd7ce0d1388ef5f99d1a09 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -41,7 +41,8 @@
io_registry
from .fields import FLASHFieldInfo, add_flash_field, KnownFLASHFields
-from yt.data_objects.field_info_container import FieldInfoContainer, NullFunc
+from yt.data_objects.field_info_container import FieldInfoContainer, NullFunc, \
+ ValidateDataField
class FLASHGrid(AMRGridPatch):
_id_offset = 1
@@ -178,7 +179,14 @@
for field in self.field_list:
if field not in self.derived_field_list:
self.derived_field_list.append(field)
-
+ if (field not in KnownFLASHFields and
+ field.startswith("particle")) :
+ self.parameter_file.field_info.add_field(field,
+ function=NullFunc,
+ take_log=False,
+ validators = [ValidateDataField(field)],
+ particle_type=True)
+
def _setup_data_io(self):
self.io = io_registry[self.data_style](self.parameter_file)
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list