[yt-svn] commit/yt: ChrisMalone: Merged in brittonsmith/yt (pull request #1240)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Oct 6 16:21:34 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/0f7b97ccc551/
Changeset: 0f7b97ccc551
Branch: yt
User: ChrisMalone
Date: 2014-10-06 23:21:26+00:00
Summary: Merged in brittonsmith/yt (pull request #1240)
[BUGFIX] Fixing nuclei density fields.
Affected #: 3 files
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/fields/species_fields.py
--- a/yt/fields/species_fields.py
+++ b/yt/fields/species_fields.py
@@ -178,3 +178,4 @@
# Skip it
continue
func(registry, ftype, species, particle_type)
+ add_nuclei_density_fields(registry, ftype, particle_type=particle_type)
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/frontends/enzo/fields.py
--- a/yt/frontends/enzo/fields.py
+++ b/yt/frontends/enzo/fields.py
@@ -20,9 +20,6 @@
FieldInfoContainer
from yt.units.yt_array import \
YTArray
-from yt.fields.species_fields import \
- add_nuclei_density_fields, \
- add_species_field_by_density
from yt.utilities.physical_constants import \
mh, me, mp, \
mass_sun_cgs
@@ -152,7 +149,6 @@
for sp in species_names:
self.add_species_field(sp)
self.species_names.append(known_species_names[sp])
- add_nuclei_density_fields(self, "gas")
def setup_fluid_fields(self):
# Now we conditionally load a few other things.
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -90,3 +90,13 @@
ds = data_dir_load(ecp)
# Now we test our species fields
yield check_color_conservation(ds)
+
+ at requires_ds(ecp, big_data=True)
+def test_nuclei_density_fields():
+ ds = data_dir_load(ecp)
+ ad = ds.all_data()
+ yield assert_array_equal, ad["H_nuclei_density"], \
+ (ad["H_number_density"] + ad["H_p1_number_density"])
+ yield assert_array_equal, ad["He_nuclei_density"], \
+ (ad["He_number_density"] + ad["He_p1_number_density"] +
+ ad["He_p2_number_density"])
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