simplification of evaluateChange in gretchko
I think the whole if loop can be avoided if you use something like np.sum(abs(u-u_new)**2). This should work for arrays (u, u_new) of arbitrary size and dimension - it will simply sum over all.
I think the whole if loop can be avoided if you use something like np.sum(abs(u-u_new)**2). This should work for arrays (u, u_new) of arbitrary size and dimension - it will simply sum over all.