你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Changed rounding method (to ceil) used to calculate number of iterations. Now guarantees simulation will run beyond specified time window.
这个提交包含在:
@@ -187,6 +187,8 @@ def process_singlecmds(singlecmds, G):
|
|||||||
tmp = tmp[0].lower()
|
tmp = tmp[0].lower()
|
||||||
|
|
||||||
# If number of iterations given
|
# 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
|
||||||
try:
|
try:
|
||||||
tmp = int(tmp)
|
tmp = int(tmp)
|
||||||
G.timewindow = (tmp - 1) * G.dt
|
G.timewindow = (tmp - 1) * G.dt
|
||||||
@@ -196,7 +198,7 @@ def process_singlecmds(singlecmds, G):
|
|||||||
tmp = float(tmp)
|
tmp = float(tmp)
|
||||||
if tmp > 0:
|
if tmp > 0:
|
||||||
G.timewindow = tmp
|
G.timewindow = tmp
|
||||||
G.iterations = round_value((tmp / G.dt)) + 1
|
G.iterations = int(np.ceil(tmp / G.dt)) + 1
|
||||||
else:
|
else:
|
||||||
raise CmdInputError(cmd + ' must have a value greater than zero')
|
raise CmdInputError(cmd + ' must have a value greater than zero')
|
||||||
if G.messages:
|
if G.messages:
|
||||||
|
在新工单中引用
屏蔽一个用户