I am working on implementing the Alternating direction implicit method to solve FitzHugh–Nagumo reaction diffusion model. I have found a Python implementation example for it in a blog, but I think there is an error in the method - in the stencil presented here:
Shouldn't it be half time step size multiplying the reaction term f ?
Replacing the difference quotients by the differential quotients, one gets
U_t = D/2 * U_xx + D/2 * U_yy + Δt*f
in both instances, which is not the equation
U_t = D * (U_xx + U_yy) + f
that was the originally posed task.
So the coefficients should be
1/(Δt/2) as it was at
It seems the formula is a mix-up of the one with difference quotients and the next stage where it gets multiplied by
And in that next formula one does not need new constants as indeed
p=x,y and then you are right that the factor of
f should be