File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
include/picongpu/plugins/openPMD Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -855,7 +855,10 @@ namespace picongpu
855855 for (uint32_t d = 0 ; d < simDim; ++d)
856856 {
857857 bufferExtent[d][i] = singlePatchExtent[d];
858- bufferOffset[d][i] = totalPatchOffset[d] + index_t (singlePatchExtent[d] * superCellIdxND[d]);
858+ // No idea why the -1 is needed, but the results do not fit otherwise
859+ // Something weird going on in supercell indexing
860+ bufferOffset[d][i]
861+ = totalPatchOffset[d] + index_t (singlePatchExtent[d] * (superCellIdxND[d] - 1 ));
859862 }
860863 }
861864
@@ -883,6 +886,7 @@ namespace picongpu
883886 extent_x.resetDataset (ds);
884887
885888 offset_x.storeChunk (bufferOffset[d], {mpiRank * numPatches}, {numPatches});
889+ // TODO: Maybe use a constant record for this
886890 extent_x.storeChunk (bufferExtent[d], {mpiRank * numPatches}, {numPatches});
887891 }
888892
You can’t perform that action at this time.
0 commit comments