diff --git a/examples/plot_sorted_all.py b/examples/plot_sorted_all.py index 077f5ead53e61c4e85a58094a479b8eebf001b57..5424e841824283fe5c4f849e24d81bbcfe0c193b 100644 --- a/examples/plot_sorted_all.py +++ b/examples/plot_sorted_all.py @@ -113,30 +113,32 @@ figure(frameon=True) subplot(311, title="Acceleration along X") #plot(id[abs(errx_s) > 0.001], e_errx_s , 'ro') -plot(pos_x, accx_u - accx_s, 'bx') -#plot(pos_x, accx_s , 'ro') +plot(pos_x, accx_u, 'bx') +plot(pos_x, accx_s , 'ro') #text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14) -ylim(-70, 70) +ylim(-15000, 15000) grid() subplot(312, title="Acceleration along Y") #plot(id[abs(erry_s) > 0.001], e_erry_s , 'ro') -plot(pos_y, accy_u - accy_s, 'bx') -#plot(pos_y, accy_s , 'ro') +plot(pos_y, accy_u , 'bx') +plot(pos_y, accy_s , 'ro') #text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14) -ylim(-70, 70) +#ylim(-70, 70) +ylim(-15000, 15000) grid() subplot(313, title="Acceleration along Z") #plot(id[abs(errz_s) > 0.001], e_errz_s , 'ro', label="Sorted") -plot(pos_z, accz_u - accz_s , 'bx', label="Unsorted") -#plot(pos_z, accz_s , 'ro', label="Sorted") +plot(pos_z, accz_u , 'bx', label="Unsorted") +plot(pos_z, accz_s , 'ro', label="Sorted") #text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14) legend(loc="upper right") -ylim(-70, 70) +#ylim(-70, 70) +ylim(-15000, 15000) grid() savefig("accelerations_absolute_all.png") diff --git a/examples/test_bh_sorted.c b/examples/test_bh_sorted.c index f3560c701aa4351e9e6e0ebe9df7c2be37ba95b2..aa44203c1d836e4088952c6ff012d157cd503777 100644 --- a/examples/test_bh_sorted.c +++ b/examples/test_bh_sorted.c @@ -2337,6 +2337,7 @@ void test_all_direct_neighbours(int N_parts) { /* Do the interactions without sorting */ for (j = 0; j < 26 ; ++j) iact_pair_direct_unsorted(&cells[26], &cells[j]); + iact_self_direct(&cells[26]); message("Unsorted interactions done "); @@ -2353,6 +2354,7 @@ void test_all_direct_neighbours(int N_parts) { /* Do the interactions with sorting */ for (j = 0; j < 26 ; ++j) iact_pair_direct_sorted(&cells[26], &cells[j]); + iact_self_direct(&cells[26]); message("Sorted interactions done ");