refactor of prn() interface and python interface changes

This commit is contained in:
John Tramm 2019-12-04 16:35:01 +00:00
parent 2ec02d6472
commit 638172e68d
53 changed files with 494 additions and 534 deletions

View file

@ -80,8 +80,7 @@ namespace model {
std::vector<Plot> plots;
std::unordered_map<int, int> plot_map;
uint64_t plotter_prn_seeds[N_STREAMS] = {1, 2, 3, 4, 5, 6};
int plotter_stream = STREAM_TRACKING;
uint64_t plotter_prn_seed = 1;
} // namespace model
@ -961,9 +960,9 @@ voxel_finalize(hid_t dspace, hid_t dset, hid_t memspace)
}
RGBColor random_color(void) {
return {int(prn(model::plotter_prn_seeds, model::plotter_stream)*255),
int(prn(model::plotter_prn_seeds, model::plotter_stream)*255),
int(prn(model::plotter_prn_seeds, model::plotter_stream)*255)};
return {int(prn(&model::plotter_prn_seed)*255),
int(prn(&model::plotter_prn_seed)*255),
int(prn(&model::plotter_prn_seed)*255)};
}
extern "C" int openmc_id_map(const void* plot, int32_t* data_out)