你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
reset fields methods
这个提交包含在:
@@ -260,6 +260,15 @@ class FDTDGrid(Grid):
|
|||||||
G.ID[1, :, :, 0] = 0
|
G.ID[1, :, :, 0] = 0
|
||||||
G.ID[1, :, :, 1] = 0
|
G.ID[1, :, :, 1] = 0
|
||||||
|
|
||||||
|
|
||||||
|
def reset_fields(self):
|
||||||
|
# Clear arrays for field components
|
||||||
|
G.initialise_field_arrays()
|
||||||
|
|
||||||
|
# Clear arrays for fields in PML
|
||||||
|
for pml in G.pmls:
|
||||||
|
pml.initialise_field_arrays()
|
||||||
|
|
||||||
def dispersion_analysis(G):
|
def dispersion_analysis(G):
|
||||||
"""
|
"""
|
||||||
Analysis of numerical dispersion (Taflove et al, 2005, p112) -
|
Analysis of numerical dispersion (Taflove et al, 2005, p112) -
|
||||||
|
@@ -204,13 +204,8 @@ class ModelBuildRun:
|
|||||||
printer = Printer(model_config)
|
printer = Printer(model_config)
|
||||||
inputfilestr = '\n--- Model {}/{}, input file (not re-processed, i.e. geometry fixed): {}'.format(currentmodelrun, modelend, model_config.input_file_path)
|
inputfilestr = '\n--- Model {}/{}, input file (not re-processed, i.e. geometry fixed): {}'.format(currentmodelrun, modelend, model_config.input_file_path)
|
||||||
printer.print(Fore.GREEN + '{} {}\n'.format(model_config.inputfilestr, '-' * (get_terminal_width() - 1 - len(model_config.inputfilestr))) + Style.RESET_ALL)
|
printer.print(Fore.GREEN + '{} {}\n'.format(model_config.inputfilestr, '-' * (get_terminal_width() - 1 - len(model_config.inputfilestr))) + Style.RESET_ALL)
|
||||||
|
self.G.reset_fields()
|
||||||
|
|
||||||
# Clear arrays for field components
|
|
||||||
G.initialise_field_arrays()
|
|
||||||
|
|
||||||
# Clear arrays for fields in PML
|
|
||||||
for pml in G.pmls:
|
|
||||||
pml.initialise_field_arrays()
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
"""Runs a model - processes the input file; builds the Yee cells; calculates update coefficients; runs main FDTD loop.
|
"""Runs a model - processes the input file; builds the Yee cells; calculates update coefficients; runs main FDTD loop.
|
||||||
|
在新工单中引用
屏蔽一个用户