23 #include "openPMD/backend/Attributable.hpp" 24 #include "openPMD/backend/Container.hpp" 25 #include "openPMD/ParticlePatches.hpp" 26 #include "openPMD/Record.hpp" 36 friend class Container< ParticleSpecies >;
44 ParticleSpecies() =
default;
47 void flush(std::string
const &)
override;
55 template<
typename T >
56 void operator()(
T & ret)
58 ret.particlePatches.linkHierarchy(ret.m_writable);
60 auto& np = ret.particlePatches[
"numParticles"];
61 auto& npc = np[RecordComponent::SCALAR];
62 npc.resetDataset(
Dataset(determineDatatype<uint64_t>(), {1}));
63 npc.parent = np.parent;
64 auto& npo = ret.particlePatches[
"numParticlesOffset"];
65 auto& npoc = npo[RecordComponent::SCALAR];
66 npoc.resetDataset(
Dataset(determineDatatype<uint64_t>(), {1}));
67 npoc.parent = npo.parent;
Definition: ParticlePatches.hpp:32
Definition: Dataset.hpp:36
Container Element Creation Policy.
Definition: Attributable.hpp:46
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:35
Public definitions of openPMD-api.
Definition: Date.cpp:28
Definition: ParticleSpecies.hpp:34
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:70