Fixed bug with the bbh influence output when grapite active search is enabled
This commit is contained in:
parent
08d1c155f5
commit
35a90c343f
2 changed files with 65 additions and 20 deletions
28
phi-GRAPE.c
28
phi-GRAPE.c
|
|
@ -356,7 +356,7 @@ double m_act[N_MAX],
|
|||
pot_act_tmp[N_MAX], a_act_tmp[N_MAX][3], adot_act_tmp[N_MAX][3],
|
||||
pot_act_tmp_loc[N_MAX], a_act_tmp_loc[N_MAX][3], adot_act_tmp_loc[N_MAX][3];
|
||||
|
||||
FILE *inp, *out, *tmp_file, *dbg;
|
||||
FILE *inp, *out, *tmp_file, *dbg, *out_bbhinf;
|
||||
|
||||
double CPU_time_real0, CPU_time_user0, CPU_time_syst0;
|
||||
double CPU_time_real, CPU_time_user, CPU_time_syst;
|
||||
|
|
@ -4528,8 +4528,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
#ifdef BBH_INF
|
||||
out = fopen("bbh.inf","w");
|
||||
fclose(out);
|
||||
out_bbhinf = fopen("bbh.inf","w");
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -6295,8 +6294,6 @@ for(i=0; i<N; i++)
|
|||
if(myRank == rootRank)
|
||||
{
|
||||
|
||||
out = fopen("bbh.inf","a");
|
||||
|
||||
m_bh1 = m_act[i_bh1];
|
||||
m_bh2 = m_act[i_bh2];
|
||||
|
||||
|
|
@ -6335,12 +6332,13 @@ for(i=0; i<N; i++)
|
|||
|
||||
|
||||
|
||||
for(i=2; i<n_act; i++)
|
||||
for(i=0; i<n_act; i++)
|
||||
{
|
||||
|
||||
tmp_r2 = SQR(x_act[i][0] - x_bbhc[0]) + SQR(x_act[i][1] - x_bbhc[1]) + SQR(x_act[i][2] - x_bbhc[2]);
|
||||
|
||||
iii = ind_act[i];
|
||||
if (iii < 2) continue;
|
||||
|
||||
tmp_r2 = SQR(x_act[i][0] - x_bbhc[0]) + SQR(x_act[i][1] - x_bbhc[1]) + SQR(x_act[i][2] - x_bbhc[2]);
|
||||
|
||||
// if( (tmp_r2 < DR2*R_INF2) )
|
||||
if( (tmp_r2 < SEMI_a2*R_INF2) )
|
||||
|
|
@ -6361,8 +6359,8 @@ for(i=0; i<N; i++)
|
|||
fprintf(out,"INF1 %.6E %.16E %07d %07d %.6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E \n",
|
||||
Timesteps, time_cur, i, ind_act[i],
|
||||
sqrt(DR2), x_bbhc[0], x_bbhc[1], x_bbhc[2], v_bbhc[0], v_bbhc[1], v_bbhc[2],
|
||||
m_bh1, x_bh1[0], x_bh1[1], x_bh1[2], v_bh1[0], v_bh1[1], v_bh1[2], pot_act[0],
|
||||
m_bh2, x_bh2[0], x_bh2[1], x_bh2[2], v_bh2[0], v_bh2[1], v_bh2[2], pot_act[1],
|
||||
m_bh1, x_bh1[0], x_bh1[1], x_bh1[2], v_bh1[0], v_bh1[1], v_bh1[2], pot_act[i_bh1],
|
||||
m_bh2, x_bh2[0], x_bh2[1], x_bh2[2], v_bh2[0], v_bh2[1], v_bh2[2], pot_act[i_bh2],
|
||||
sqrt(tmp_r2),
|
||||
m_act[i], x_act[i][0], x_act[i][1], x_act[i][2], v_act[i][0], v_act[i][1], v_act[i][2], pot_act[i],
|
||||
dt_act[i]);
|
||||
|
|
@ -6389,8 +6387,8 @@ for(i=0; i<N; i++)
|
|||
fprintf(out,"INF2 %.6E %.16E %07d %07d %.6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E %.6E % .6E % .6E % .6E % .6E % .6E % .6E % .6E %.6E \n",
|
||||
Timesteps, time_cur, i, ind_act[i],
|
||||
sqrt(DR2), x_bbhc[0], x_bbhc[1], x_bbhc[2], v_bbhc[0], v_bbhc[1], v_bbhc[2],
|
||||
m_bh1, x_bh1[0], x_bh1[1], x_bh1[2], v_bh1[0], v_bh1[1], v_bh1[2], pot_act[0],
|
||||
m_bh2, x_bh2[0], x_bh2[1], x_bh2[2], v_bh2[0], v_bh2[1], v_bh2[2], pot_act[1],
|
||||
m_bh1, x_bh1[0], x_bh1[1], x_bh1[2], v_bh1[0], v_bh1[1], v_bh1[2], pot_act[i_bh1],
|
||||
m_bh2, x_bh2[0], x_bh2[1], x_bh2[2], v_bh2[0], v_bh2[1], v_bh2[2], pot_act[i_bh2],
|
||||
sqrt(tmp_r2),
|
||||
m_act[i], x_act[i][0], x_act[i][1], x_act[i][2], v_act[i][0], v_act[i][1], v_act[i][2], pot_act[i],
|
||||
dt_act[i]);
|
||||
|
|
@ -6402,8 +6400,6 @@ for(i=0; i<N; i++)
|
|||
|
||||
} /* i */
|
||||
|
||||
fclose(out);
|
||||
|
||||
} /* if(myRank == rootRank) */
|
||||
#endif
|
||||
|
||||
|
|
@ -7273,7 +7269,9 @@ for(i=0; i<N; i++)
|
|||
fclose(tmp_file);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BBH_INF
|
||||
fclose(out_bbhinf);
|
||||
#endif
|
||||
} /* if(myRank == rootRank) */
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue