From 0f67c3b8bdab56fcdc0c1b87b3a5e44b2dd20406 Mon Sep 17 00:00:00 2001 From: elenagonzalez870 <52000594+elenagonzalez870@users.noreply.github.com> Date: Fri, 8 May 2026 18:42:28 -0500 Subject: [PATCH 1/2] * Currently, the local squared mass averages are calculated within a window that is either AVEKERNEL or 1.0e-4 * ((double) clus.N_STAR) / 2.0. For clusters with a large number of stars, this means that mass averages are computed over a window containing thousands of neighbors. This is inconsitent with the fact that other averaged local quantities (like calc_n_local) are always calculated in a fixed window, and it is likely just legacy code that was never changed. --- src/cmc/cmc_dynamics_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmc/cmc_dynamics_helper.c b/src/cmc/cmc_dynamics_helper.c index 8d16bac..2abd04e 100644 --- a/src/cmc/cmc_dynamics_helper.c +++ b/src/cmc/cmc_dynamics_helper.c @@ -3001,7 +3001,7 @@ double calc_average_mass_sqr(long index, long N_LIMIT) { si= index; /* calculate sliding average timesteps */ - p = MAX((long) (1.0e-4 * ((double) clus.N_STAR) / 2.0), AVEKERNEL); + p = AVEKERNEL simin = si - p; simax = simin + (2 * p - 1); if (simin < 1) { From f21be39ab84081293ab484edf8a88782dfa66abd Mon Sep 17 00:00:00 2001 From: elenagonzalez870 <52000594+elenagonzalez870@users.noreply.github.com> Date: Fri, 8 May 2026 18:44:11 -0500 Subject: [PATCH 2/2] * Forgot the semicolon --- src/cmc/cmc_dynamics_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmc/cmc_dynamics_helper.c b/src/cmc/cmc_dynamics_helper.c index 2abd04e..e79869b 100644 --- a/src/cmc/cmc_dynamics_helper.c +++ b/src/cmc/cmc_dynamics_helper.c @@ -3001,7 +3001,7 @@ double calc_average_mass_sqr(long index, long N_LIMIT) { si= index; /* calculate sliding average timesteps */ - p = AVEKERNEL + p = AVEKERNEL; simin = si - p; simax = simin + (2 * p - 1); if (simin < 1) {