你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Fix incorrect size and slice when step != 1
这个提交包含在:
@@ -366,7 +366,7 @@ class MPIGridView(GridView[MPIGrid]):
|
|||||||
self.offset = self.grid.local_to_global_coordinate(self.start) - self.global_start
|
self.offset = self.grid.local_to_global_coordinate(self.start) - self.global_start
|
||||||
|
|
||||||
# Update local size
|
# Update local size
|
||||||
self.size = self.stop - self.start
|
self.size = np.ceil((self.stop - self.start) / self.step).astype(np.int32)
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"Created MPIGridView for grid '{self.grid.name}' (global_start={self.global_start},"
|
f"Created MPIGridView for grid '{self.grid.name}' (global_start={self.global_start},"
|
||||||
@@ -446,7 +446,7 @@ class MPIGridView(GridView[MPIGrid]):
|
|||||||
# have a positive neighbour
|
# have a positive neighbour
|
||||||
size = self.size[dimension] + 1
|
size = self.size[dimension] + 1
|
||||||
|
|
||||||
offset = self.offset[dimension]
|
offset = self.offset[dimension] // self.step[dimension]
|
||||||
|
|
||||||
return slice(offset, offset + size)
|
return slice(offset, offset + size)
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户