Commit 1d0386d
committed
Only add a j-particle when it has mass
j-particles are the particles that exert gravity. If they are massless, they should not become a j-particle.
When deploying PH4 with a CPU backend, this is taken care of in line 207 of idata.cc in "get_partial_acc_and_jerk":
"
// Skip particles with zero mass.
if (jdat->mass[j] > _TINY_){
"
However, this is not the best place to do this, it would be better to not create the j-particle at all.
For both the CPU and GPU backends this commit fixes this.
This means that the conditional in line 208 of idata.cc has now become redundant.1 parent ac1ecdf commit 1d0386d
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| |||
0 commit comments