你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Moved global autotranslate to an arg.
这个提交包含在:
@@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import logging
|
||||||
from string import Template
|
from string import Template
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -23,6 +24,8 @@ import h5py
|
|||||||
|
|
||||||
from ._version import __version__
|
from ._version import __version__
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def store_outputs(G):
|
def store_outputs(G):
|
||||||
"""Stores field component values for every receiver and transmission line.
|
"""Stores field component values for every receiver and transmission line.
|
||||||
@@ -109,6 +112,7 @@ def write_hdf5_main_grid_outputfile(outputfile, G):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
write_data(outputfile, G)
|
write_data(outputfile, G)
|
||||||
|
log.info(f'Written output file: {outputfile.name}')
|
||||||
|
|
||||||
|
|
||||||
def write_hdf5_sub_grid_outputfile(outputfile, G):
|
def write_hdf5_sub_grid_outputfile(outputfile, G):
|
||||||
@@ -138,6 +142,7 @@ def write_hdf5_sub_grid_outputfile(outputfile, G):
|
|||||||
f.attrs['ratio'] = sg.ratio
|
f.attrs['ratio'] = sg.ratio
|
||||||
f.attrs['interpolation'] = sg.interpolation
|
f.attrs['interpolation'] = sg.interpolation
|
||||||
|
|
||||||
|
log.info(f'Written output file: {fp.name}')
|
||||||
|
|
||||||
def write_data(outputfile, G):
|
def write_data(outputfile, G):
|
||||||
"""Write an output file in HDF5 format.
|
"""Write an output file in HDF5 format.
|
||||||
|
@@ -305,7 +305,7 @@ class ModelBuildRun:
|
|||||||
|
|
||||||
# Prepare iterator
|
# Prepare iterator
|
||||||
if config.sim_config.is_messages():
|
if config.sim_config.is_messages():
|
||||||
iterator = tqdm(range(self.G.iterations), desc=f'Running model {self.G.model_num + 1}/{config.sim_config.model_end}, {config.model_configs[self.G.model_num].output_file_path_ext.name}', ncols=get_terminal_width() - 1, file=sys.stdout, disable=not config.sim_config.general['progressbars'])
|
iterator = tqdm(range(self.G.iterations), desc=f'Running model {self.G.model_num + 1}/{config.sim_config.model_end}', ncols=get_terminal_width() - 1, file=sys.stdout, disable=not config.sim_config.general['progressbars'])
|
||||||
else:
|
else:
|
||||||
iterator = range(self.G.iterations)
|
iterator = range(self.G.iterations)
|
||||||
|
|
||||||
|
@@ -46,10 +46,10 @@ def create_user_input_points(grid, user_obj):
|
|||||||
if isinstance(grid, SubGridBase):
|
if isinstance(grid, SubGridBase):
|
||||||
# Local object configuration trumps. User can turn of autotranslate for
|
# Local object configuration trumps. User can turn of autotranslate for
|
||||||
# specfic objects.
|
# specfic objects.
|
||||||
if not user_obj.autotranslate and config.sim_config.general['autotranslate']:
|
if not user_obj.autotranslate and config.sim_config.args.autotranslate:
|
||||||
return MainGridUserInput(grid)
|
return MainGridUserInput(grid)
|
||||||
|
|
||||||
if config.sim_config.general['autotranslate']:
|
if config.sim_config.args.autotranslate:
|
||||||
return SubgridUserInput(grid)
|
return SubgridUserInput(grid)
|
||||||
else:
|
else:
|
||||||
return MainGridUserInput(grid)
|
return MainGridUserInput(grid)
|
||||||
|
在新工单中引用
屏蔽一个用户