你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 20:46:52 +08:00
build_voxels_from_array function now uses int16 so array can contain a negative value.
这个提交包含在:
@@ -659,11 +659,12 @@ cpdef void build_sphere(int xc, int yc, int zc, float r, float dx, float dy, flo
|
||||
build_voxel(i, j, k, numID, numIDx, numIDy, numIDz, averaging, solid, rigidE, rigidH, ID)
|
||||
|
||||
|
||||
cpdef void build_voxels_from_array(int xs, int ys, int zs, np.uint16_t[:, :, ::1] data, np.uint32_t[:, :, ::1] solid, np.int8_t[:, :, :, ::1] rigidE, np.int8_t[:, :, :, ::1] rigidH, np.uint32_t[:, :, :, ::1] ID):
|
||||
cpdef void build_voxels_from_array(int xs, int ys, int zs, int numexistmaterials, np.int16_t[:, :, ::1] data, np.uint32_t[:, :, ::1] solid, np.int8_t[:, :, :, ::1] rigidE, np.int8_t[:, :, :, ::1] rigidH, np.uint32_t[:, :, :, ::1] ID):
|
||||
"""Builds Yee voxels by reading integers from an array.
|
||||
|
||||
Args:
|
||||
xs, ys, zs (int): Cell coordinates of position of start of array in domain.
|
||||
numexistmaterials (int): Number of existing materials in model prior to building voxels.
|
||||
data (memoryview): Access to array containing numeric IDs of voxels to create.
|
||||
solid, rigidE, rigidH, ID (memoryviews): Access to solid, rigid and ID arrays.
|
||||
"""
|
||||
@@ -697,5 +698,7 @@ cpdef void build_voxels_from_array(int xs, int ys, int zs, np.uint16_t[:, :, ::1
|
||||
for j in range(ys, yf):
|
||||
for k in range(zs, zf):
|
||||
numID = data[i - xs, j - ys, k - zs]
|
||||
build_voxel(i, j, k, numID, numID, numID, numID, False, solid, rigidE, rigidH, ID)
|
||||
if numID >= 0:
|
||||
numID += numexistmaterials
|
||||
build_voxel(i, j, k, numID, numID, numID, numID, False, solid, rigidE, rigidH, ID)
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户