Commit 467ff268 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Better naming convention for multipole drifting

parent 9de8cf1a
......@@ -1487,7 +1487,7 @@ void cell_drift_all_multipoles(struct cell *c, const struct engine *e) {
} else if (ti_current > ti_old_multipole) {
/* Drift the multipole */
gravity_multipole_drift(c->multipole, dt);
gravity_drift(c->multipole, dt);
}
/* Update the time of the last drift */
......
......@@ -104,6 +104,22 @@ INLINE static void gravity_reset(struct gravity_tensors *m) {
bzero(m, sizeof(struct gravity_tensors));
}
/**
* @brief Drifts a #multipole forward in time.
*
* @param m The #multipole.
* @param dt The drift time-step.
*/
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];
m->CoM[1] += m->m_pole.vel[1];
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));
......@@ -214,32 +230,6 @@ INLINE static int gravity_multipole_equal(const struct multipole *ma,
return 1;
}
/**
* @brief Drifts a #multipole forward in time.
*
* @param m The #multipole.
* @param dt The drift time-step.
*/
INLINE static void gravity_multipole_drift(struct gravity_tensors *m,
double dt) {
/* Move the whole thing according to bulk motion */
m->CoM[0] += m->m_pole.vel[0];
m->CoM[1] += m->m_pole.vel[1];
m->CoM[2] += m->m_pole.vel[2];
}
/**
* @brief Applies the forces due to particles j onto particles i directly.
*
* @param gparts_i The #gpart to update.
* @param gcount_i The number of particles to update.
* @param gparts_j The #gpart that source the gravity field.
* @param gcount_j The number of sources.
*/
INLINE static void gravity_P2P(struct gpart *gparts_i, int gcount_i,
const struct gpart *gparts_j, int gcount_j) {}
/**
* @brief Constructs the #multipole of a bunch of particles around their
* centre of mass.
......
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