@@ -546,6 +546,14 @@ def write_particles(f, iteration):
546
546
particlePatches ["extent/y" ].attrs ["unitSI" ] = offset ["y" ].attrs ["unitSI" ]
547
547
particlePatches ["extent/z" ].attrs ["unitSI" ] = offset ["z" ].attrs ["unitSI" ]
548
548
549
+ # particle patches are spatial bounding boxes
550
+ particlePatches ["offset" ].attrs ["unitDimension" ] = \
551
+ np .array ([1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
552
+ particlePatches ["extent" ].attrs ["unitDimension" ] = \
553
+ np .array ([1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
554
+ # L M T I theta N J
555
+ # Dimension of Length per component
556
+
549
557
# domain decomposition shall be 1D along x (but positions are still 3D)
550
558
# we can therefor make the other components constant
551
559
particlePatches ["offset/y" ].attrs ["value" ] = np .float32 (0.0 ) # full size
@@ -571,6 +579,12 @@ def write_particles(f, iteration):
571
579
particlePatches ['offset/x' ][rank ] = rank * grid_layout [0 ] / mpi_size
572
580
particlePatches ['extent/x' ][rank ] = grid_layout [0 ] / mpi_size
573
581
582
+ # unitless indices & counters
583
+ particlePatches ["numParticles" ].attrs ["unitDimension" ] = \
584
+ np .array ([0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
585
+ particlePatches ["numParticlesOffset" ].attrs ["unitDimension" ] = \
586
+ np .array ([0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ], dtype = np .float64 )
587
+
574
588
575
589
def main ():
576
590
# Open an exemple file
0 commit comments