[Yt-svn] yt-commit r550 - trunk/yt/lagos/hop
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jun 12 06:34:49 PDT 2008
Author: mturk
Date: Thu Jun 12 06:34:48 2008
New Revision: 550
URL: http://yt.spacepope.org/changeset/550
Log:
Couple fixes to obvious errors.
Still -- this is not ready for public consumption! While it does *seem* to
return the correct groups, I have not finished verifying!!
Modified:
trunk/yt/lagos/hop/hop_hop.c
trunk/yt/lagos/hop/hop_regroup.c
trunk/yt/lagos/hop/hop_smooth.c
Modified: trunk/yt/lagos/hop/hop_hop.c
==============================================================================
--- trunk/yt/lagos/hop/hop_hop.c (original)
+++ trunk/yt/lagos/hop/hop_hop.c Thu Jun 12 06:34:48 2008
@@ -525,7 +525,7 @@
for (j=0;j<smx->kd->nActive;j++) {
s->ID[1+j] = smx->kd->p[j].iID; /* S Skory's addition */
if (smx->kd->p[j].fDensity < densthres) s->ntag[j+1] = -1;
- else smx->kd->p[j].iHop;
+ else s->ntag[j+1] = smx->kd->p[j].iHop;
}
@@ -578,6 +578,7 @@
my_comm->gdensity = vector(0,smx->nGroups-1);
for (j=0;j<smx->nGroups;j++) {
+ den = smx->densestingroup[j];
my_comm->gdensity[j]=smx->kd->p[den].fDensity;
}
int nb = 0;
Modified: trunk/yt/lagos/hop/hop_regroup.c
==============================================================================
--- trunk/yt/lagos/hop/hop_regroup.c (original)
+++ trunk/yt/lagos/hop/hop_regroup.c Thu Jun 12 06:34:48 2008
@@ -423,8 +423,8 @@
if (gl->list==NULL) myerror("Error in allocating gl->list.");
for (j=0,gr=gl->list;j<gl->ngroups;j++,gr++) {
/* If group is too underdense, it cannot be a group center */
- if (gdensity[j]<peakdensthresh) gr->idmerge=(-1);
- else gr->idmerge = j;
+ if (gdensity[j]<peakdensthresh) {gr->idmerge=(-1);}
+ else {gr->idmerge = j;}
gr->npart = -1; /* Not doing anything with this */
densestbound[j] = 2.0*MINDENS; /* Initialize */
densestboundgroup[j] = -1; /* Initialize */
Modified: trunk/yt/lagos/hop/hop_smooth.c
==============================================================================
--- trunk/yt/lagos/hop/hop_smooth.c (original)
+++ trunk/yt/lagos/hop/hop_smooth.c Thu Jun 12 06:34:48 2008
@@ -14,7 +14,7 @@
/* HOP Version 1.0 (12/15/97) -- Original Release */
#include <stdio.h>
-//#include <malloc.h>
+#include <malloc.h>
#include <math.h>
#include <assert.h>
#include "smooth.h"
@@ -36,6 +36,8 @@
assert(nSmooth <= kd->nActive);
smx = (SMX)malloc(sizeof(struct smContext));
assert(smx != NULL);
+ smx->kd = NULL;
+
smx->kd = kd;
smx->nSmooth = nSmooth;
smx->pq = (PQ *)malloc(nSmooth*sizeof(PQ));
More information about the yt-svn
mailing list