Skip to content

Commit e5cd788

Browse files
Change eps to adaptive softening based on node size
1 parent 2111916 commit e5cd788

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gravity/octree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ inline void bhAccel(Octree* node, const Particle& p, real theta,
102102

103103
constexpr real G = real(6.67430e-11);
104104

105-
// IMPORTANT: use a meaningful softening for your scale
106-
constexpr real eps = real(1e6);
105+
// Adaptive softening
106+
real eps = node->size * real(0.01);
107107

108108
real dx = node->cx - p.x;
109109
real dy = node->cy - p.y;

0 commit comments

Comments
 (0)