@@ -535,6 +535,14 @@ def write_particles(f, iteration):
535
535
particlePatches ["extent/y" ].attrs ["unitSI" ] = offset ["y" ].attrs ["unitSI" ]
536
536
particlePatches ["extent/z" ].attrs ["unitSI" ] = offset ["z" ].attrs ["unitSI" ]
537
537
538
+ # particle patches are spatial bounding boxes
539
+ particlePatches ["offset" ].attrs ["unitDimension" ] = \
540
+ np .array ([1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
541
+ particlePatches ["extent" ].attrs ["unitDimension" ] = \
542
+ np .array ([1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
543
+ # L M T I theta N J
544
+ # Dimension of Length per component
545
+
538
546
# domain decomposition shall be 1D along x (but positions are still 3D)
539
547
# we can therefor make the other components constant
540
548
particlePatches ["offset/y" ].attrs ["value" ] = np .float32 (0.0 ) # full size
@@ -560,6 +568,12 @@ def write_particles(f, iteration):
560
568
particlePatches ['offset/x' ][rank ] = rank * grid_layout [0 ] / mpi_size
561
569
particlePatches ['extent/x' ][rank ] = grid_layout [0 ] / mpi_size
562
570
571
+ # unitless indices & counters
572
+ particlePatches ["numParticles" ].attrs ["unitDimension" ] = \
573
+ np .array ([0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
574
+ particlePatches ["numParticlesOffset" ].attrs ["unitDimension" ] = \
575
+ np .array ([0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
576
+
563
577
564
578
def main ():
565
579
# Open an exemple file
0 commit comments