資源簡介
GPRMAX3.0 是利用有限差分時域 (fdtd) 方法求解3D 麥克斯韋方程組,用來模擬探地雷達而設計的, 但也可用于為許多其它應用建立電磁波傳播模型。該軟件主要使用Python語言編寫,同時需要支持OpenMP的C編譯器visual stdio
代碼片段和文件信息
#?Copyright?(C)?2015-2018:?The?University?of?Edinburgh
#?????????????????Authors:?Craig?Warren?and?Antonis?Giannopoulos
#
#?This?file?is?part?of?gprMax.
#
#?gprMax?is?free?software:?you?can?redistribute?it?and/or?modify
#?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
#?the?Free?Software?Foundation?either?version?3?of?the?License?or
#?(at?your?option)?any?later?version.
#
#?gprMax?is?distributed?in?the?hope?that?it?will?be?useful
#?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
#?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
#?GNU?General?Public?License?for?more?details.
#
#?You?should?have?received?a?copy?of?the?GNU?General?Public?License
#?along?with?gprMax.??If?not?see? .
try:
????from?setuptools?import?setup?Extension
except?ImportError:
????from?distutils.core?import?setup
????from?distutils.extension?import?Extension
try:
????import?numpy?as?np
except?ImportError:
????raise?ImportError(‘gprMax?requires?the?NumPy?package.‘)
import?glob
import?os
import?re
import?shutil
import?sys
#?Importing?_version__.py?before?building?can?cause?issues.
with?open(‘gprMax/_version.py‘?‘r‘)?as?fd:
????version?=?re.search(r‘^__version__\s*=\s*[\‘“]([^\‘“]*)[\‘“]‘
????????????????????????fd.read()?re.MULTILINE).group(1)
#?Parse?package?name?from?init?file.?Importing?__init__.py?/?gprMax?will?break?as?gprMax?depends?on?compiled?.pyx?files.
with?open(‘gprMax/__init__.py‘?‘r‘)?as?fd:
????packagename?=?re.search(r‘^__name__\s*=\s*[\‘“]([^\‘“]*)[\‘“]‘
????????????????????????????fd.read()?re.MULTILINE).group(1)
packages?=?[packagename?‘tests‘?‘tools‘?‘user_libs‘]
#?Python?version
if?sys.version_info[:2]?(3?4):
????sys.exit(‘\nExited:?Requires?Python?3.4?or?newer!\n‘)
#?Process?‘build‘?command?line?argument
if?‘build‘?in?sys.argv:
????print(“Running?‘build_ext?--inplace‘“)
????sys.argv.remove(‘build‘)
????sys.argv.append(‘build_ext‘)
????sys.argv.append(‘--inplace‘)
#?Process?‘--no-cython‘?command?line?argument?-?either?Cythonize?or?just?compile?the?.c?files
if?‘--no-cython‘?in?sys.argv:
????USE_CYTHON?=?False
????sys.argv.remove(‘--no-cython‘)
else:
????USE_CYTHON?=?True
#?Build?a?list?of?all?the?files?that?need?to?be?Cythonized?looking?in?gprMax?directory?and?user_libs
cythonfiles?=?[]
for?root?dirs?files?in?os.walk(os.path.join(os.getcwd()?packagename)):
????for?file?in?files:
????????if?file.endswith(‘.pyx‘):
????????????cythonfiles.append(os.path.join(packagename?file))
for?root?dirs?files?in?os.walk(os.path.join(os.getcwd()?‘user_libs‘)):
????for?file?in?files:
????????if?file.endswith(‘.pyx‘):
????????????cythonfiles.append(os.path.join(‘user_libs‘?file))
#?Process?‘cleanall‘?command?line?argument?-?cleanup?Cython?files
if?‘cleanall‘?in?sys.argv:
????USE_CYTHON?=?False
????print(‘Deleting?Cython?files...‘)
????for?file?in?cythonfiles:
????????filebase?=?os.path.splitext(file)[0]
????????#?Remove?Cython?C?files
????????if?os.path.isfile(fileba
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-05?09:08??gprMax-master\
?????文件??????????45??2018-04-05?09:08??gprMax-master\.gitattributes
?????文件?????????204??2018-04-05?09:08??gprMax-master\.gitignore
?????文件?????????661??2018-04-05?09:08??gprMax-master\CREDITS
?????文件???????35141??2018-04-05?09:08??gprMax-master\LICENSE
?????文件?????????127??2018-04-05?09:08??gprMax-master\MANIFEST.in
?????文件???????12326??2018-04-05?09:08??gprMax-master\README.rst
?????文件?????????294??2018-04-05?09:08??gprMax-master\conda_env.yml
?????目錄???????????0??2018-04-05?09:08??gprMax-master\docs\
?????文件????????7417??2018-04-05?09:08??gprMax-master\docs\Makefile
?????目錄???????????0??2018-04-05?09:08??gprMax-master\docs\source\
?????目錄???????????0??2018-04-05?09:08??gprMax-master\docs\source\_static\
?????目錄???????????0??2018-04-05?09:08??gprMax-master\docs\source\_static\css\
?????文件?????????388??2018-04-05?09:08??gprMax-master\docs\source\_static\css\my_theme.css
?????文件????????3567??2018-04-05?09:08??gprMax-master\docs\source\benchmarking.rst
?????文件?????????709??2018-04-05?09:08??gprMax-master\docs\source\coding.rst
?????文件????????2380??2018-04-05?09:08??gprMax-master\docs\source\comparisons_analytical.rst
?????文件????????2129??2018-04-05?09:08??gprMax-master\docs\source\comparisons_numerical.rst
?????文件???????12089??2018-04-05?09:08??gprMax-master\docs\source\conf.py
?????文件????????2408??2018-04-05?09:08??gprMax-master\docs\source\examples_advanced.rst
?????文件????????9057??2018-04-05?09:08??gprMax-master\docs\source\examples_antennas.rst
?????文件???????10734??2018-04-05?09:08??gprMax-master\docs\source\examples_simple_2D.rst
?????文件????????4103??2018-04-05?09:08??gprMax-master\docs\source\faqs.rst
?????文件???????14741??2018-04-05?09:08??gprMax-master\docs\source\features.rst
?????文件???????12266??2018-04-05?09:08??gprMax-master\docs\source\gprmodelling.rst
?????文件????????2663??2018-04-05?09:08??gprMax-master\docs\source\gpu.rst
?????目錄???????????0??2018-04-05?09:08??gprMax-master\docs\source\images\
?????文件???????77590??2018-04-05?09:08??gprMax-master\docs\source\images\abcs.png
?????文件???????22697??2018-04-05?09:08??gprMax-master\docs\source\images\antenna_like_GSSI_1500.png
?????文件???????57723??2018-04-05?09:08??gprMax-master\docs\source\images\antenna_like_GSSI_400.png
?????文件??????195785??2018-04-05?09:08??gprMax-master\docs\source\images\antenna_like_MALA_1200.png
............此處省略383個文件信息
- 上一篇:創建畫板,手寫體實時在線識別
- 下一篇:統計學習方法以及代碼實現
評論
共有 條評論