你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 20:46:52 +08:00
Updates to progress bars.
这个提交包含在:
@@ -344,7 +344,7 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
|||||||
|
|
||||||
# Build the model, i.e. set the material properties (ID) for every edge of every Yee cell
|
# Build the model, i.e. set the material properties (ID) for every edge of every Yee cell
|
||||||
print()
|
print()
|
||||||
pbar = tqdm(total=2, desc='Building FDTD grid', ncols=get_terminal_size()[0])
|
pbar = tqdm(total=2, desc='Building FDTD grid', ncols=get_terminal_size()[0], bar_format='{desc:30}{percentage:3.0f}%|{bar}{r_bar}')
|
||||||
build_electric_components(G.solid, G.rigidE, G.ID, G)
|
build_electric_components(G.solid, G.rigidE, G.ID, G)
|
||||||
pbar.update()
|
pbar.update()
|
||||||
build_magnetic_components(G.solid, G.rigidH, G.ID, G)
|
build_magnetic_components(G.solid, G.rigidH, G.ID, G)
|
||||||
@@ -377,7 +377,8 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
|||||||
|
|
||||||
# If geometry information to be reused between model runs
|
# If geometry information to be reused between model runs
|
||||||
else:
|
else:
|
||||||
print('{}\nInput not re-processed.'.format('-' * get_terminal_size()[0]))
|
inputfilestr = '\nInput file not re-processed'
|
||||||
|
print(Fore.GREEN + '{} {}\n'.format(inputfilestr, '-' * (get_terminal_size()[0] - len(inputfilestr))))
|
||||||
|
|
||||||
# Clear arrays for field components
|
# Clear arrays for field components
|
||||||
G.initialise_field_arrays()
|
G.initialise_field_arrays()
|
||||||
@@ -409,7 +410,7 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
|||||||
raise GeneralError('No geometry views found.')
|
raise GeneralError('No geometry views found.')
|
||||||
elif G.geometryviews:
|
elif G.geometryviews:
|
||||||
print()
|
print()
|
||||||
for geometryview in tqdm(G.geometryviews, desc='Writing geometry file(s)', unit='file', ncols=get_terminal_size()[0]):
|
for geometryview in tqdm(G.geometryviews, desc='Writing geometry file(s)', unit='files', ncols=get_terminal_size()[0], bar_format='{desc:30}{percentage:3.0f}%|{bar}{r_bar}'):
|
||||||
geometryview.write_vtk(modelrun, numbermodelruns, G)
|
geometryview.write_vtk(modelrun, numbermodelruns, G)
|
||||||
# geometryview.write_xdmf(modelrun, numbermodelruns, G)
|
# geometryview.write_xdmf(modelrun, numbermodelruns, G)
|
||||||
|
|
||||||
@@ -436,7 +437,7 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
|||||||
# Absolute time
|
# Absolute time
|
||||||
abstime = 0
|
abstime = 0
|
||||||
|
|
||||||
for timestep in tqdm(range(G.iterations), desc='Running simulation, model ' + str(modelrun) + ' of ' + str(numbermodelruns), ncols=get_terminal_size()[0]):
|
for timestep in tqdm(range(G.iterations), desc='Running model ' + str(modelrun) + ' of ' + str(numbermodelruns), ncols=get_terminal_size()[0], bar_format='{desc:30}{percentage:3.0f}%|{bar}{r_bar}'):
|
||||||
# Store field component values for every receiver and transmission line
|
# Store field component values for every receiver and transmission line
|
||||||
store_outputs(timestep, G.Ex, G.Ey, G.Ez, G.Hx, G.Hy, G.Hz, G)
|
store_outputs(timestep, G.Ex, G.Ey, G.Ez, G.Hx, G.Hy, G.Hz, G)
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ def process_geometrycmds(geometry, G):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
for object in tqdm(geometry, desc='Processing geometry objects', unit='cmds', ncols=get_terminal_size()[0]):
|
for object in tqdm(geometry, desc='Processing geometry cmds', unit='cmds', ncols=get_terminal_size()[0], bar_format='{desc:30}{percentage:3.0f}%|{bar}{r_bar}'):
|
||||||
tmp = object.split()
|
tmp = object.split()
|
||||||
|
|
||||||
if tmp[0] == '#geometry_objects_file:':
|
if tmp[0] == '#geometry_objects_file:':
|
||||||
|
在新工单中引用
屏蔽一个用户