Skip to content

Commit d932223

Browse files
Update step.h
1 parent 9c82a36 commit d932223

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/gravity/step.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ inline void Step(std::vector<Particle>& p, real dt) {
1414
root.computeMass();
1515

1616
real theta = 0.5;
17-
18-
for (auto& a : p) {
19-
bhForce(&root, a, theta, dt);
17+
18+
#pragma omp parallel for schedule(static)
19+
for (int i = 0; I < p.size(); i++) {
20+
bhForce(&root, p[I], theta, dt);
2021
}
2122

2223
for (auto& a : p) {

0 commit comments

Comments
 (0)