@@ -191,15 +191,15 @@ def main():
191
191
# print(f"patch {patch_id}")
192
192
patch = phare_lvl [patch_id ]
193
193
194
- ph_bx = patch ["EM_B_x " ][:]
195
- ph_by = patch ["EM_B_y " ][:]
196
- ph_bz = patch ["EM_B_z " ][:]
194
+ ph_x = patch ["f{phare_fn}_x " ][:]
195
+ ph_y = patch ["f{phare_fn}_y " ][:]
196
+ ph_z = patch ["f{phare_fn}_z " ][:]
197
197
198
198
box = boxFromPatch (patch )
199
199
AMRBox .append (box )
200
200
nbr_boxes += 1
201
201
npx , npy , npz = nbrNodes (box )
202
- b = toFlatPrimal (ph_bx , ph_by , ph_bz , npx , npy , npz )
202
+ data = toFlatPrimal (ph_x , ph_y , ph_z , npx , npy , npz )
203
203
204
204
if first :
205
205
# this is the first patch of the first time
@@ -208,16 +208,16 @@ def main():
208
208
# which is unknown hence the None for maxshape
209
209
# print(f"b shape :{b.shape[0]}")
210
210
pointData_b = pointData_g .create_dataset (
211
- "B " , data = b , maxshape = (None , 3 )
211
+ "data " , data = data , maxshape = (None , 3 )
212
212
)
213
213
first = False
214
214
215
215
else :
216
216
# dataset already created with shape (current_size,3)
217
217
# we add b.shape[0] points (=npx*npy) to the first dim
218
218
# hence need to resize the dataset.
219
- pointData_b .resize (current_size + b .shape [0 ], axis = 0 )
220
- pointData_b [current_size :, :] = b
219
+ pointData_b .resize (current_size + data .shape [0 ], axis = 0 )
220
+ pointData_b [current_size :, :] = data
221
221
# pass
222
222
223
223
current_size += b .shape [0 ]
@@ -231,7 +231,7 @@ def main():
231
231
lvl .create_dataset ("AMRBox" , data = AMRBox )
232
232
steps_lvl .create_dataset ("AMRBoxOffset" , data = AMRBoxOffsets )
233
233
steps_lvl .create_dataset ("NumberOfAMRBox" , data = step_nbrBoxes )
234
- pointDataOffset_g .create_dataset ("B " , data = dataOffsets )
234
+ pointDataOffset_g .create_dataset ("data " , data = dataOffsets )
235
235
236
236
vtk .close ()
237
237
0 commit comments