Skip to content
Snippets Groups Projects
Commit 86f88acb authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Change pow(x,3) to x*x*x

parent 7b9db40e
No related branches found
No related tags found
1 merge request!681Add example of isolated galaxy and change hernquist potential configuration
......@@ -233,12 +233,12 @@ static INLINE void potential_init_backend(
} else if (V200 != 0.0) {
/* Calculate M200 and R200 from V200 */
M200 = pow(V200, 3) / (10. * G_newton * H0);
M200 = V200*V200*V200 / (10. * G_newton * H0);
R200 = V200 / (10 * H0);
} else if (R200 != 0.0) {
/* Calculate M200 and V200 from R200 */
V200 = 10. * H0 * R200;
M200 = pow(V200, 3) / (10. * G_newton * H0);
M200 = V200*V200*V200 / (10. * G_newton * H0);
} else {
error("Please specify one of the 3 variables M200, V200 or R200");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment