@@ -1187,7 +1187,7 @@ def make_type_domain_decomp(input_deck):
1187
1187
# ==============================================================================
1188
1188
1189
1189
1190
- def make_type_global (input_deck ):
1190
+ def make_type_global (input_deck , structures , records ):
1191
1191
global global_
1192
1192
1193
1193
# Get modes
@@ -1266,78 +1266,85 @@ def make_type_global(input_deck):
1266
1266
) or input_deck .technique ["iQMC" ]:
1267
1267
bank_source = particle_bank (N_work )
1268
1268
1269
+ # Set the global structure
1270
+ global_structure = []
1271
+ for key in structures .keys ():
1272
+ if isinstance (records [key ], list ):
1273
+ global_structure += [(f"{ key } s" , structures [key ], (len (records [key ]),))]
1274
+ else :
1275
+ global_structure += [(f"{ key } " , structures [key ])]
1276
+ global_structure += [
1277
+ ("surfaces" , surface , (N_surface ,)),
1278
+ # Cells
1279
+ ("cells" , cell , (N_cell ,)),
1280
+ ("cells_data_surface" , int64 , (N_cell_surface ,)),
1281
+ ("cells_data_region" , int64 , (N_cell_region ,)),
1282
+ # Universes
1283
+ ("universes" , universe , (N_universe ,)),
1284
+ ("universes_data_cell" , int64 , (N_universe_cell ,)),
1285
+ ("lattices" , lattice , (N_lattice ,)),
1286
+ ("sources" , source , (N_source ,)),
1287
+ ("mesh_tallies" , mesh_tally , (N_mesh_tally ,)),
1288
+ ("surface_tallies" , surface_tally , (N_surface_tally ,)),
1289
+ ("cell_tallies" , cell_tally , (N_cell_tally ,)),
1290
+ ("cs_tallies" , cs_tally , (N_cs_tally ,)),
1291
+ ("technique" , technique ),
1292
+ ("domain_decomp" , domain_decomp ),
1293
+ ("bank_active" , bank_active ),
1294
+ ("bank_census" , bank_census ),
1295
+ ("bank_source" , bank_source ),
1296
+ ("bank_future" , bank_future ),
1297
+ ("bank_precursor" , bank_precursor ),
1298
+ ("rng_seed_base" , uint64 ),
1299
+ ("rng_seed" , uint64 ),
1300
+ ("rng_stride" , int64 ),
1301
+ ("dd_idx" , int64 ),
1302
+ ("dd_N_local_source" , int64 ),
1303
+ ("dd_local_rank" , int64 ),
1304
+ ("k_eff" , float64 ),
1305
+ ("k_cycle" , float64 , (N_cycle ,)),
1306
+ ("k_avg" , float64 ),
1307
+ ("k_sdv" , float64 ),
1308
+ ("n_avg" , float64 ), # Neutron density
1309
+ ("n_sdv" , float64 ),
1310
+ ("n_max" , float64 ),
1311
+ ("C_avg" , float64 ), # Precursor density
1312
+ ("C_sdv" , float64 ),
1313
+ ("C_max" , float64 ),
1314
+ ("k_avg_running" , float64 ),
1315
+ ("k_sdv_running" , float64 ),
1316
+ ("gyration_radius" , float64 , (N_cycle ,)),
1317
+ ("idx_cycle" , int64 ),
1318
+ ("cycle_active" , bool_ ),
1319
+ ("eigenvalue_tally_nuSigmaF" , float64 , (1 ,)),
1320
+ ("eigenvalue_tally_n" , float64 , (1 ,)),
1321
+ ("eigenvalue_tally_C" , float64 , (1 ,)),
1322
+ ("idx_census" , int64 ),
1323
+ ("idx_batch" , int64 ),
1324
+ ("mpi_size" , int64 ),
1325
+ ("mpi_rank" , int64 ),
1326
+ ("mpi_master" , bool_ ),
1327
+ ("mpi_work_start" , int64 ),
1328
+ ("mpi_work_size" , int64 ),
1329
+ ("mpi_work_size_total" , int64 ),
1330
+ ("mpi_work_start_precursor" , int64 ),
1331
+ ("mpi_work_size_precursor" , int64 ),
1332
+ ("mpi_work_size_total_precursor" , int64 ),
1333
+ ("runtime_total" , float64 ),
1334
+ ("runtime_preparation" , float64 ),
1335
+ ("runtime_simulation" , float64 ),
1336
+ ("runtime_output" , float64 ),
1337
+ ("runtime_bank_management" , float64 ),
1338
+ ("precursor_strength" , float64 ),
1339
+ ("mpi_work_iter" , int64 , (1 ,)),
1340
+ ("gpu_state_pointer" , uintp ),
1341
+ ("source_program_pointer" , uintp ),
1342
+ ("precursor_program_pointer" , uintp ),
1343
+ ("source_seed" , uint64 ),
1344
+ ]
1345
+
1269
1346
# GLobal type
1270
- global_ = into_dtype (
1271
- [
1272
- ("surfaces" , surface , (N_surface ,)),
1273
- # Cells
1274
- ("cells" , cell , (N_cell ,)),
1275
- ("cells_data_surface" , int64 , (N_cell_surface ,)),
1276
- ("cells_data_region" , int64 , (N_cell_region ,)),
1277
- # Universes
1278
- ("universes" , universe , (N_universe ,)),
1279
- ("universes_data_cell" , int64 , (N_universe_cell ,)),
1280
- ("lattices" , lattice , (N_lattice ,)),
1281
- ("sources" , source , (N_source ,)),
1282
- ("mesh_tallies" , mesh_tally , (N_mesh_tally ,)),
1283
- ("surface_tallies" , surface_tally , (N_surface_tally ,)),
1284
- ("cell_tallies" , cell_tally , (N_cell_tally ,)),
1285
- ("cs_tallies" , cs_tally , (N_cs_tally ,)),
1286
- ("technique" , technique ),
1287
- ("domain_decomp" , domain_decomp ),
1288
- ("bank_active" , bank_active ),
1289
- ("bank_census" , bank_census ),
1290
- ("bank_source" , bank_source ),
1291
- ("bank_future" , bank_future ),
1292
- ("bank_precursor" , bank_precursor ),
1293
- ("rng_seed_base" , uint64 ),
1294
- ("rng_seed" , uint64 ),
1295
- ("rng_stride" , int64 ),
1296
- ("dd_idx" , int64 ),
1297
- ("dd_N_local_source" , int64 ),
1298
- ("dd_local_rank" , int64 ),
1299
- ("k_eff" , float64 ),
1300
- ("k_cycle" , float64 , (N_cycle ,)),
1301
- ("k_avg" , float64 ),
1302
- ("k_sdv" , float64 ),
1303
- ("n_avg" , float64 ), # Neutron density
1304
- ("n_sdv" , float64 ),
1305
- ("n_max" , float64 ),
1306
- ("C_avg" , float64 ), # Precursor density
1307
- ("C_sdv" , float64 ),
1308
- ("C_max" , float64 ),
1309
- ("k_avg_running" , float64 ),
1310
- ("k_sdv_running" , float64 ),
1311
- ("gyration_radius" , float64 , (N_cycle ,)),
1312
- ("idx_cycle" , int64 ),
1313
- ("cycle_active" , bool_ ),
1314
- ("eigenvalue_tally_nuSigmaF" , float64 , (1 ,)),
1315
- ("eigenvalue_tally_n" , float64 , (1 ,)),
1316
- ("eigenvalue_tally_C" , float64 , (1 ,)),
1317
- ("idx_census" , int64 ),
1318
- ("idx_batch" , int64 ),
1319
- ("mpi_size" , int64 ),
1320
- ("mpi_rank" , int64 ),
1321
- ("mpi_master" , bool_ ),
1322
- ("mpi_work_start" , int64 ),
1323
- ("mpi_work_size" , int64 ),
1324
- ("mpi_work_size_total" , int64 ),
1325
- ("mpi_work_start_precursor" , int64 ),
1326
- ("mpi_work_size_precursor" , int64 ),
1327
- ("mpi_work_size_total_precursor" , int64 ),
1328
- ("runtime_total" , float64 ),
1329
- ("runtime_preparation" , float64 ),
1330
- ("runtime_simulation" , float64 ),
1331
- ("runtime_output" , float64 ),
1332
- ("runtime_bank_management" , float64 ),
1333
- ("precursor_strength" , float64 ),
1334
- ("mpi_work_iter" , int64 , (1 ,)),
1335
- ("gpu_state_pointer" , uintp ),
1336
- ("source_program_pointer" , uintp ),
1337
- ("precursor_program_pointer" , uintp ),
1338
- ("source_seed" , uint64 ),
1339
- ]
1340
- )
1347
+ global_ = into_dtype (global_structure )
1341
1348
1342
1349
1343
1350
# ==============================================================================
0 commit comments