你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Fix subgrid arg for CLI
这个提交包含在:
@@ -262,8 +262,9 @@ class SimulationConfig:
|
|||||||
# Add pyopencl available device(s)
|
# Add pyopencl available device(s)
|
||||||
self.devices["devs"] = detect_opencl()
|
self.devices["devs"] = detect_opencl()
|
||||||
|
|
||||||
self.general["subgrid"] = self.args.subgrid
|
# Subgrids
|
||||||
if self.args.subgrid:
|
try:
|
||||||
|
self.general["subgrid"] = self.args.subgrid
|
||||||
# Double precision should be used with subgrid for best accuracy
|
# Double precision should be used with subgrid for best accuracy
|
||||||
self.general["precision"] = "double"
|
self.general["precision"] = "double"
|
||||||
if (self.general["subgrid"] and self.general["solver"] == "cuda") or (
|
if (self.general["subgrid"] and self.general["solver"] == "cuda") or (
|
||||||
@@ -273,6 +274,8 @@ class SimulationConfig:
|
|||||||
"You cannot currently use CUDA or OpenCL-based " "solvers with models that contain sub-grids."
|
"You cannot currently use CUDA or OpenCL-based " "solvers with models that contain sub-grids."
|
||||||
)
|
)
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
except AttributeError:
|
||||||
|
self.general["subgrid"] = False
|
||||||
|
|
||||||
# Scenes parameter may not exist if user enters via CLI
|
# Scenes parameter may not exist if user enters via CLI
|
||||||
try:
|
try:
|
||||||
|
在新工单中引用
屏蔽一个用户