Skip to content
Snippets Groups Projects
Commit 1dc6966f authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fixed same bug, yet in a different place.

parent 3ee481c2
No related branches found
No related tags found
No related merge requests found
...@@ -353,9 +353,6 @@ void iact_pair ( struct cell *ci , struct cell *cj ) { ...@@ -353,9 +353,6 @@ void iact_pair ( struct cell *ci , struct cell *cj ) {
for ( k = j+1 ; k < 8 ; k++ ) for ( k = j+1 ; k < 8 ; k++ )
iact_pair( ci->progeny[j] , cj->progeny[k] ); iact_pair( ci->progeny[j] , cj->progeny[k] );
/* Otherwise, compute interactions. */
else {
/* Get the minimum distance between both cells. */ /* Get the minimum distance between both cells. */
for ( r2 = 0.0, k = 0 ; k < 3 ; k++ ) { for ( r2 = 0.0, k = 0 ; k < 3 ; k++ ) {
dx[k] = fabs( ci->loc[k] - cj->loc[k] ); dx[k] = fabs( ci->loc[k] - cj->loc[k] );
...@@ -365,7 +362,7 @@ void iact_pair ( struct cell *ci , struct cell *cj ) { ...@@ -365,7 +362,7 @@ void iact_pair ( struct cell *ci , struct cell *cj ) {
} }
/* Sufficiently well-separated? */ /* Sufficiently well-separated? */
if ( r2/ci->h[0] < dist_min*dist_min ) { if ( r2/ci->h[0] > dist_min*dist_min ) {
/* Compute the center of mass interactions. */ /* Compute the center of mass interactions. */
iact_pair_pc( ci , cj ); iact_pair_pc( ci , cj );
...@@ -373,6 +370,12 @@ void iact_pair ( struct cell *ci , struct cell *cj ) { ...@@ -373,6 +370,12 @@ void iact_pair ( struct cell *ci , struct cell *cj ) {
} }
/* Recurse? */
else if ( ci->split && cj->split )
for ( j = 0 ; j < 8 ; j++ )
for ( k = j+1 ; k < 8 ; k++ )
iact_pair( ci->progeny[j] , cj->progeny[k] );
/* Otherwise, do direct interactions. */ /* Otherwise, do direct interactions. */
else { else {
...@@ -414,8 +417,6 @@ void iact_pair ( struct cell *ci , struct cell *cj ) { ...@@ -414,8 +417,6 @@ void iact_pair ( struct cell *ci , struct cell *cj ) {
} /* otherwise, compute interactions directly. */ } /* otherwise, compute interactions directly. */
} /* otherwise, compute interactions. */
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment