你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
Move iterations and timewindow to FDTDGrid
Grids need to know the number of iterations and the timewindow to calculate waveform values. While waveforms are global in an MPI sense, subgrids will calculate their own waveforms based on the dt value of the subgrid.
这个提交包含在:
@@ -61,6 +61,9 @@ class FDTDGrid:
|
||||
self.dl = np.ones(3, dtype=np.float64)
|
||||
self.dt = 0.0
|
||||
|
||||
self.iterations = 0 # Total number of iterations
|
||||
self.timewindow = 0.0
|
||||
|
||||
# Field Arrays
|
||||
self.Ex: npt.NDArray[np.float32]
|
||||
self.Ey: npt.NDArray[np.float32]
|
||||
|
@@ -56,8 +56,6 @@ class Model:
|
||||
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.0
|
||||
|
||||
self.srcsteps = np.zeros(3, dtype=np.int32)
|
||||
self.rxsteps = np.zeros(3, dtype=np.int32)
|
||||
@@ -141,6 +139,22 @@ class Model:
|
||||
def dt(self, value: float):
|
||||
self.G.dt = value
|
||||
|
||||
@property
|
||||
def iterations(self) -> int:
|
||||
return self.G.iterations
|
||||
|
||||
@iterations.setter
|
||||
def iterations(self, value: int):
|
||||
self.G.iterations = value
|
||||
|
||||
@property
|
||||
def timewindow(self) -> float:
|
||||
return self.G.timewindow
|
||||
|
||||
@timewindow.setter
|
||||
def timewindow(self, value: float):
|
||||
self.G.timewindow = value
|
||||
|
||||
def _create_grid(self) -> FDTDGrid:
|
||||
"""Create grid object according to solver.
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户