Skip to content

Commit f601feb

Browse files
committed
Fix: 1D Field Init in z
1 parent 1d4499f commit f601feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Initialization/WarpXInitData.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,8 @@ WarpX::InitializeExternalFieldsOnGridUsingParser (
10071007
#if defined(WARPX_DIM_1D_Z)
10081008
amrex::Real x = 0._rt;
10091009
amrex::Real y = 0._rt;
1010-
amrex::Real fac_z = (1._rt - z_nodal_flag[1]) * dx_lev[1] * 0.5_rt;
1011-
amrex::Real z = j*dx_lev[1] + real_box.lo(1) + fac_z;
1010+
amrex::Real fac_z = (1._rt - z_nodal_flag[0]) * dx_lev[0] * 0.5_rt;
1011+
amrex::Real z = j*dx_lev[0] + real_box.lo(0) + fac_z;
10121012
#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
10131013
amrex::Real fac_x = (1._rt - z_nodal_flag[0]) * dx_lev[0] * 0.5_rt;
10141014
amrex::Real x = i*dx_lev[0] + real_box.lo(0) + fac_x;

0 commit comments

Comments
 (0)