Hi,
I want to convert the total force of particles in the x-direction into a certain value, and add a value to the total forces in the y and z directions. So I did some changes in PBF as below:
double a=1.0;
results.force.setX(a); //set force in x direction as zero.
results.force.setY(results.force.getY()+a); //set force in y direction as +=a.
results.force.setZ(results.force.getZ()+a); //set force in z direction as +=a.
However, the results were the same for all three cases, with the particles experiencing a constant force of 'a'.
Because the functionality I want to achieve in the x-direction is "=", and the functionality I want to implement in the y and z directions is "+=".
Thanks