To illustrate the possibilities of variable parameter \(\alpha =\alpha _i^n\)  in (REF ), we compute an example with variable velocity, where we let the code optimize the values of \(\alpha _i^n\)  at each time step and at each grid point. To do so we use the library PyTorch [1]} to implement a straightforward gradient descent method to minimize the loss function
\(J=J(I,N) = h \tau \sum _{i,n} (\min \lbrace 0,\phi _i^n\rbrace )^2\) 
