def test_call(points, gzref, gxref, gyref): sources = 0.0, 0.0, 0.0 tt = eik3d.solve(sources, nsweep=3, return_gradient=True) allclose(gzref, points, lambda x: tt.gradient[0](x)) allclose(gxref, points, lambda x: tt.gradient[1](x)) allclose(gyref, points, lambda x: tt.gradient[2](x))
def test_call(sources, points, gzref, gxref): tt = eik2d.solve(sources, nsweep=2, return_gradient=True) allclose(gzref, points, lambda x: tt.gradient[0](x)) allclose(gxref, points, lambda x: tt.gradient[1](x))
def test_call(points, vref): allclose(vref, points, lambda x: eik2d(x))
def test_solve(sources, tref): tt = eik2d.solve(sources, nsweep=2) allclose(tref, tt, lambda x: x.grid.sum())
def test_raytrace(points, pref, honor_grid): sources = 0.0, 0.0, 0.0 tt = eik3d.solve(sources, nsweep=3, return_gradient=True) rays = tt.raytrace(points, stepsize=1.0, honor_grid=honor_grid) allclose(pref, rays, lambda x: x.sum())
def test_call(points, tref): sources = 0.0, 0.0, 0.0 tt = eik3d.solve(sources, nsweep=3) allclose(tref, points, lambda x: tt(x))