Skip to content

Commit

Permalink
fixed dV issue for cyl geom.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinRayAngus committed Jul 19, 2024
1 parent 17824c6 commit 1ba3890
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Particles/Collision/BinaryCollision/BinaryCollision.H
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ public:
++i1; if ( i1 == cell_half_1 ) { i1 = cell_start_1; }
++i2; if ( i2 == cell_stop_1 ) { i2 = cell_half_1; }
}
#if defined WARPX_DIM_RZ
const int ri = (i_cell - i_cell%nz) / nz;
auto dV = MathConst::pi*(2.0_prt*ri+1.0_prt)*dr*dr*dz;
#endif
n12 = 2.0_prt * n12 / dV;
n12_in_each_cell[i_cell] = n12;
}
Expand Down Expand Up @@ -731,6 +735,10 @@ public:
++i1; if ( i1 == cell_stop_1 ) { i1 = cell_start_1; }
++i2; if ( i2 == cell_stop_2 ) { i2 = cell_start_2; }
}
#if defined WARPX_DIM_RZ
const int ri = (i_cell - i_cell%nz) / nz;
auto dV = MathConst::pi*(2.0_prt*ri+1.0_prt)*dr*dr*dz;
#endif
n12 = n12 / dV;
n12_in_each_cell[i_cell] = n12;
}
Expand Down

0 comments on commit 1ba3890

Please sign in to comment.