Skip to main content

为地球物理应用程序执行光线追踪的代码

项目描述

标识

皮皮 许可证:GPL v3 DOI 构建状态 文件状态

此 repo 包含用于在常规和非结构化网格上进行光线跟踪的 C++ 和 python 代码。还提供了 Matlab 包装器。

Python 包

ttcrpy 是一个计算走时和射线追踪的软件包,它是在考虑地球物理应用的情况下开发的,例如基于射线的地震/GPR 层析成像和微震事件定位(联合震源速度反演)。该软件包包含在 2D 和 3D 直线网格以及 2D 三角形和 3D 四面体网格上执行计算的代码。已经实现了三种不同的算法:快速扫描方法、最短路径方法和动态最短路径方法。计算可以在多核机器上并行运行。

核心计算代码用 C++ 编写,并已用 cython 封装。

文档可以在Read The Docs上找到

独立的命令行程序

可以从命令行调用三个程序:

  • ttcr2d : 平面 2D 网格上的光线追踪
  • ttcr2ds:在起伏表面上进行光线追踪
  • ttcr3d : 3D 光线追踪

请参阅有关命令行程序选项和文件格式的文档

例子

查看示例目录中的文件以获取一些示例。

编译

这些程序用 C++ 编码并遵循 C++11 标准。您必须在系统上安装 VTK ( http://vtk.org ),才能从全部功能中受益。来自 eigen3 ( http://eigen.tuxfamily.org ) 和 boost ( http://www.boost.org ) 库的文件与源代码一起分发,以方便编译。这些代码是在 Mac 上使用默认编译器 (clang) 编译和测试的。他们还在 linux 下使用 g++ 4.8 版进行了一定程度的测试。

Matlab 包装器

要编译 mexfiles,您将需要:

  • 符合 C++11 标准的 C++ 编译器
  • ttcr 包的源代码

在我的 OS X 机器上,我使用这个命令从终端编译:

MATLAB=/Applications/MATLAB_R2014a.app

$MATLAB/bin/mex -O CXXFLAGS='$CXXFLAGS -std=c++11 -stdlib=libc++' \
LDFLAGS='$LDFLAGS -std=c++11 -stdlib=libc++' -largeArrayDims -v \
-I$HOME/src/ttcr/ttcr -I$HOME/src/ttcr/boost_1_72_0 \
-I$HOME/src/ttcr/eigen-3.3.7 grid2dunsp_mex.cpp

3D 类必须verbose.cpp在源文件列表中编译,即

$MATLAB/bin/mex -O CXXFLAGS='$CXXFLAGS -std=c++11 -stdlib=libc++' \
LDFLAGS='$LDFLAGS -std=c++11 -stdlib=libc++' -largeArrayDims -v \
-I$HOME/src/ttcr/ttcr -I$HOME/src/ttcr/boost_1_72_0 \
-I$HOME/src/ttcr/eigen-3.3.7 grid3dunfs_mex.cpp verbose.cpp

在安装了英特尔编译器的 Windows 机器上,我可以从 matlab 提示符编译它:

mex -v -O COMPFLAGS='$COMPFLAGS /Qstd=c++11' -largeArrayDims -I../ttcr -I../boost_1_72_0 -I../eigen-3.3.7 grid2dunsp_mex.cpp

不幸的是,我不能为在其他平台上编译提供广泛的支持,尤其是 Windows 变体。

请向https://github.com/groupeLIAMG/ttcr/issues报告错误

参考


@article{doi:10.1111/1365-2478.12930,
  author = {Nasr, Maher and Giroux, Bernard and Dupuis, J. Christian},
  title = {A hybrid approach to compute seismic travel times in three-dimensional tetrahedral meshes},
  journal = {Geophysical Prospecting},
  volume = {n/a},
  number = {n/a},
  pages = {},
  keywords = {Travel time, Seismic modelling, Ray tracing, Seismics, Computing aspects},
  doi = {10.1111/1365-2478.12930},
  url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/1365-2478.12930},
  eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/1365-2478.12930},
}

@inbook{nasr18,
  author = { Maher Nasr  and  Bernard Giroux  and  J. Christian Dupuis },
  title = {An optimized approach to compute traveltimes in 3D unstructured meshes},
  booktitle = {SEG Technical Program Expanded Abstracts 2018},
  chapter = {},
  pages = {5073-5077},
  year = {2018},
  doi = {10.1190/segam2018-2997918.1},
  URL = {https://library.seg.org/doi/abs/10.1190/segam2018-2997918.1},
  eprint = {https://library.seg.org/doi/pdf/10.1190/segam2018-2997918.1}
}

@InProceedings{giroux14,
  Title = {Comparison of grid-based methods for raytracing on unstructured meshes},
  Author = {Bernard Giroux},
  Booktitle = {SEG Technical Program Expanded Abstracts},
  Year = {2014},
  Pages = {3388-3392},
  Chapter = {649},
  DOI = {10.1190/segam2014-1197.1},
  Eprint = {http://library.seg.org/doi/pdf/10.1190/segam2014-1197.1},
  URL = {http://dx.doi.org/10.1190/segam2014-1197.1}
}


@ARTICLE{giroux13,
  author = {Bernard Giroux and Beno\^{\i}t Larouche},
  title = {Task-parallel implementation of {3D} shortest path raytracing for
	geophysical applications},
  journal = {Computers & Geosciences},
  year = {2013},
  volume = {54},
  pages = {130--141},
  number = {0},
  doi = {10.1016/j.cageo.2012.12.005}
  url = {http://dx.doi.org/10.1016/j.cageo.2012.12.005}
}

@INPROCEEDINGS{giroux13b,
  author = {Bernard Giroux},
  title = {Shortest path raytracing on tetrahedral meshes},
  booktitle = {75$^{th}$ EAGE Conference \& Exhibition},
  year = {2013},
  address = {London},
  organization = {EAGE},
  doi = {10.3997/2214-4609.20130236}
  url = {http://dx.doi.org/10.3997/2214-4609.20130236}
}

@ARTICLE{lelievre11,
  author = {Leli\`evre, Peter G. and Farquharson, Colin G. and Hurich, Charles A.},
  title = {Computing first-arrival seismic traveltimes on unstructured 3-{D}
	tetrahedral grids using the Fast Marching Method},
  journal = {Geophysical Journal International},
  year = {2011},
  volume = {184},
  pages = {885-896},
  number = {2},
  doi = {10.1111/j.1365-246X.2010.04880.x}
  url = {http://dx.doi.org/10.1111/j.1365-246X.2010.04880.x}
}

@ARTICLE{qian07,
  author = {Qian, Jianliang and Zhang, Yong-Tao and Zhao, Hong-Kai},
  title = {Fast Sweeping Methods for Eikonal Equations on Triangular Meshes},
  journal = {SIAM Journal on Numerical Analysis},
  year = {2007},
  volume = {45},
  pages = {83--107},
  number = {1},
  doi = {10.1137/050627083},
  publisher = {Society for Industrial and Applied Mathematics},
  url = {http://www.jstor.org/stable/40232919}
}

@Article{zhang06,
  Title                    = {High Order Fast Sweeping Methods for Static {H}amilton–{J}acobi Equations},
  Author                   = {Yong-Tao Zhang and Hong-Kai Zhao and Jianliang Qian},
  Journal                  = {Journal of Scientific Computing},
  Year                     = {2006},
  Number                   = {1},
  Pages                    = {25--56},
  Volume                   = {29},
  DOI                      = {10.1007/s10915-005-9014-3},
  URL                      = {http://dx.doi.org/10.1007/s10915-005-9014-3}
}

@Article{zhao05,
  Title                    = {A Fast Sweeping Method for Eikonal Equations},
  Author                   = {Zhao, Hongkai},
  Journal                  = {Mathematics of Computation},
  Year                     = {2005},
  Month                    = apr,
  Number                   = {250},
  Pages                    = {603--627},
  Volume                   = {74},
  Publisher                = {American Mathematical Society},
  URL                      = {http://www.jstor.org/stable/4100081}
}

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

内置发行版

ttcrpy-1.1.8-cp39-cp39-win_amd64.whl (1.1 MB 查看哈希

已上传 cp39

ttcrpy-1.1.8-cp39-cp39-macosx_10_9_x86_64.whl (1.9 MB 查看哈希

已上传 cp39

ttcrpy-1.1.8-cp38-cp38-win_amd64.whl (1.1 MB 查看哈希

已上传 cp38

ttcrpy-1.1.8-cp38-cp38-macosx_10_9_x86_64.whl (1.9 MB 查看哈希

已上传 cp38

ttcrpy-1.1.8-cp37-cp37m-win_amd64.whl (1.1 MB 查看哈希

已上传 cp37

ttcrpy-1.1.8-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB 查看哈希

已上传 cp37