Skip to content

Commit ef8505c

Browse files
Update octree.h
1 parent 4445426 commit ef8505c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/gravity/octree.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ inline void bhAccel(Octree* node,
235235
}
236236
}
237237

238-
// Barnes–Hut solver façade, nbody-style, no namespace.
238+
239239
struct BarnesHut {
240240
real theta;
241241
real root_x, root_y, root_z;
@@ -269,7 +269,7 @@ struct BarnesHut {
269269
}
270270

271271
// Compute self-gravity accelerations in-place on particles.
272-
// You can adapt this to your own accel storage.
272+
273273
void evalSelfGravity(std::vector<Particle>& particles) const {
274274
if (!root) return;
275275

@@ -279,14 +279,13 @@ struct BarnesHut {
279279
real az = 0;
280280
bhAccel(root, p, theta, ax, ay, az);
281281

282-
// store back however your engine does it
283282
p.ax = ax;
284283
p.ay = ay;
285284
p.az = az;
286285
}
287286
}
288287

289-
// Single-point query, like SPH's evalAcceleration.
288+
290289
void evalAtPoint(const Particle& probe,
291290
real& ax,
292291
real& ay,

0 commit comments

Comments
 (0)