你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Refactor TimeStepStabilityFactor UserObject
这个提交包含在:
@@ -188,7 +188,7 @@ class TimeStepStabilityFactor(UserObjectSingle):
|
||||
super().__init__(**kwargs)
|
||||
self.order = 4
|
||||
|
||||
def build(self, G, uip):
|
||||
def build(self, model, uip):
|
||||
try:
|
||||
f = self.kwargs["f"]
|
||||
except KeyError:
|
||||
@@ -202,6 +202,7 @@ class TimeStepStabilityFactor(UserObjectSingle):
|
||||
)
|
||||
raise ValueError
|
||||
|
||||
G = model.G
|
||||
G.dt_mod = f
|
||||
G.dt = G.dt * G.dt_mod
|
||||
|
||||
@@ -220,7 +221,7 @@ class TimeWindow(UserObjectSingle):
|
||||
super().__init__(**kwargs)
|
||||
self.order = 5
|
||||
|
||||
def build(self, G, uip):
|
||||
def build(self, model, uip):
|
||||
# If number of iterations given
|
||||
# The +/- 1 used in calculating the number of iterations is to account for
|
||||
# the fact that the solver (iterations) loop runs from 0 to < G.iterations
|
||||
|
@@ -61,7 +61,8 @@ class FDTDGrid:
|
||||
self.dz = 0.0
|
||||
self.dl: np.ndarray
|
||||
self.dt = 0.0
|
||||
self.dt_mod = None # Time step stability factor
|
||||
|
||||
self.dt_mod = 1.0 # Time step stability factor
|
||||
self.iteration = 0 # Current iteration number
|
||||
self.iterations = 0 # Total number of iterations
|
||||
self.timewindow = 0
|
||||
|
在新工单中引用
屏蔽一个用户