1# https://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6from .. import eikonal_ext
9def eikonal_solver_fmm_cartesian(speeds, times, delta):
10 '''
11 Solve eikonal equation in 2D or 3D using the fast marching method.
13 This function implements the fast marching method (FMM) by [sethian1996]_.
15 :param speeds:
16 Velocities at the grid nodes.
17 :type speeds:
18 2D or 3D :py:class:`numpy.ndarray`
20 :param times:
21 Arrival times (input and output). The solution is obtained at nodes
22 where times is set to a negative value. Values of zero, or positive
23 values are used as seeding points.
24 :type times:
25 2D or 3D :py:class:`numpy.ndarray`, same shape as `speeds`
27 :param delta:
28 Grid spacing.
29 :type delta:
30 float
32 .. [sethian1996] Sethian, James A. "A fast marching level set method for
33 monotonically advancing fronts." Proceedings of the National Academy of
34 Sciences 93.4 (1996): 1591-1595. https://doi.org/10.1073/pnas.93.4.1591
35 '''
37 return eikonal_ext.eikonal_solver_fmm_cartesian(speeds, times, delta)