Fix receivers not always output in the same order

This happened when receivers were recombined on rank 0 when using MPI.
Need to ensure consistancy in the regression tests when comparing
serial and MPI implementations.
这个提交包含在:
nmannall
2024-07-02 15:08:41 +01:00
父节点 816833e254
当前提交 5938579516

查看文件

@@ -136,6 +136,10 @@ def write_hd5_data(basegrp, grid, is_subgrid=False):
basegrp["tls/tl" + str(tlindex + 1) + "/Vtotal"] = tl.Vtotal
basegrp["tls/tl" + str(tlindex + 1) + "/Itotal"] = tl.Itotal
# Ensure the order of receivers is always consistent (Needed for
# consistancy when using MPI with multiple receivers)
grid.rxs.sort(key=lambda rx: rx.ID)
# Create group, add positional data and write field component arrays for receivers
for rxindex, rx in enumerate(grid.rxs):
grp = basegrp.create_group("rxs/rx" + str(rxindex + 1))