I have been looking into the shallow water equation but there is an issue with my simulation. Particles aren’t propagating correctly think I’m misunderstanding the equations.

http://www.mathematik.uni-dortmund.de/lsiii/cms/papers/GevelerRibbrockGoeddekeTurek2009.pdf

My question is assuming you have an array of h,vx,vy how do you write the equation for f1 and f2? I’m kinda confused by the term

ei*ui*uj, I’m currently writing that for diagonals as 2*(dx/dt)*(dx/dt)*(vx+vy) for f2 and cardinal using f1 as an example, (dx/dt)*(dx/dt) vxvx.
I am taking ei*ui

*uj to be equivalent to (ei*ui)^2 which I have seen in other papers. Some pseudo code or some code to look at would be much appreciated.