你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 15:27:57 +08:00
Reverted logic on if not any() which is not the same as if all()
这个提交包含在:
@@ -235,7 +235,7 @@ class AddGrass(UserObjectGeometry):
|
|||||||
surface.grass.append(g)
|
surface.grass.append(g)
|
||||||
|
|
||||||
# Check to see if grass has been already defined as a material
|
# Check to see if grass has been already defined as a material
|
||||||
if all(x.ID == "grass" for x in grid.materials):
|
if not any(x.ID == "grass" for x in grid.materials):
|
||||||
create_grass(grid)
|
create_grass(grid)
|
||||||
|
|
||||||
# Check if time step for model is suitable for using grass
|
# Check if time step for model is suitable for using grass
|
||||||
|
@@ -156,7 +156,7 @@ class AddSurfaceWater(UserObjectGeometry):
|
|||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
# Check to see if water has been already defined as a material
|
# Check to see if water has been already defined as a material
|
||||||
if all(x.ID != "water" for x in grid.materials):
|
if not any(x.ID != "water" for x in grid.materials):
|
||||||
create_water(grid)
|
create_water(grid)
|
||||||
|
|
||||||
# Check if time step for model is suitable for using water
|
# Check if time step for model is suitable for using water
|
||||||
|
@@ -385,7 +385,7 @@ class HertzianDipole(UserObjectMulti):
|
|||||||
p2 = uip.round_to_grid_static_point(p1)
|
p2 = uip.round_to_grid_static_point(p1)
|
||||||
|
|
||||||
# Check if there is a waveformID in the waveforms list
|
# Check if there is a waveformID in the waveforms list
|
||||||
if all(x.ID == waveform_id for x in grid.waveforms):
|
if not any(x.ID == waveform_id for x in grid.waveforms):
|
||||||
logger.exception(f"{self.params_str()} there is no waveform " + f"with the identifier {waveform_id}.")
|
logger.exception(f"{self.params_str()} there is no waveform " + f"with the identifier {waveform_id}.")
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
@@ -526,7 +526,7 @@ class MagneticDipole(UserObjectMulti):
|
|||||||
p2 = uip.round_to_grid_static_point(p1)
|
p2 = uip.round_to_grid_static_point(p1)
|
||||||
|
|
||||||
# Check if there is a waveformID in the waveforms list
|
# Check if there is a waveformID in the waveforms list
|
||||||
if all(x.ID == waveform_id for x in grid.waveforms):
|
if not any(x.ID == waveform_id for x in grid.waveforms):
|
||||||
logger.exception(f"{self.params_str()} there is no waveform " + f"with the identifier {waveform_id}.")
|
logger.exception(f"{self.params_str()} there is no waveform " + f"with the identifier {waveform_id}.")
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户