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

Also apply the change to the other gravity schemes

parent bc72b5d2
......@@ -23,6 +23,7 @@
#include <float.h>
/* Local includes. */
#include "atomic.h"
#include "cosmology.h"
#include "gravity_properties.h"
#include "kernel_gravity.h"
......@@ -63,7 +64,7 @@ __attribute__((always_inline)) INLINE static float gravity_get_softening(
__attribute__((always_inline)) INLINE static void
gravity_add_comoving_potential(struct gpart* restrict gp, float pot) {
gp->potential += pot;
atomic_add_f(&gp->potential, pot);
}
/**
......
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