Boundary bug in velocity step
near line 396 in simulation.cpp (velocityStep) we have:
kk::parallel_for("vel_step_1", range3D({1,0,0},{nr,ni-1,ns}),
LBD(int i, int h, int j) {
...
real vp2 = ipow<2>(h < ni-1 // \todo recode loops for speed
? (vphi0(i,h,j)+vphi0(i,h+1,j)+vphi0(i-1,h,j)+vphi0(i-1,h+1,j))/4
: (vphi0(i,h,j)+vphi0(i-1,h,j)+vphi0(i-1,h+1,j))/3);
But if h==ni-1
(which cannot happen since the ni-1
layer is excluded from the domain which could also be a bug) vphi0(i-1,h+1,j)
is not a valid expression.