你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Allow user to specify output data file
这个提交包含在:
@@ -168,16 +168,12 @@ class ModelConfig:
|
|||||||
outputdir: string of output file directory given by input file command.
|
outputdir: string of output file directory given by input file command.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not outputdir:
|
if outputdir is not None:
|
||||||
try:
|
|
||||||
self.output_file_path = Path(self.args.outputfile)
|
|
||||||
except AttributeError:
|
|
||||||
self.output_file_path = sim_config.input_file_path.with_suffix("")
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
Path(outputdir).mkdir(exist_ok=True)
|
Path(outputdir).mkdir(exist_ok=True)
|
||||||
self.output_file_path = Path(outputdir, sim_config.input_file_path.stem)
|
self.output_file_path = Path(outputdir, sim_config.input_file_path.stem)
|
||||||
except AttributeError:
|
elif sim_config.args.outputfile is not None:
|
||||||
|
self.output_file_path = Path(sim_config.args.outputfile).with_suffix("")
|
||||||
|
else:
|
||||||
self.output_file_path = sim_config.input_file_path.with_suffix("")
|
self.output_file_path = sim_config.input_file_path.with_suffix("")
|
||||||
|
|
||||||
parts = self.output_file_path.parts
|
parts = self.output_file_path.parts
|
||||||
|
@@ -165,6 +165,7 @@ def cli():
|
|||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser = argparse.ArgumentParser(prog="gprMax", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
parser = argparse.ArgumentParser(prog="gprMax", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
parser.add_argument("inputfile", help=help_msg["inputfile"])
|
parser.add_argument("inputfile", help=help_msg["inputfile"])
|
||||||
|
parser.add_argument("-outputfile", "-o", help=help_msg["outputfile"])
|
||||||
parser.add_argument("-n", default=args_defaults["n"], type=int, help=help_msg["n"])
|
parser.add_argument("-n", default=args_defaults["n"], type=int, help=help_msg["n"])
|
||||||
parser.add_argument("-i", type=int, help=help_msg["i"])
|
parser.add_argument("-i", type=int, help=help_msg["i"])
|
||||||
parser.add_argument("-mpi", action="store_true", default=args_defaults["mpi"], help=help_msg["mpi"])
|
parser.add_argument("-mpi", action="store_true", default=args_defaults["mpi"], help=help_msg["mpi"])
|
||||||
|
在新工单中引用
屏蔽一个用户