We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5029d53 commit 3d32113Copy full SHA for 3d32113
1 file changed
src/gravity/step.h
@@ -14,12 +14,13 @@ inline void Step(std::vector<Particle>& p, real dt) {
14
root.computeMass();
15
16
real theta = 0.5;
17
-
+
18
#pragma omp parallel for schedule(static)
19
- for (int i = 0; i < p.size(); i++) {
20
- bhForce(&root, p[i], theta, dt);
+ for (int i = 0; i < p.size(); i++) {
+ bhForce(&root, p[i], theta, dt);
21
}
22
23
+ #pragma omp parallel for
24
for (auto& a : p) {
25
a.x += a.vx * dt;
26
a.y += a.vy * dt;
@@ -28,3 +29,4 @@ inline void Step(std::vector<Particle>& p, real dt) {
28
29
30
31
32
0 commit comments