你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Reformatted some code in 3 more files to make it more cleaner, and better.
这个提交包含在:
@@ -277,10 +277,7 @@ class Comments():
|
||||
"""
|
||||
|
||||
# Comments for Paraview macro
|
||||
comments = {}
|
||||
|
||||
comments['gprMax_version'] = __version__
|
||||
comments['dx_dy_dz'] = self.dx_dy_dz_comment()
|
||||
comments = {'gprMax_version': __version__, 'dx_dy_dz': self.dx_dy_dz_comment()}
|
||||
comments['nx_ny_nz'] = self.nx_ny_nz_comment()
|
||||
|
||||
# Write the name and numeric ID for each material
|
||||
|
@@ -178,14 +178,15 @@ def write_processed_file(processedlines):
|
||||
for item in processedlines:
|
||||
f.write(f'{item}')
|
||||
|
||||
logger.info(f'Written input commands, after processing any Python code and ' +
|
||||
f'include commands, to file: {processedfile}\n')
|
||||
logger.info(
|
||||
f'Written input commands, after processing any Python code and include commands, to file: {processedfile}\n'
|
||||
)
|
||||
|
||||
|
||||
def check_cmd_names(processedlines, checkessential=True):
|
||||
"""Checks the validity of commands, i.e. are they gprMax commands,
|
||||
and that all essential commands are present.
|
||||
|
||||
|
||||
Args:
|
||||
processedlines: list of input commands after Python processing.
|
||||
checkessential: boolean to check for essential commands or not.
|
||||
|
@@ -249,12 +249,13 @@ def process_materials(G):
|
||||
z += 3
|
||||
|
||||
# Construct information on material properties for printing table
|
||||
materialtext = []
|
||||
materialtext.append(str(material.numID))
|
||||
materialtext.append(material.ID[:50] if len(material.ID) > 50 else material.ID)
|
||||
materialtext.append(material.type)
|
||||
materialtext.append(f'{material.er:g}')
|
||||
materialtext.append(f'{material.se:g}')
|
||||
materialtext = [
|
||||
str(material.numID),
|
||||
material.ID[:50] if len(material.ID) > 50 else material.ID,
|
||||
material.type,
|
||||
f'{material.er:g}',
|
||||
f'{material.se:g}',
|
||||
]
|
||||
if config.get_model_config().materials['maxpoles'] > 0:
|
||||
if 'debye' in material.type:
|
||||
materialtext.append('\n'.join('{:g}'.format(deltaer) for deltaer in material.deltaer))
|
||||
@@ -274,9 +275,9 @@ def process_materials(G):
|
||||
else:
|
||||
materialtext.extend(['', '', '', '', ''])
|
||||
|
||||
materialtext.append(f'{material.mr:g}')
|
||||
materialtext.append(f'{material.sm:g}')
|
||||
materialtext.append(material.averagable)
|
||||
materialtext.extend(
|
||||
(f'{material.mr:g}', f'{material.sm:g}', material.averagable)
|
||||
)
|
||||
materialsdata.append(materialtext)
|
||||
|
||||
return materialsdata
|
||||
|
在新工单中引用
屏蔽一个用户