你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Merge pull request #357 from rania-pa/devel
Small fixes on add_surface_roughness.py and knl_fields_updates.py
这个提交包含在:
@@ -154,7 +154,7 @@ class AddSurfaceRoughness(UserObjectGeometry):
|
|||||||
if zs == zf:
|
if zs == zf:
|
||||||
logger.exception(f"{self.__str__()} dimensions are not specified correctly")
|
logger.exception(f"{self.__str__()} dimensions are not specified correctly")
|
||||||
raise ValueError
|
raise ValueError
|
||||||
if ys not in [volume.ys and volume.yf]:
|
if ys not in [volume.ys, volume.yf]:
|
||||||
logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box")
|
logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box")
|
||||||
raise ValueError
|
raise ValueError
|
||||||
fractalrange = (round_value(limits[0] / grid.dy), round_value(limits[1] / grid.dy))
|
fractalrange = (round_value(limits[0] / grid.dy), round_value(limits[1] / grid.dy))
|
||||||
@@ -182,7 +182,7 @@ class AddSurfaceRoughness(UserObjectGeometry):
|
|||||||
requestedsurface = "yplus"
|
requestedsurface = "yplus"
|
||||||
|
|
||||||
elif zs == zf:
|
elif zs == zf:
|
||||||
if zs not in [volume.zs and volume.zf]:
|
if zs not in [volume.zs, volume.zf]:
|
||||||
logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box")
|
logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box")
|
||||||
raise ValueError
|
raise ValueError
|
||||||
fractalrange = (round_value(limits[0] / grid.dz), round_value(limits[1] / grid.dz))
|
fractalrange = (round_value(limits[0] / grid.dz), round_value(limits[1] / grid.dz))
|
||||||
|
@@ -222,6 +222,7 @@ update_electric_dispersive_A = {
|
|||||||
// dispersive, ID and field
|
// dispersive, ID and field
|
||||||
// component arrays.
|
// component arrays.
|
||||||
|
|
||||||
|
$CUDA_IDX
|
||||||
|
|
||||||
// Convert the linear index to subscripts for 3D field arrays
|
// Convert the linear index to subscripts for 3D field arrays
|
||||||
int x = i / ($NY_FIELDS * $NZ_FIELDS);
|
int x = i / ($NY_FIELDS * $NZ_FIELDS);
|
||||||
@@ -238,7 +239,6 @@ update_electric_dispersive_A = {
|
|||||||
int y_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) / $NZ_T;
|
int y_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) / $NZ_T;
|
||||||
int z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
|
int z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
|
||||||
|
|
||||||
$CUDA_IDX
|
|
||||||
|
|
||||||
// Ex component
|
// Ex component
|
||||||
if ((NY != 1 || NZ != 1) && x >= 0 && x < NX && y > 0 && y < NY && z > 0 && z < NZ) {
|
if ((NY != 1 || NZ != 1) && x >= 0 && x < NX && y > 0 && y < NY && z > 0 && z < NZ) {
|
||||||
@@ -334,6 +334,7 @@ update_electric_dispersive_B = {
|
|||||||
// dispersive, ID and field
|
// dispersive, ID and field
|
||||||
// component arrays.
|
// component arrays.
|
||||||
|
|
||||||
|
$CUDA_IDX
|
||||||
|
|
||||||
// Convert the linear index to subscripts for 3D field arrays
|
// Convert the linear index to subscripts for 3D field arrays
|
||||||
int x = i / ($NY_FIELDS * $NZ_FIELDS);
|
int x = i / ($NY_FIELDS * $NZ_FIELDS);
|
||||||
@@ -350,7 +351,6 @@ update_electric_dispersive_B = {
|
|||||||
int y_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) / $NZ_T;
|
int y_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) / $NZ_T;
|
||||||
int z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
|
int z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
|
||||||
|
|
||||||
$CUDA_IDX
|
|
||||||
|
|
||||||
// Ex component
|
// Ex component
|
||||||
if ((NY != 1 || NZ != 1) && x >= 0 && x < NX && y > 0 && y < NY && z > 0 && z < NZ) {
|
if ((NY != 1 || NZ != 1) && x >= 0 && x < NX && y > 0 && y < NY && z > 0 && z < NZ) {
|
||||||
|
在新工单中引用
屏蔽一个用户