Commit cf81bf14 authored by Matthieu Schaller's avatar Matthieu Schaller Committed by Matthieu Schaller
Browse files

Make the gravity interaction functions callable from the test suite.

parent 2be403ee
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "gravity.h" #include "gravity.h"
#include "inline.h" #include "inline.h"
#include "part.h" #include "part.h"
#include "timers.h"
/** /**
* @brief Recursively propagate the multipoles down the tree by applying the * @brief Recursively propagate the multipoles down the tree by applying the
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
* @param c The #cell we are working on. * @param c The #cell we are working on.
* @param timer Are we timing this ? * @param timer Are we timing this ?
*/ */
void runner_do_grav_down(struct runner *r, struct cell *c, int timer) { static INLINE void runner_do_grav_down(struct runner *r, struct cell *c, int timer) {
/* Some constants */ /* Some constants */
const struct engine *e = r->e; const struct engine *e = r->e;
...@@ -125,7 +126,7 @@ void runner_do_grav_down(struct runner *r, struct cell *c, int timer) { ...@@ -125,7 +126,7 @@ void runner_do_grav_down(struct runner *r, struct cell *c, int timer) {
* @param ci The #cell with field tensor to interact. * @param ci The #cell with field tensor to interact.
* @param cj The #cell with the multipole. * @param cj The #cell with the multipole.
*/ */
void runner_dopair_grav_mm(const struct runner *r, struct cell *restrict ci, static INLINE void runner_dopair_grav_mm(const struct runner *r, struct cell *restrict ci,
struct cell *restrict cj) { struct cell *restrict cj) {
/* Some constants */ /* Some constants */
...@@ -439,7 +440,7 @@ static INLINE void runner_dopair_grav_pm( ...@@ -439,7 +440,7 @@ static INLINE void runner_dopair_grav_pm(
* @param ci The first #cell. * @param ci The first #cell.
* @param cj The other #cell. * @param cj The other #cell.
*/ */
void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj) { static INLINE void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj) {
const struct engine *e = r->e; const struct engine *e = r->e;
...@@ -640,7 +641,7 @@ void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj) { ...@@ -640,7 +641,7 @@ void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj) {
* *
* @todo Use a local cache for the particles. * @todo Use a local cache for the particles.
*/ */
void runner_doself_grav_pp_full(struct runner *r, struct cell *c) { static INLINE void runner_doself_grav_pp_full(struct runner *r, struct cell *c) {
/* Some constants */ /* Some constants */
const struct engine *const e = r->e; const struct engine *const e = r->e;
...@@ -762,7 +763,7 @@ void runner_doself_grav_pp_full(struct runner *r, struct cell *c) { ...@@ -762,7 +763,7 @@ void runner_doself_grav_pp_full(struct runner *r, struct cell *c) {
* *
* @todo Use a local cache for the particles. * @todo Use a local cache for the particles.
*/ */
void runner_doself_grav_pp_truncated(struct runner *r, struct cell *c) { static INLINE void runner_doself_grav_pp_truncated(struct runner *r, struct cell *c) {
/* Some constants */ /* Some constants */
const struct engine *const e = r->e; const struct engine *const e = r->e;
...@@ -889,7 +890,7 @@ void runner_doself_grav_pp_truncated(struct runner *r, struct cell *c) { ...@@ -889,7 +890,7 @@ void runner_doself_grav_pp_truncated(struct runner *r, struct cell *c) {
* @param r The #runner. * @param r The #runner.
* @param c The #cell. * @param c The #cell.
*/ */
void runner_doself_grav_pp(struct runner *r, struct cell *c) { static INLINE void runner_doself_grav_pp(struct runner *r, struct cell *c) {
/* Some properties of the space */ /* Some properties of the space */
const struct engine *e = r->e; const struct engine *e = r->e;
...@@ -944,7 +945,7 @@ void runner_doself_grav_pp(struct runner *r, struct cell *c) { ...@@ -944,7 +945,7 @@ void runner_doself_grav_pp(struct runner *r, struct cell *c) {
* *
* @todo Use a local cache for the particles. * @todo Use a local cache for the particles.
*/ */
void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj, static INLINE void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
int gettimer) { int gettimer) {
/* Some constants */ /* Some constants */
...@@ -1096,7 +1097,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj, ...@@ -1096,7 +1097,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
* *
* @todo Use a local cache for the particles. * @todo Use a local cache for the particles.
*/ */
void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) { static INLINE void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) {
/* Some constants */ /* Some constants */
const struct engine *e = r->e; const struct engine *e = r->e;
...@@ -1147,7 +1148,7 @@ void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) { ...@@ -1147,7 +1148,7 @@ void runner_doself_grav(struct runner *r, struct cell *c, int gettimer) {
* @param ci The #cell of interest. * @param ci The #cell of interest.
* @param timer Are we timing this ? * @param timer Are we timing this ?
*/ */
void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) { static INLINE void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) {
/* Some constants */ /* Some constants */
const struct engine *e = r->e; const struct engine *e = r->e;
......
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