[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jan 16 10:24:58 PST 2015
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/d471a6dba946/
Changeset: d471a6dba946
Branch: yt
User: ngoldbaum
Date: 2015-01-14 22:40:32+00:00
Summary: Adding a number density field for Enzo MultiSpecies=0 datasets.
Affected #: 1 file
diff -r 69ef89f6b31b8ad5e2a36b39ca1781027722f2b2 -r d471a6dba9466d204659a08e581356801ff170e3 yt/frontends/enzo/fields.py
--- a/yt/frontends/enzo/fields.py
+++ b/yt/frontends/enzo/fields.py
@@ -229,6 +229,13 @@
("gas", "thermal_energy"),
function = _tot_minus_kin,
units = "erg/g")
+ if multi_species == 0 and 'Mu' in params:
+ def _number_density(field, data):
+ return data['gas', 'density']/(mp*params['Mu'])
+ self.add_field(
+ ("gas", "number_density"),
+ function = _number_density,
+ units="1/cm**3")
def setup_particle_fields(self, ptype):
https://bitbucket.org/yt_analysis/yt/commits/2c440152643c/
Changeset: 2c440152643c
Branch: yt
User: MatthewTurk
Date: 2015-01-16 18:24:50+00:00
Summary: Merged in ngoldbaum/yt (pull request #1408)
Adding a number density field for Enzo MultiSpecies=0 datasets.
Affected #: 1 file
diff -r d8069e2f9549757aacb8cedeb6c620d8e22a4825 -r 2c440152643c60239eb0c928132ba8f8b0aac814 yt/frontends/enzo/fields.py
--- a/yt/frontends/enzo/fields.py
+++ b/yt/frontends/enzo/fields.py
@@ -229,6 +229,13 @@
("gas", "thermal_energy"),
function = _tot_minus_kin,
units = "erg/g")
+ if multi_species == 0 and 'Mu' in params:
+ def _number_density(field, data):
+ return data['gas', 'density']/(mp*params['Mu'])
+ self.add_field(
+ ("gas", "number_density"),
+ function = _number_density,
+ units="1/cm**3")
def setup_particle_fields(self, ptype):
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