This evaluates the nonlinear finite difference approximation to the residuals
.
Note that it loops on the interior points and the boundary separately, to
avoid conditional statements within the double loop over the local grid
indices.
Thus far, only periodic boundary conditions work.
int ch_residual_vector_3d ( Vec X, Vec F, void* ptr )