Commit fe44f590 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent ea83c29d
......@@ -216,21 +216,21 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm_full(
#if SELF_GRAVITY_MULTIPOLE_ORDER > 3
/* 4th order contributions */
*f_x += m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122
+ m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203
+ m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230
+ m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320
+ m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y += m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032
+ m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113
+ m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140
+ m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230
+ m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z += m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023
+ m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104
+ m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131
+ m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221
+ m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*f_x += m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122 +
m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203 +
m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230 +
m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320 +
m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y += m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032 +
m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113 +
m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140 +
m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230 +
m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z += m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023 +
m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104 +
m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131 +
m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221 +
m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
#endif
/* Take care of the the sign convention */
......@@ -337,21 +337,21 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm_truncated(
#if SELF_GRAVITY_MULTIPOLE_ORDER > 3
/* 4th order contributions */
*f_x += m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122
+ m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203
+ m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230
+ m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320
+ m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y += m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032
+ m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113
+ m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140
+ m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230
+ m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z += m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023
+ m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104
+ m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131
+ m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221
+ m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*f_x += m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122 +
m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203 +
m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230 +
m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320 +
m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y += m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032 +
m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113 +
m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140 +
m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230 +
m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z += m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023 +
m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104 +
m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131 +
m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221 +
m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
#endif
/* Take care of the the sign convention */
*f_x *= -1.f;
......
......@@ -227,26 +227,26 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm_full(
#if SELF_GRAVITY_MULTIPOLE_ORDER > 3
/* 4th order contributions */
*f_x = m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122
+ m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203
+ m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230
+ m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320
+ m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y = m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032
+ m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113
+ m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140
+ m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230
+ m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z = m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023
+ m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104
+ m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131
+ m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221
+ m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*pot = m->M_004 * d.D_004 + m->M_013 * d.D_013 + m->M_022 * d.D_022
+ m->M_031 * d.D_031 + m->M_040 * d.D_040 + m->M_103 * d.D_103
+ m->M_112 * d.D_112 + m->M_121 * d.D_121 + m->M_130 * d.D_130
+ m->M_202 * d.D_202 + m->M_211 * d.D_211 + m->M_220 * d.D_220
+ m->M_301 * d.D_301 + m->M_310 * d.D_310 + m->M_400 * d.D_400;
*f_x = m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122 +
m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203 +
m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230 +
m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320 +
m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y = m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032 +
m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113 +
m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140 +
m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230 +
m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z = m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023 +
m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104 +
m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131 +
m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221 +
m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*pot = m->M_004 * d.D_004 + m->M_013 * d.D_013 + m->M_022 * d.D_022 +
m->M_031 * d.D_031 + m->M_040 * d.D_040 + m->M_103 * d.D_103 +
m->M_112 * d.D_112 + m->M_121 * d.D_121 + m->M_130 * d.D_130 +
m->M_202 * d.D_202 + m->M_211 * d.D_211 + m->M_220 * d.D_220 +
m->M_301 * d.D_301 + m->M_310 * d.D_310 + m->M_400 * d.D_400;
#endif
/* Take care of the the sign convention */
......@@ -361,26 +361,26 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm_truncated(
#if SELF_GRAVITY_MULTIPOLE_ORDER > 3
/* 4th order contributions */
*f_x = m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122
+ m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203
+ m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230
+ m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320
+ m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y = m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032
+ m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113
+ m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140
+ m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230
+ m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z = m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023
+ m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104
+ m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131
+ m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221
+ m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*pot = m->M_004 * d.D_004 + m->M_013 * d.D_013 + m->M_022 * d.D_022
+ m->M_031 * d.D_031 + m->M_040 * d.D_040 + m->M_103 * d.D_103
+ m->M_112 * d.D_112 + m->M_121 * d.D_121 + m->M_130 * d.D_130
+ m->M_202 * d.D_202 + m->M_211 * d.D_211 + m->M_220 * d.D_220
+ m->M_301 * d.D_301 + m->M_310 * d.D_310 + m->M_400 * d.D_400;
*f_x = m->M_004 * d.D_104 + m->M_013 * d.D_113 + m->M_022 * d.D_122 +
m->M_031 * d.D_131 + m->M_040 * d.D_140 + m->M_103 * d.D_203 +
m->M_112 * d.D_212 + m->M_121 * d.D_221 + m->M_130 * d.D_230 +
m->M_202 * d.D_302 + m->M_211 * d.D_311 + m->M_220 * d.D_320 +
m->M_301 * d.D_401 + m->M_310 * d.D_410 + m->M_400 * d.D_500;
*f_y = m->M_004 * d.D_014 + m->M_013 * d.D_023 + m->M_022 * d.D_032 +
m->M_031 * d.D_041 + m->M_040 * d.D_050 + m->M_103 * d.D_113 +
m->M_112 * d.D_122 + m->M_121 * d.D_131 + m->M_130 * d.D_140 +
m->M_202 * d.D_212 + m->M_211 * d.D_221 + m->M_220 * d.D_230 +
m->M_301 * d.D_311 + m->M_310 * d.D_320 + m->M_400 * d.D_410;
*f_z = m->M_004 * d.D_005 + m->M_013 * d.D_014 + m->M_022 * d.D_023 +
m->M_031 * d.D_032 + m->M_040 * d.D_041 + m->M_103 * d.D_104 +
m->M_112 * d.D_113 + m->M_121 * d.D_122 + m->M_130 * d.D_131 +
m->M_202 * d.D_203 + m->M_211 * d.D_212 + m->M_220 * d.D_221 +
m->M_301 * d.D_302 + m->M_310 * d.D_311 + m->M_400 * d.D_401;
*pot = m->M_004 * d.D_004 + m->M_013 * d.D_013 + m->M_022 * d.D_022 +
m->M_031 * d.D_031 + m->M_040 * d.D_040 + m->M_103 * d.D_103 +
m->M_112 * d.D_112 + m->M_121 * d.D_121 + m->M_130 * d.D_130 +
m->M_202 * d.D_202 + m->M_211 * d.D_211 + m->M_220 * d.D_220 +
m->M_301 * d.D_301 + m->M_310 * d.D_310 + m->M_400 * d.D_400;
#endif
/* Take care of the the sign convention */
......
......@@ -473,7 +473,7 @@ potential_derivatives_compute_M2P(const float r_x, const float r_y,
/* Un-truncated case (Newtonian potential) */
if (!periodic) {
const float r_inv2 = r_inv * r_inv;
const float r_inv2 = r_inv * r_inv;
Dt_1 = r_inv;
Dt_3 = -1.f * Dt_1 * r_inv2; /* -1 / r^3 */
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment