File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -256,8 +256,11 @@ bool Iteration::closedByWriter() const
256256
257257void Iteration::visitHierarchy (HierarchyVisitor &v, bool recursive)
258258{
259- meshes.visitHierarchy (v, recursive);
260- particles.visitHierarchy (v, recursive);
259+ if (recursive)
260+ {
261+ meshes.visitHierarchy (v, recursive);
262+ particles.visitHierarchy (v, recursive);
263+ }
261264 v (*this );
262265}
263266
@@ -534,8 +537,6 @@ void Iteration::read_impl(std::string const &groupPath)
534537 pOpen.path = groupPath;
535538 IOHandler ()->enqueue (IOTask (this , pOpen));
536539
537- internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
538-
539540 /* Find the root point [Series] of this file,
540541 * meshesPath and particlesPath are stored there */
541542 Series s = retrieveSeries ();
@@ -598,6 +599,8 @@ void Iteration::read_impl(std::string const &groupPath)
598599 particles.setDirty (false );
599600
600601 readAttributes (ReadMode::FullyReread);
602+ internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
603+
601604#ifdef openPMD_USE_INVASIVE_TESTS
602605 if (containsAttribute (" __openPMD_internal_fail" ))
603606 {
Original file line number Diff line number Diff line change @@ -498,8 +498,6 @@ void Mesh::read()
498498 IOHandler ()->m_verify_homogeneous_extents );
499499 internal::EraseStaleEntries<Mesh> map{*this };
500500
501- internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
502-
503501 if (scalar ())
504502 {
505503 T_RecordComponent::read ();
@@ -565,9 +563,8 @@ void Mesh::read()
565563
566564 std::move (homogenizeExtents).homogenize (*this );
567565
568- internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
569-
570566 readAttributes (ReadMode::FullyReread);
567+ internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
571568}
572569} // namespace openPMD
573570
Original file line number Diff line number Diff line change @@ -29,8 +29,11 @@ namespace openPMD
2929{
3030void ParticleSpecies::visitHierarchy (HierarchyVisitor &v, bool recursive)
3131{
32+ if (recursive)
33+ {
34+ particlePatches.visitHierarchy (v, recursive);
35+ }
3236 visitHierarchyImpl<ParticleSpecies>(v, recursive);
33- particlePatches.visitHierarchy (v, recursive);
3437}
3538
3639ParticleSpecies::ParticleSpecies ()
Original file line number Diff line number Diff line change @@ -197,9 +197,9 @@ auto Record::read() -> internal::HomogenizeExtents
197197 }
198198 }
199199
200+ readAttributes (ReadMode::FullyReread);
200201 internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
201202
202- readAttributes (ReadMode::FullyReread);
203203 return res;
204204}
205205
Original file line number Diff line number Diff line change @@ -3566,7 +3566,10 @@ void Series::close()
35663566
35673567void Series::visitHierarchy (HierarchyVisitor &v, bool recursive)
35683568{
3569- get ().iterations .visitHierarchy (v, recursive);
3569+ if (recursive)
3570+ {
3571+ get ().iterations .visitHierarchy (v, recursive);
3572+ }
35703573 v (*this );
35713574}
35723575
Original file line number Diff line number Diff line change @@ -78,8 +78,6 @@ void PatchRecord::flush_impl(
7878
7979void PatchRecord::read ()
8080{
81- internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
82-
8381 Parameter<Operation::LIST_DATASETS> dList;
8482 IOHandler ()->enqueue (IOTask (this , dList));
8583 IOHandler ()->flush (internal::defaultFlushParams);
@@ -108,6 +106,10 @@ void PatchRecord::read()
108106 this ->container ().erase (component_name);
109107 }
110108 }
109+
110+ readAttributes (ReadMode::FullyReread);
111+ internal::ScientificDefaults::readDefaults (IOHandler ()->m_standard );
112+
111113 setDirty (false );
112114}
113115} // namespace openPMD
You can’t perform that action at this time.
0 commit comments