[yt-svn] commit/yt: sskory: A couple small changes to HOP halo finding on the suggestion
Bitbucket
commits-noreply at bitbucket.org
Fri Feb 24 06:37:06 PST 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/70eb03b0a2f2/
changeset: 70eb03b0a2f2
branch: yt
user: sskory
date: 2012-02-23 16:34:03
summary: A couple small changes to HOP halo finding on the suggestion
of Michael Kuhlen.
affected #: 1 file
diff -r 23aaaf5d6cf69d1eb67f7e3260d54638cc38a110 -r 70eb03b0a2f200275b8b89353b1aae8ecb6ffbd0 yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py
+++ b/yt/analysis_modules/halo_finding/halo_objects.py
@@ -2243,7 +2243,7 @@
total_mass = \
self.comm.mpi_allreduce((self._data_source["ParticleMassMsun"][select]).sum(dtype='float64'), op='sum')
else:
- total_mass = self.comm.mpi_allreduce(self._data_source["ParticleMassMsun"].sum(dtype='float64'), op='sum')
+ total_mass = self.comm.mpi_allreduce(self._data_source.quantities["TotalQuantity"]("ParticleMassMsun")[0], op='sum')
# MJT: Note that instead of this, if we are assuming that the particles
# are all on different processors, we should instead construct an
# object representing the entire domain and sum it "lazily" with
@@ -2255,14 +2255,17 @@
self.partition_hierarchy_3d(ds=self._data_source,
padding=self.padding)
self.bounds = (LE, RE)
- # reflect particles around the periodic boundary
- #self._reposition_particles((LE, RE))
- if dm_only:
+ # sub_mass can be skipped if subvolume is not used and this is not
+ # parallel.
+ if subvolume is None and \
+ ytcfg.getint("yt", "__topcomm_parallel_size") == 1:
+ sub_mass = total_mass
+ elif dm_only:
select = self._get_dm_indices()
sub_mass = self._data_source["ParticleMassMsun"][select].sum(dtype='float64')
else:
sub_mass = \
- self._data_source["ParticleMassMsun"].sum(dtype='float64')
+ self._data_source.quantities["TotalQuantity"]("ParticleMassMsun")[0]
HOPHaloList.__init__(self, self._data_source,
threshold * total_mass / sub_mass, dm_only)
self._parse_halolist(total_mass / sub_mass)
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