technically everything works, but CoM is not preserved
This commit is contained in:
@@ -115,10 +115,11 @@ interaction_ufunc_float2D
|
||||
// Update the momenta.
|
||||
delta_p_x = delta_x_e * interaction_force_function(r, coefficients);
|
||||
delta_p_y = delty_y_e * interaction_force_function(r, coefficients);
|
||||
*(float *)(p_x_new + i*p_x_new_steps) -= delta_p_x;
|
||||
*(float *)(p_y_new + i*p_y_new_steps) -= delta_p_y;
|
||||
*(float *)(p_x_new + j*p_x_new_steps) += delta_p_x;
|
||||
*(float *)(p_y_new + j*p_y_new_steps) += delta_p_y;
|
||||
//printf("%d, %d: %f, %f\n", i, j, delta_p_x, delta_p_y);
|
||||
*(float *)(p_x_new + i*p_x_new_steps) += delta_p_x;
|
||||
*(float *)(p_y_new + i*p_y_new_steps) += delta_p_y;
|
||||
*(float *)(p_x_new + j*p_x_new_steps) -= delta_p_x;
|
||||
*(float *)(p_y_new + j*p_y_new_steps) -= delta_p_y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user