Skip to content

Commit d317d30

Browse files
Fix compile-time name lookup for 2D case.
1 parent a5360b3 commit d317d30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/picongpu/fields/background/templates/twtstight/getFieldPositions_SI.tpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace picongpu
5757
floatD_X laserOrigin = precisionCast<float_X>(halfSimSize);
5858
laserOrigin.y() = float_X(focus_y_SI / cellDimensions.y());
5959
if constexpr(simDim == DIM3)
60-
laserOrigin.z() += float_X(focus_z_offset_SI / cellDimensions.z());
60+
laserOrigin[simDim - 1] += float_X(focus_z_offset_SI / cellDimensions[simDim - 1]);
6161

6262
/* For staggered fields (e.g. Yee-grid), obtain the fractional cell index components and add
6363
* that to the total cell indices. The physical field coordinate origin is transversally

0 commit comments

Comments
 (0)