Coverage for /usr/local/lib/python3.11/dist-packages/pyrocko/modelling/eikonal.py: 100%
4 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-10-06 06:59 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2023-10-06 06:59 +0000
1# https://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6'''
7FMM solver for the eikonal equation in 2D and 3D.
8'''
10from .. import eikonal_ext
13def eikonal_solver_fmm_cartesian(speeds, times, delta):
14 '''
15 Solve eikonal equation in 2D or 3D using the fast marching method.
17 This function implements the fast marching method (FMM) by [sethian1996]_.
19 :param speeds:
20 Velocities at the grid nodes.
21 :type speeds:
22 2D or 3D :py:class:`numpy.ndarray`
24 :param times:
25 Arrival times (input and output). The solution is obtained at nodes
26 where times is set to a negative value. Values of zero, or positive
27 values are used as seeding points.
28 :type times:
29 2D or 3D :py:class:`numpy.ndarray`, same shape as `speeds`
31 :param delta:
32 Grid spacing.
33 :type delta:
34 float
36 .. [sethian1996] Sethian, James A. "A fast marching level set method for
37 monotonically advancing fronts." Proceedings of the National Academy of
38 Sciences 93.4 (1996): 1591-1595. https://doi.org/10.1073/pnas.93.4.1591
39 '''
41 return eikonal_ext.eikonal_solver_fmm_cartesian(speeds, times, delta)