mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Move remainder of MCPL-related code to mcpl_interface.h/cpp
This commit is contained in:
parent
a3065b479c
commit
361b3486ef
7 changed files with 201 additions and 179 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "openmc/event.h"
|
||||
#include "openmc/geometry_aux.h"
|
||||
#include "openmc/material.h"
|
||||
#include "openmc/mcpl_interface.h"
|
||||
#include "openmc/message_passing.h"
|
||||
#include "openmc/nuclide.h"
|
||||
#include "openmc/output.h"
|
||||
|
|
@ -389,9 +390,7 @@ void finalize_batch()
|
|||
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
// Write out a separate source point if it's been specified for this batch
|
||||
#ifdef OPENMC_MCPL
|
||||
if (!settings::source_mcpl_write) {
|
||||
#endif
|
||||
if (contains(settings::sourcepoint_batch, simulation::current_batch) &&
|
||||
settings::source_write && settings::source_separate) {
|
||||
write_source_point(nullptr);
|
||||
|
|
@ -402,7 +401,6 @@ void finalize_batch()
|
|||
auto filename = settings::path_output + "source.h5";
|
||||
write_source_point(filename.c_str());
|
||||
}
|
||||
#ifdef OPENMC_MCPL
|
||||
} else {
|
||||
if (contains(settings::sourcepoint_batch, simulation::current_batch) &&
|
||||
settings::source_mcpl_write && settings::source_separate) {
|
||||
|
|
@ -415,7 +413,6 @@ void finalize_batch()
|
|||
write_mcpl_source_point(filename.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Write out surface source if requested.
|
||||
|
|
@ -424,13 +421,11 @@ void finalize_batch()
|
|||
auto filename = settings::path_output + "surface_source.h5";
|
||||
write_source_point(filename.c_str(), true);
|
||||
}
|
||||
#ifdef OPENMC_MCPL
|
||||
if (settings::surf_mcpl_write &&
|
||||
simulation::current_batch == settings::n_batches) {
|
||||
auto filename = settings::path_output + "surface_source.mcpl";
|
||||
write_mcpl_source_point(filename.c_str(), true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void initialize_generation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue