你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Improved joining of filenames and directory paths.
这个提交包含在:
@@ -68,9 +68,9 @@ class GeometryView:
|
||||
|
||||
# Construct filename from user-supplied name and model run number
|
||||
if numbermodelruns == 1:
|
||||
self.filename = G.inputdirectory + self.filename
|
||||
self.filename = os.path.abspath(os.path.join(G.inputdirectory, self.filename))
|
||||
else:
|
||||
self.filename = G.inputdirectory + self.filename + str(modelrun)
|
||||
self.filename = os.path.abspath(os.path.join(G.inputdirectory, self.filename + str(modelrun)))
|
||||
|
||||
if self.type == 'n':
|
||||
self.filename += '.vti'
|
||||
|
@@ -57,8 +57,8 @@ def main():
|
||||
parser.add_argument('--opt-taguchi', action='store_true', default=False, help='optimise parameters using the Taguchi optimisation method')
|
||||
args = parser.parse_args()
|
||||
numbermodelruns = args.n
|
||||
inputdirectory = os.path.dirname(os.path.abspath(args.inputfile)) + os.sep
|
||||
inputfile = inputdirectory + os.path.basename(args.inputfile)
|
||||
inputdirectory = os.path.dirname(os.path.abspath(args.inputfile))
|
||||
inputfile = os.path.abspath(os.path.join(inputdirectory, os.path.basename(args.inputfile)))
|
||||
|
||||
# Create a separate namespace that users can access in any Python code blocks in the input file
|
||||
usernamespace = {'c': c, 'e0': e0, 'm0': m0, 'z0': z0, 'number_model_runs': numbermodelruns, 'inputdirectory': inputdirectory}
|
||||
|
@@ -85,7 +85,7 @@ class Snapshot:
|
||||
|
||||
if not os.path.exists(snapshotdir):
|
||||
os.mkdir(snapshotdir)
|
||||
self.filename = os.path.join(snapshotdir, self.filename + '.vti')
|
||||
self.filename = os.path.abspath(os.path.join(snapshotdir, self.filename + '.vti'))
|
||||
|
||||
# Calculate number of cells according to requested sampling
|
||||
self.vtk_xscells = round_value(self.xs / self.dx)
|
||||
|
在新工单中引用
屏蔽一个用户