alimaye / sun-fan-delta-model

GNU General Public License v3.0
0 stars 0 forks source link

BUG slope miscalculated #57

Closed amoodie closed 2 years ago

amoodie commented 2 years ago

slope to the west is miscalculated here. It should be

        grid.S.W = -(grid.zPadded(grid.stencil.W.r,grid.stencil.W.c)-grid.z)/(*grid.dx);

i.e., no sqrt(2) on the distance.

I'm reporting this rather than fixing it right away, because I think I'll make a change to this stencil stuff anyway with an upcoming PR. But this issue will make sure we don't forget it long term.