你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
More message printing tweaks.
这个提交包含在:
@@ -153,7 +153,7 @@ def run_std_sim(args, numbermodelruns, inputfile, usernamespace, optparams=None)
|
|||||||
modelusernamespace = usernamespace
|
modelusernamespace = usernamespace
|
||||||
run_model(args, modelrun, numbermodelruns, inputfile, modelusernamespace)
|
run_model(args, modelrun, numbermodelruns, inputfile, modelusernamespace)
|
||||||
tsimend = perf_counter()
|
tsimend = perf_counter()
|
||||||
simcompletestr = '\n== Simulation completed in [HH:MM:SS]: {}'.format(datetime.timedelta(seconds=int(tsimend - tsimstart)))
|
simcompletestr = '\n=== Simulation completed in [HH:MM:SS]: {}'.format(datetime.timedelta(seconds=int(tsimend - tsimstart)))
|
||||||
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
||||||
|
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ def run_benchmark_sim(args, inputfile, usernamespace):
|
|||||||
threads = np.array(threads)
|
threads = np.array(threads)
|
||||||
np.savez(os.path.splitext(inputfile)[0], threads=threads, benchtimes=benchtimes, version=__version__)
|
np.savez(os.path.splitext(inputfile)[0], threads=threads, benchtimes=benchtimes, version=__version__)
|
||||||
|
|
||||||
simcompletestr = '\n== Simulation completed'
|
simcompletestr = '\n=== Simulation completed'
|
||||||
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
||||||
|
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ def run_mpi_sim(args, numbermodelruns, inputfile, usernamespace, optparams=None)
|
|||||||
comm.send(None, dest=0, tag=tags.EXIT.value)
|
comm.send(None, dest=0, tag=tags.EXIT.value)
|
||||||
|
|
||||||
tsimend = perf_counter()
|
tsimend = perf_counter()
|
||||||
simcompletestr = '\n== Simulation completed in [HH:MM:SS]: {}'.format(datetime.timedelta(seconds=int(tsimend - tsimstart)))
|
simcompletestr = '\n=== Simulation completed in [HH:MM:SS]: {}'.format(datetime.timedelta(seconds=int(tsimend - tsimstart)))
|
||||||
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
print('{} {}\n'.format(simcompletestr, '=' * (get_terminal_size()[0] - 1 - len(simcompletestr))))
|
||||||
|
|
||||||
|
|
||||||
@@ -292,12 +292,12 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
|||||||
|
|
||||||
# Normal model reading/building process; bypassed if geometry information to be reused
|
# Normal model reading/building process; bypassed if geometry information to be reused
|
||||||
if 'G' not in globals():
|
if 'G' not in globals():
|
||||||
inputfilestr = '\nModel {} of {}, input file: {}'.format(modelrun, numbermodelruns, inputfile)
|
inputfilestr = '\n--- Model {} of {}, input file: {}'.format(modelrun, numbermodelruns, inputfile)
|
||||||
print(Fore.GREEN + '{} {}\n'.format(inputfilestr, '-' * (get_terminal_size()[0] - 1 - len(inputfilestr))))
|
print(Fore.GREEN + '{} {}\n'.format(inputfilestr, '-' * (get_terminal_size()[0] - 1 - len(inputfilestr))) + Style.RESET_ALL)
|
||||||
|
|
||||||
# Add the current model run to namespace that can be accessed by user in any Python code blocks in input file
|
# Add the current model run to namespace that can be accessed by user in any Python code blocks in input file
|
||||||
usernamespace['current_model_run'] = modelrun
|
usernamespace['current_model_run'] = modelrun
|
||||||
print(Style.RESET_ALL + 'Constants/variables available for Python scripting: {}\n'.format(usernamespace))
|
print('Constants/variables available for Python scripting: {}\n'.format(usernamespace))
|
||||||
|
|
||||||
# Read input file and process any Python or include commands
|
# Read input file and process any Python or include commands
|
||||||
processedlines = process_python_include_code(inputfile, usernamespace)
|
processedlines = process_python_include_code(inputfile, usernamespace)
|
||||||
|
@@ -34,7 +34,7 @@ def logo(version):
|
|||||||
version (str): Version number.
|
version (str): Version number.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
description = 'Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method'
|
description = '\n=== Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method'
|
||||||
copyright = 'Copyright (C) 2015-2016: The University of Edinburgh'
|
copyright = 'Copyright (C) 2015-2016: The University of Edinburgh'
|
||||||
authors = 'Authors: Craig Warren and Antonis Giannopoulos'
|
authors = 'Authors: Craig Warren and Antonis Giannopoulos'
|
||||||
licenseinfo1 = 'gprMax is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n'
|
licenseinfo1 = 'gprMax is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n'
|
||||||
@@ -49,7 +49,7 @@ def logo(version):
|
|||||||
|___/|_|
|
|___/|_|
|
||||||
v""" + version
|
v""" + version
|
||||||
|
|
||||||
print('\n== {} {}\n'.format(description, '=' * (get_terminal_size()[0] - (len(description)) - 4)))
|
print('{} {}\n'.format(description, '=' * (get_terminal_size()[0] - len(description) - 1)))
|
||||||
print(Fore.CYAN + '{}\n'.format(logo))
|
print(Fore.CYAN + '{}\n'.format(logo))
|
||||||
print(Style.RESET_ALL + textwrap.fill(copyright, width=get_terminal_size()[0], initial_indent=' '))
|
print(Style.RESET_ALL + textwrap.fill(copyright, width=get_terminal_size()[0], initial_indent=' '))
|
||||||
print(textwrap.fill(authors, width=get_terminal_size()[0], initial_indent=' '))
|
print(textwrap.fill(authors, width=get_terminal_size()[0], initial_indent=' '))
|
||||||
|
在新工单中引用
屏蔽一个用户