You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the 1d_stencil codes have a line that looks like this: return middle + (k * dt/dx * dx) * (left - 2*middle + right);
The code should look like this: return middle + (k * dt/(dx * dx)) * (left - 2*middle + right);
Because the example codes all have dx set to 1, fixing the
expressions won't make any difference for output. However,
if dx is set to any other value the results will be wrong.
The text was updated successfully, but these errors were encountered:
All the 1d_stencil codes have a line that looks like this:
return middle + (k * dt/dx * dx) * (left - 2*middle + right);
The code should look like this:
return middle + (k * dt/(dx * dx)) * (left - 2*middle + right);
Because the example codes all have dx set to 1, fixing the
expressions won't make any difference for output. However,
if dx is set to any other value the results will be wrong.
The text was updated successfully, but these errors were encountered: