你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Variable name change - 'modelrun' to 'currentmodelrun'.
这个提交包含在:
@@ -118,12 +118,12 @@ def process_python_include_code(inputfile, usernamespace):
|
|||||||
return processedlines
|
return processedlines
|
||||||
|
|
||||||
|
|
||||||
def write_processed_file(inputfilename, modelrun, numbermodelruns, processedlines):
|
def write_processed_file(inputfilename, currentmodelrun, numbermodelruns, processedlines):
|
||||||
"""Writes an input file after any Python code and include commands in the original input file have been processed.
|
"""Writes an input file after any Python code and include commands in the original input file have been processed.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
inputfilename (str): Name of the input file to open.
|
inputfilename (str): Name of the input file to open.
|
||||||
modelrun (int): Current model run number.
|
currentmodelrun (int): Current model run number.
|
||||||
numbermodelruns (int): Total number of model runs.
|
numbermodelruns (int): Total number of model runs.
|
||||||
processedlines (list): Input commands after after processing any Python code and include commands.
|
processedlines (list): Input commands after after processing any Python code and include commands.
|
||||||
"""
|
"""
|
||||||
@@ -131,7 +131,7 @@ def write_processed_file(inputfilename, modelrun, numbermodelruns, processedline
|
|||||||
if numbermodelruns == 1:
|
if numbermodelruns == 1:
|
||||||
processedfile = os.path.splitext(inputfilename)[0] + '_processed.in'
|
processedfile = os.path.splitext(inputfilename)[0] + '_processed.in'
|
||||||
else:
|
else:
|
||||||
processedfile = os.path.splitext(inputfilename)[0] + str(modelrun) + '_processed.in'
|
processedfile = os.path.splitext(inputfilename)[0] + str(currentmodelrun) + '_processed.in'
|
||||||
|
|
||||||
with open(processedfile, 'w') as f:
|
with open(processedfile, 'w') as f:
|
||||||
for item in processedlines:
|
for item in processedlines:
|
||||||
|
在新工单中引用
屏蔽一个用户