Пример #1
0
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))
Пример #2
0
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))
Пример #3
0
def test_call(points, vref):
    allclose(vref, points, lambda x: eik2d(x))
Пример #4
0
def test_solve(sources, tref):
    tt = eik2d.solve(sources, nsweep=2)

    allclose(tref, tt, lambda x: x.grid.sum())
Пример #5
0
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())
Пример #6
0
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))