你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
Formatting cleanups.
这个提交包含在:
@@ -7,10 +7,10 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# Code profiling
|
# Code profiling
|
||||||
# Time profiling
|
# Time profiling
|
||||||
#import cProfile, pstats
|
# import cProfile, pstats
|
||||||
#cProfile.run('gprMax.gprMax.main()','stats')
|
# cProfile.run('gprMax.gprMax.main()','stats')
|
||||||
#p = pstats.Stats('stats')
|
# p = pstats.Stats('stats')
|
||||||
#p.sort_stats('time').print_stats(25)
|
# p.sort_stats('time').print_stats(25)
|
||||||
|
|
||||||
# Memory profiling - use in gprMax.py
|
# Memory profiling - use in gprMax.py
|
||||||
# from memory profiler import profile
|
# from memory profiler import profile
|
||||||
|
@@ -65,13 +65,10 @@ class FractalSurface(object):
|
|||||||
|
|
||||||
if self.xs == self.xf:
|
if self.xs == self.xf:
|
||||||
surfacedims = (self.ny + 1, self.nz + 1)
|
surfacedims = (self.ny + 1, self.nz + 1)
|
||||||
d = G.dx
|
|
||||||
elif self.ys == self.yf:
|
elif self.ys == self.yf:
|
||||||
surfacedims = (self.nx + 1, self.nz + 1)
|
surfacedims = (self.nx + 1, self.nz + 1)
|
||||||
d = G.dy
|
|
||||||
elif self.zs == self.zf:
|
elif self.zs == self.zf:
|
||||||
surfacedims = (self.nx + 1, self.ny + 1)
|
surfacedims = (self.nx + 1, self.ny + 1)
|
||||||
d = G.dz
|
|
||||||
|
|
||||||
self.fractalsurface = np.zeros(surfacedims, dtype=complextype)
|
self.fractalsurface = np.zeros(surfacedims, dtype=complextype)
|
||||||
|
|
||||||
|
@@ -199,7 +199,7 @@ def dispersion_check(G):
|
|||||||
# Minimum wavelength
|
# Minimum wavelength
|
||||||
minwavelength = minvelocity / maxfreq
|
minwavelength = minvelocity / maxfreq
|
||||||
|
|
||||||
# Resolution of minimum wavelength
|
# Resolution of minimum wavelength
|
||||||
resolution = minwavelength / resolvedsteps
|
resolution = minwavelength / resolvedsteps
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@@ -177,7 +177,7 @@ class PeplinskiSoil(object):
|
|||||||
f = 1.3e9
|
f = 1.3e9
|
||||||
w = 2 * np.pi * f
|
w = 2 * np.pi * f
|
||||||
erealw = Material.watereri + ((Material.waterdeltaer) / (1 + (w * Material.watertau)**2))
|
erealw = Material.watereri + ((Material.waterdeltaer) / (1 + (w * Material.watertau)**2))
|
||||||
eimagw = w * Material.watertau * ((Material.waterdeltaer) / (1 + (w * Material.watertau)**2))
|
# eimagw = w * Material.watertau * ((Material.waterdeltaer) / (1 + (w * Material.watertau)**2))
|
||||||
|
|
||||||
a = 0.65 # Experimentally derived constant
|
a = 0.65 # Experimentally derived constant
|
||||||
es = (1.01 + 0.44 * self.rs)**2 - 0.062
|
es = (1.01 + 0.44 * self.rs)**2 - 0.062
|
||||||
@@ -187,7 +187,7 @@ class PeplinskiSoil(object):
|
|||||||
# For frequencies in the range 0.3GHz to 1.3GHz
|
# For frequencies in the range 0.3GHz to 1.3GHz
|
||||||
sigf1 = 0.0467 + 0.2204 * self.rb - 0.411 * self.S + 0.6614 * self.C
|
sigf1 = 0.0467 + 0.2204 * self.rb - 0.411 * self.S + 0.6614 * self.C
|
||||||
# For frequencies in the range 1.4GHz to 18GHz
|
# For frequencies in the range 1.4GHz to 18GHz
|
||||||
sigf2 = -1.645 + 1.939 * self.rb - 2.25622 * self.S + 1.594 * self.C
|
# sigf2 = -1.645 + 1.939 * self.rb - 2.25622 * self.S + 1.594 * self.C
|
||||||
|
|
||||||
# Generate a set of bins based on the given volumetric water fraction values
|
# Generate a set of bins based on the given volumetric water fraction values
|
||||||
mubins = np.linspace(self.mu[0], self.mu[1], nbins + 1)
|
mubins = np.linspace(self.mu[0], self.mu[1], nbins + 1)
|
||||||
|
@@ -279,7 +279,7 @@ def write_output_file(filename, grid, res):
|
|||||||
|
|
||||||
|
|
||||||
def write_xml_doc(options):
|
def write_xml_doc(options):
|
||||||
#write xml to file
|
# write xml to file
|
||||||
with open(options['filename'] + '.xdmf', 'wb') as xdmf_f:
|
with open(options['filename'] + '.xdmf', 'wb') as xdmf_f:
|
||||||
xdmf_f.write(options['xml_doc'])
|
xdmf_f.write(options['xml_doc'])
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户