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;
58 dirtyRecursive()
const;
66 template<
typename T >
67 void operator()(
T & ret)
69 ret.particlePatches.linkHierarchy(ret.m_writable);
71 auto& np = ret.particlePatches[
"numParticles"];
72 auto& npc = np[RecordComponent::SCALAR];
73 npc.resetDataset(
Dataset(determineDatatype<uint64_t>(), {1}));
74 npc.parent = np.parent;
75 auto& npo = ret.particlePatches[
"numParticlesOffset"];
76 auto& npoc = npo[RecordComponent::SCALAR];
77 npoc.resetDataset(
Dataset(determineDatatype<uint64_t>(), {1}));
78 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:38
Public definitions of openPMD-api.
Definition: Date.cpp:29
Definition: ParticleSpecies.hpp:34
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:70