你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 15:27:57 +08:00
Move title attribute from FDTDGrid to Model
Title should be a global attribute owned by the model, whereas each grid oir subgrid has a name. Default value for grid name remains as 'main_grid'.
这个提交包含在:
@@ -53,6 +53,8 @@ class Model:
|
||||
"""Builds and runs (solves) a model."""
|
||||
|
||||
def __init__(self):
|
||||
self.title = ""
|
||||
|
||||
self.G = self._create_grid()
|
||||
# Monitor memory usage
|
||||
self.p = None
|
||||
@@ -118,7 +120,7 @@ class Model:
|
||||
file=sys.stdout,
|
||||
disable=not config.sim_config.general["progressbars"],
|
||||
)
|
||||
go.write_hdf5(G, pbar)
|
||||
go.write_hdf5(self.title, self.G, pbar)
|
||||
pbar.close()
|
||||
logger.info("")
|
||||
|
||||
@@ -149,7 +151,9 @@ class Model:
|
||||
sg_rxs = [True for sg in self.G.subgrids if sg.rxs]
|
||||
sg_tls = [True for sg in self.G.subgrids if sg.transmissionlines]
|
||||
if self.G.rxs or sg_rxs or self.G.transmissionlines or sg_tls:
|
||||
write_hdf5_outputfile(config.get_model_config().output_file_path_ext, self.G)
|
||||
write_hdf5_outputfile(
|
||||
config.get_model_config().output_file_path_ext, self.title, self.G
|
||||
)
|
||||
|
||||
# Write any snapshots to file for each grid
|
||||
for grid in [self.G] + self.G.subgrids:
|
||||
|
在新工单中引用
屏蔽一个用户