Used existing helper functions to make codes more consise
This commit is contained in:
@ -994,12 +994,7 @@ void FixRigid::apply_langevin_thermostat()
|
||||
|
||||
// convert omega from space frame to body frame
|
||||
|
||||
wbody[0] = omega[i][0]*ex_space[i][0] + omega[i][1]*ex_space[i][1] +
|
||||
omega[i][2]*ex_space[i][2];
|
||||
wbody[1] = omega[i][0]*ey_space[i][0] + omega[i][1]*ey_space[i][1] +
|
||||
omega[i][2]*ey_space[i][2];
|
||||
wbody[2] = omega[i][0]*ez_space[i][0] + omega[i][1]*ez_space[i][1] +
|
||||
omega[i][2]*ez_space[i][2];
|
||||
MathExtra::transpose_matvec(ex_space[i],ey_space[i],ez_space[i],omega[i],wbody);
|
||||
|
||||
// compute langevin torques in the body frame
|
||||
|
||||
@ -1012,12 +1007,7 @@ void FixRigid::apply_langevin_thermostat()
|
||||
|
||||
// convert langevin torques from body frame back to space frame
|
||||
|
||||
langextra[i][3] = tbody[0]*ex_space[i][0] + tbody[1]*ey_space[i][0] +
|
||||
tbody[2]*ez_space[i][0];
|
||||
langextra[i][4] = tbody[0]*ex_space[i][1] + tbody[1]*ey_space[i][1] +
|
||||
tbody[2]*ez_space[i][1];
|
||||
langextra[i][5] = tbody[0]*ex_space[i][2] + tbody[1]*ey_space[i][2] +
|
||||
tbody[2]*ez_space[i][2];
|
||||
MathExtra::matvec(ex_space[i],ey_space[i],ez_space[i],tbody,&langextra[i][3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user