Previously source_terms!() and source_terms_neutral!() were using the derivative!() function for z-derivatives. This is an error because derivative!() does not include communication between different shared-memory blocks. Mistake introduced in 1d-2d merge.
Instead, use the already-calculated moment derivatives. This slightly changes the way the derivatives are calculated, e.g. (n*du/dz + u*dn/dz) instead of d(n*u)/dz.
Previously source_terms!() and source_terms_neutral!() were using the
derivative!()
function for z-derivatives. This is an error becausederivative!()
does not include communication between different shared-memory blocks. Mistake introduced in 1d-2d merge.Instead, use the already-calculated moment derivatives. This slightly changes the way the derivatives are calculated, e.g. (n*du/dz + u*dn/dz) instead of d(n*u)/dz.