fix periodic boundaries when determining div_v_p, add permeability definition in second test