2018-11-15 08:13:14 -06:00
|
|
|
#ifndef OPENMC_BANK_H
|
|
|
|
|
#define OPENMC_BANK_H
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
2019-03-01 14:46:21 -06:00
|
|
|
#include "openmc/particle.h"
|
|
|
|
|
#include "openmc/position.h"
|
2021-04-22 16:46:23 -04:00
|
|
|
#include "openmc/shared_array.h"
|
|
|
|
|
#include "openmc/vector.h"
|
2018-11-15 08:13:14 -06:00
|
|
|
|
|
|
|
|
namespace openmc {
|
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
|
// Global variables
|
|
|
|
|
//==============================================================================
|
|
|
|
|
|
|
|
|
|
namespace simulation {
|
|
|
|
|
|
2021-04-29 16:23:54 -04:00
|
|
|
extern vector<SourceSite> source_bank;
|
2018-11-15 08:13:14 -06:00
|
|
|
|
2021-04-29 16:23:54 -04:00
|
|
|
extern SharedArray<SourceSite> surf_source_bank;
|
2020-03-17 00:01:08 -05:00
|
|
|
|
2025-11-13 21:35:33 +01:00
|
|
|
extern SharedArray<CollisionTrackSite> collision_track_bank;
|
|
|
|
|
|
2021-04-29 16:23:54 -04:00
|
|
|
extern SharedArray<SourceSite> fission_bank;
|
2020-01-23 20:28:55 +00:00
|
|
|
|
2025-04-14 09:07:48 -05:00
|
|
|
extern vector<vector<int>> ifp_source_delayed_group_bank;
|
|
|
|
|
|
|
|
|
|
extern vector<vector<double>> ifp_source_lifetime_bank;
|
|
|
|
|
|
|
|
|
|
extern vector<vector<int>> ifp_fission_delayed_group_bank;
|
|
|
|
|
|
|
|
|
|
extern vector<vector<double>> ifp_fission_lifetime_bank;
|
|
|
|
|
|
2021-04-22 16:46:23 -04:00
|
|
|
extern vector<int64_t> progeny_per_particle;
|
2020-01-08 17:09:41 +00:00
|
|
|
|
2026-05-19 23:23:10 -05:00
|
|
|
extern SharedArray<SourceSite> shared_secondary_bank_read;
|
|
|
|
|
extern SharedArray<SourceSite> shared_secondary_bank_write;
|
|
|
|
|
|
2018-11-15 08:13:14 -06:00
|
|
|
} // namespace simulation
|
|
|
|
|
|
2019-02-21 08:32:32 -06:00
|
|
|
//==============================================================================
|
|
|
|
|
// Non-member functions
|
|
|
|
|
//==============================================================================
|
|
|
|
|
|
2026-05-19 23:23:10 -05:00
|
|
|
void sort_bank(SharedArray<SourceSite>& bank, bool is_fission_bank);
|
2020-01-16 22:35:32 +00:00
|
|
|
|
2019-02-21 08:32:32 -06:00
|
|
|
void free_memory_bank();
|
|
|
|
|
|
2020-01-14 15:39:20 +00:00
|
|
|
void init_fission_bank(int64_t max);
|
2020-01-08 17:09:41 +00:00
|
|
|
|
2026-05-19 23:23:10 -05:00
|
|
|
int64_t synchronize_global_secondary_bank(
|
|
|
|
|
SharedArray<SourceSite>& shared_secondary_bank);
|
|
|
|
|
|
2018-11-15 08:13:14 -06:00
|
|
|
} // namespace openmc
|
|
|
|
|
|
|
|
|
|
#endif // OPENMC_BANK_H
|