Skip to content
Snippets Groups Projects
Commit 1872840e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Allow compilation when multipole order is 0

parent 070221ab
No related branches found
No related tags found
1 merge request!324Gravity multi dt
...@@ -810,7 +810,9 @@ INLINE static void gravity_P2M(struct gravity_tensors *m, ...@@ -810,7 +810,9 @@ INLINE static void gravity_P2M(struct gravity_tensors *m,
#endif #endif
} }
M_100 = M_010 = M_001 = 0.f; #if SELF_GRAVITY_MULTIPOLE_ORDER > 0
M_100 = M_010 = M_001 = 0.f; /* Matthieu */
#endif
/* Store the data on the multipole. */ /* Store the data on the multipole. */
m->m_pole.M_000 = mass; m->m_pole.M_000 = mass;
...@@ -1258,11 +1260,11 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb, ...@@ -1258,11 +1260,11 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
gp->num_interacted += lb->num_interacted; gp->num_interacted += lb->num_interacted;
#endif #endif
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
/* Distance to the multipole */ /* Distance to the multipole */
const double dx[3] = {gp->x[0] - loc[0], gp->x[1] - loc[1], const double dx[3] = {gp->x[0] - loc[0], gp->x[1] - loc[1],
gp->x[2] - loc[2]}; gp->x[2] - loc[2]};
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
/* 0th order interaction */ /* 0th order interaction */
gp->a_grav[0] += X_000(dx) * lb->F_100; gp->a_grav[0] += X_000(dx) * lb->F_100;
gp->a_grav[1] += X_000(dx) * lb->F_010; gp->a_grav[1] += X_000(dx) * lb->F_010;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment