Merge pull request #357 from rania-pa/devel

Small fixes on add_surface_roughness.py and knl_fields_updates.py
这个提交包含在:
Craig Warren
2023-07-25 15:29:33 +01:00
提交者 GitHub
当前提交 0284f399bd
共有 2 个文件被更改,包括 6 次插入6 次删除

查看文件

@@ -154,7 +154,7 @@ class AddSurfaceRoughness(UserObjectGeometry):
if zs == zf:
logger.exception(f"{self.__str__()} dimensions are not specified correctly")
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")
raise ValueError
fractalrange = (round_value(limits[0] / grid.dy), round_value(limits[1] / grid.dy))
@@ -182,7 +182,7 @@ class AddSurfaceRoughness(UserObjectGeometry):
requestedsurface = "yplus"
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")
raise ValueError
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
// component arrays.
$CUDA_IDX
// Convert the linear index to subscripts for 3D field arrays
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 z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
$CUDA_IDX
// Ex component
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
// component arrays.
$CUDA_IDX
// Convert the linear index to subscripts for 3D field arrays
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 z_T = ((i % ($NX_T * $NY_T * $NZ_T)) % ($NY_T * $NZ_T)) % $NZ_T;
$CUDA_IDX
// Ex component
if ((NY != 1 || NZ != 1) && x >= 0 && x < NX && y > 0 && y < NY && z > 0 && z < NZ) {