你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
flake8 code cleanups.
这个提交包含在:
@@ -79,7 +79,7 @@ class FDTDGrid(Grid):
|
||||
self.messages = True
|
||||
self.tqdmdisable = False
|
||||
|
||||
# Threshold (dB) down from maximum power (0dB) of main frequency used to calculate highest frequency for disperion analysis
|
||||
# Threshold (dB) down from maximum power (0dB) of main frequency used to calculate highest frequency for disperion analysis
|
||||
self.highestfreqthres = 60
|
||||
# Maximum allowable percentage physical phase-velocity phase error
|
||||
self.maxnumericaldisp = 2
|
||||
|
@@ -277,7 +277,6 @@ def edge(xs, ys, zs, xf, yf, zf, material, rotate90origin=()):
|
||||
polarisation = 'x '
|
||||
xs, ys, xf, yf = rotate90_edge(xs, ys, xf, yf, polarisation, rotate90origin)
|
||||
|
||||
|
||||
s = Coordinate(xs, ys, zs)
|
||||
f = Coordinate(xf, yf, zf)
|
||||
command('edge', s, f, material)
|
||||
|
@@ -181,23 +181,23 @@ def process_materials(G):
|
||||
materialtext.append('{:g}'.format(material.se))
|
||||
if Material.maxpoles > 0:
|
||||
if 'debye' in material.type:
|
||||
materialtext.append(', '.join('{:g}'.format(deltaer) for deltaer in material.deltaer))
|
||||
materialtext.append(', '.join('{:g}'.format(tau) for tau in material.tau))
|
||||
materialtext.append(', '.join('{:g}'.format(deltaer for deltaer in material.deltaer)))
|
||||
materialtext.append(', '.join('{:g}'.format(tau for tau in material.tau)))
|
||||
materialtext.append('')
|
||||
materialtext.append('')
|
||||
materialtext.append('')
|
||||
elif 'lorentz' in material.type:
|
||||
materialtext.append(', '.join('{:g}'.format(deltaer) for deltaer in material.deltaer))
|
||||
materialtext.append(', '.join('{:g}'.format(deltaer for deltaer in material.deltaer)))
|
||||
materialtext.append('')
|
||||
materialtext.append(', '.join('{:g}'.format(tau) for tau in material.tau))
|
||||
materialtext.append(', '.join('{:g}'.format(alpha) for alpha in material.alpha))
|
||||
materialtext.append(', '.join('{:g}'.format(tau for tau in material.tau)))
|
||||
materialtext.append(', '.join('{:g}'.format(alpha for alpha in material.alpha)))
|
||||
materialtext.append('')
|
||||
elif 'drude' in material.type:
|
||||
materialtext.append('')
|
||||
materialtext.append('')
|
||||
materialtext.append(', '.join('{:g}'.format(tau) for tau in material.tau))
|
||||
materialtext.append(', '.join('{:g}'.format(tau for tau in material.tau)))
|
||||
materialtext.append('')
|
||||
materialtext.append(', '.join('{:g}'.format(alpha) for tau in material.alpha))
|
||||
materialtext.append(', '.join('{:g}'.format(alpha for alpha in material.alpha)))
|
||||
else:
|
||||
materialtext.append('')
|
||||
materialtext.append('')
|
||||
|
@@ -433,25 +433,14 @@ class PlaneWave(Source):
|
||||
self.psi = np.deg2rad(self.psi)
|
||||
|
||||
# Components of incident unit wavevector
|
||||
self.kx = np.sin(theta) * np.cos(phi)
|
||||
self.ky = np.sin(theta) * np.sin(phi)
|
||||
self.kz = np.cos(theta)
|
||||
self.kx = np.sin(self.theta) * np.cos(self.phi)
|
||||
self.ky = np.sin(self.theta) * np.sin(self.phi)
|
||||
self.kz = np.cos(self.theta)
|
||||
|
||||
# Components of incident field vectors
|
||||
self.Exinc = np.cos(psi) * np.sin(phi) - np.sin(psi) * np.cos(theta) * np.cos(phi)
|
||||
self.Eyinc = -np.cos(psi) * np.cos(phi) - np.sin(psi) * np.cos(theta) * np.sin(phi)
|
||||
self.Ezinc = np.sin(psi) * np.sin(theta)
|
||||
self.Hxinc = np.sin(psi) * np.sin(phi) + np.cos(psi) * np.cos(theta) * np.cos(phi)
|
||||
self.Hyinc = -np.sin(psi) * np.cos(phi) + np.cos(psi) * np.cos(theta) * np.sin(phi)
|
||||
self.Hzinc = -np.cos(psi) * np.sin(theta)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
self.Exinc = np.cos(self.psi) * np.sin(self.phi) - np.sin(self.psi) * np.cos(self.theta) * np.cos(self.phi)
|
||||
self.Eyinc = -np.cos(self.psi) * np.cos(self.phi) - np.sin(self.psi) * np.cos(self.theta) * np.sin(self.phi)
|
||||
self.Ezinc = np.sin(self.psi) * np.sin(self.theta)
|
||||
self.Hxinc = np.sin(self.psi) * np.sin(self.phi) + np.cos(self.psi) * np.cos(self.theta) * np.cos(self.phi)
|
||||
self.Hyinc = -np.sin(self.psi) * np.cos(self.phi) + np.cos(self.psi) * np.cos(self.theta) * np.sin(self.phi)
|
||||
self.Hzinc = -np.cos(self.psi) * np.sin(self.theta)
|
||||
|
在新工单中引用
屏蔽一个用户