diff --git a/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp b/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp index d1fb263f0f..9b1feeb2ea 100644 --- a/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp +++ b/include/picongpu/plugins/openPMD/restart/LoadSpecies.hpp @@ -402,9 +402,11 @@ namespace picongpu auto [fullMatches, partialMatches] = getPatchIdx(params, particleSpecies); std::shared_ptr numParticlesShared - = particleSpecies.particlePatches["numParticles"].load(); + = particleSpecies.particlePatches["numParticles"][::openPMD::RecordComponent::SCALAR] + .load(); std::shared_ptr numParticlesOffsetShared - = particleSpecies.particlePatches["numParticlesOffset"].load(); + = particleSpecies.particlePatches["numParticlesOffset"][::openPMD::RecordComponent::SCALAR] + .load(); particles.seriesFlush(); uint64_t* patchNumParticles = numParticlesShared.get(); uint64_t* patchNumParticlesOffset = numParticlesOffsetShared.get(); @@ -462,7 +464,8 @@ namespace picongpu { std::string const name_lookup[] = {"x", "y", "z"}; - size_t patches = particleSpecies.particlePatches["numParticles"].getExtent()[0]; + size_t patches = particleSpecies.particlePatches["numParticles"][::openPMD::RecordComponent::SCALAR] + .getExtent()[0]; std::vector> offsets(patches); std::vector> extents(patches);