Skip to content

Commit

Permalink
Fix: openPMD Low-D position/positionOffset
Browse files Browse the repository at this point in the history
Continue to write defaults for coarse and fine
position of omitted dimensions to zero.
  • Loading branch information
ax3l committed May 9, 2024
1 parent c734171 commit f59e17b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Diagnostics/WarpXOpenPMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,9 +1014,12 @@ WarpXOpenPMDPlot::SetConstParticleRecordsEDPIC (
#if defined(WARPX_DIM_1D_Z)
currSpecies["position"]["x"].resetDataset( realType );
currSpecies["position"]["y"].resetDataset( realType );
currSpecies["positionOffset"]["x"].resetDataset( realType );
currSpecies["positionOffset"]["y"].resetDataset( realType );
#endif
#if defined(WARPX_DIM_XZ)
currSpecies["position"]["y"].resetDataset( realType );
currSpecies["positionOffset"]["y"].resetDataset( realType );
#endif

// make constant
Expand All @@ -1030,9 +1033,12 @@ WarpXOpenPMDPlot::SetConstParticleRecordsEDPIC (
#if defined(WARPX_DIM_1D_Z)
currSpecies["position"]["x"].makeConstant( 0._prt );
currSpecies["position"]["y"].makeConstant( 0._prt );
currSpecies["positionOffset"]["x"].makeConstant( 0._prt );
currSpecies["positionOffset"]["y"].makeConstant( 0._prt );
#endif
#if defined(WARPX_DIM_XZ)
currSpecies["position"]["y"].makeConstant( 0._prt );
currSpecies["positionOffset"]["y"].makeConstant( 0._prt );
#endif

// meta data
Expand Down

0 comments on commit f59e17b

Please sign in to comment.