你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Cleaned up some code formatting.
这个提交包含在:
@@ -39,6 +39,7 @@ class GeometryView:
|
||||
filename (str): Filename to save to.
|
||||
type (str): Either 'n' for a per cell geometry view, or 'f' for a per cell edge geometry view.
|
||||
"""
|
||||
|
||||
self.xs = xs
|
||||
self.ys = ys
|
||||
self.zs = zs
|
||||
|
@@ -49,6 +49,7 @@ class Material():
|
||||
ID (str): Name of the material.
|
||||
G (class): Grid class instance - holds essential parameters describing the model.
|
||||
"""
|
||||
|
||||
self.numID = numID
|
||||
self.ID = ID
|
||||
self.type = 'standard'
|
||||
@@ -73,6 +74,7 @@ class Material():
|
||||
Args:
|
||||
G (class): Grid class instance - holds essential parameters describing the model.
|
||||
"""
|
||||
|
||||
HA = (m0*self.mr / G.dt) + 0.5*self.sm
|
||||
HB = (m0*self.mr / G.dt) - 0.5*self.sm
|
||||
self.DA = HB / HA
|
||||
@@ -155,6 +157,7 @@ class PeplinskiSoil():
|
||||
sandpartdensity (float): Density of the sand particles in the soil (g/cm3).
|
||||
watervolfraction (float): Two numbers that specify a range for the volumetric water fraction of the soil.
|
||||
"""
|
||||
|
||||
self.ID = ID
|
||||
self.S = sandfraction
|
||||
self.C = clayfraction
|
||||
|
@@ -40,6 +40,7 @@ class CFS():
|
||||
sigmamin (float): Minimum value for sigma parameter.
|
||||
sigmamax (float): Maximum value for sigma parameter.
|
||||
"""
|
||||
|
||||
self.alphascaling = alphascaling
|
||||
self.alphamin = alphamin
|
||||
self.alphamax = alphamax
|
||||
@@ -59,6 +60,7 @@ class CFS():
|
||||
mr (float): Average permeability of underlying material.
|
||||
G (class): Grid class instance - holds essential parameters describing the model.
|
||||
"""
|
||||
|
||||
# Get general direction from first letter of PML direction
|
||||
if direction[0] == 'x':
|
||||
d = G.dx
|
||||
@@ -84,6 +86,7 @@ class CFS():
|
||||
Evalues (float): numpy array holding scaling value for electric PML update.
|
||||
Hvalues (float): numpy array holding scaling value for magnetic PML update.
|
||||
"""
|
||||
|
||||
tmp = max * ((np.linspace(0, (len(Evalues) - 1) + 0.5, num=2*len(Evalues))) / (len(Evalues) - 1)) ** order
|
||||
Evalues = tmp[0:-1:2]
|
||||
Hvalues = tmp[1::2]
|
||||
@@ -103,6 +106,7 @@ class CFS():
|
||||
Evalues (float): numpy array holding scaling value for electric PML update.
|
||||
Hvalues (float): numpy array holding scaling value for magnetic PML update.
|
||||
"""
|
||||
|
||||
if scaling == 'constant':
|
||||
Evalues += max
|
||||
Hvalues += max
|
||||
@@ -126,6 +130,7 @@ class PML():
|
||||
xs, xf, ys, yf, zs, zf (float): Extent of the PML volume.
|
||||
cfs (list): CFS class instances associated with the PML.
|
||||
"""
|
||||
|
||||
self.direction = direction
|
||||
self.xs = xs
|
||||
self.xf = xf
|
||||
@@ -270,7 +275,7 @@ def build_pml(G):
|
||||
def calculate_initial_pml_params(G):
|
||||
""" This function calculates the initial parameters and coefficients for PML including setting scaling
|
||||
(based on underlying material er and mr from solid array).
|
||||
"""
|
||||
"""
|
||||
|
||||
for pml in G.pmls:
|
||||
sumer = 0
|
||||
|
@@ -28,6 +28,7 @@ class Rx:
|
||||
positiony (float): y-coordinate of location in model.
|
||||
positionz (float): z-coordinate of location in model.
|
||||
"""
|
||||
|
||||
self.ID = None
|
||||
self.outputs = []
|
||||
self.positionx = positionx
|
||||
|
@@ -49,6 +49,7 @@ class Snapshot:
|
||||
time (int): Iteration number to take the snapshot on.
|
||||
filename (str): Filename to save to.
|
||||
"""
|
||||
|
||||
self.xs = xs
|
||||
self.ys = ys
|
||||
self.zs = zs
|
||||
|
在新工单中引用
屏蔽一个用户