diff --git a/configure.ac b/configure.ac index 9199f5cca29a5932c17ca34eb96bc497876bd532..1786a42e8efdf6f08938cfecb36d7a67e05722c5 100644 --- a/configure.ac +++ b/configure.ac @@ -788,6 +788,15 @@ case "$with_potential" in ;; esac +# Gravity multipole order +AC_ARG_WITH([multipole-order], + [AS_HELP_STRING([--with-multipole-order=<order>], + [order of the multipole and gravtiational field expansion @<:@ default: 2@:>@] + )], + [with_multipole_order="$withval"], + [with_multipole_order="2"] +) +AC_DEFINE_UNQUOTED([SELF_GRAVITY_MULTIPOLE_ORDER], [$with_multipole_order], [Multipole order]) # Check for git, needed for revision stamps. @@ -835,6 +844,7 @@ AC_MSG_RESULT([ Riemann solver : $with_riemann Cooling function : $with_cooling External potential : $with_potential + Multipole order : $with_multipole_order Task debugging : $enable_task_debugging Debugging checks : $enable_debugging_checks diff --git a/src/multipole.h b/src/multipole.h index 81ad981c42e8497ab6889c79574262661e3934ad..3cbb55301f3175d25de9c5523d02564a19dcd702 100644 --- a/src/multipole.h +++ b/src/multipole.h @@ -110,8 +110,7 @@ INLINE static void gravity_reset(struct gravity_tensors *m) { * @param m The #multipole. * @param dt The drift time-step. */ -INLINE static void gravity_drift(struct gravity_tensors *m, - double dt) { +INLINE static void gravity_drift(struct gravity_tensors *m, double dt) { /* Move the whole thing according to bulk motion */ m->CoM[0] += m->m_pole.vel[0]; @@ -119,7 +118,6 @@ INLINE static void gravity_drift(struct gravity_tensors *m, m->CoM[2] += m->m_pole.vel[2]; } - INLINE static void gravity_field_tensors_init(struct gravity_tensors *m) { bzero(&m->a_x, sizeof(struct acc_tensor));