mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Making index_cmfd_mesh part of openmc::settings.
This commit is contained in:
parent
96c1afc8f7
commit
0baec6f9d5
4 changed files with 15 additions and 12 deletions
|
|
@ -61,7 +61,8 @@ extern std::string path_statepoint; //!< path to a statepoint file
|
|||
|
||||
extern "C" int32_t index_entropy_mesh; //!< Index of entropy mesh in global mesh array
|
||||
extern "C" int32_t index_ufs_mesh; //!< Index of UFS mesh in global mesh array
|
||||
|
||||
extern "C" int32_t index_cmfd_mesh; //!< Index of CMFD mesh in global mesh array
|
||||
|
||||
extern "C" int32_t n_batches; //!< number of (inactive+active) batches
|
||||
extern "C" int32_t n_inactive; //!< number of inactive batches
|
||||
extern "C" int32_t gen_per_batch; //!< number of generations per batch
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@
|
|||
#include "openmc/mesh.h"
|
||||
#include "openmc/message_passing.h"
|
||||
#include "openmc/simulation.h"
|
||||
#include "openmc/settings.h"
|
||||
|
||||
namespace openmc {
|
||||
|
||||
extern "C" int index_cmfd_mesh;
|
||||
//extern "C" int index_cmfd_mesh;
|
||||
|
||||
extern "C" void
|
||||
cmfd_populate_sourcecounts(int n_energy, const double* energies,
|
||||
|
|
@ -24,7 +25,7 @@ cmfd_populate_sourcecounts(int n_energy, const double* energies,
|
|||
openmc_source_bank(&source_bank, &n);
|
||||
|
||||
// Get source counts in each mesh bin / energy bin
|
||||
auto& m = meshes.at(index_cmfd_mesh);
|
||||
auto& m = meshes.at(settings::index_cmfd_mesh);
|
||||
xt::xarray<double> counts = m->count_sites(simulation::work, source_bank, n_energy, energies, outside);
|
||||
|
||||
// Copy data from the xarray into the source counts array
|
||||
|
|
|
|||
16
src/plot.cpp
16
src/plot.cpp
|
|
@ -560,14 +560,14 @@ ObjectPlot::set_meshlines()
|
|||
} else {
|
||||
index_meshlines_mesh = settings::index_ufs_mesh;
|
||||
}
|
||||
// } else if ("cmfd" == meshtype) {
|
||||
// if (!settings::cmfd_run) {
|
||||
// std::stringstream err_msg;
|
||||
// err_msg << "Need CMFD run to plot CMFD mesh for meshlines on plot " << id;
|
||||
// fatal_error(err_msg);
|
||||
// } else {
|
||||
// index_meshlines_mesh = settings::index_cmfd_mesh;
|
||||
// }
|
||||
} else if ("cmfd" == meshtype) {
|
||||
if (!settings::cmfd_run) {
|
||||
std::stringstream err_msg;
|
||||
err_msg << "Need CMFD run to plot CMFD mesh for meshlines on plot " << id;
|
||||
fatal_error(err_msg);
|
||||
} else {
|
||||
index_meshlines_mesh = settings::index_cmfd_mesh;
|
||||
}
|
||||
} else if ("entropy" == meshtype) {
|
||||
if (settings::index_entropy_mesh < 0) {
|
||||
std::stringstream err_msg;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ std::string path_statepoint;
|
|||
|
||||
int32_t index_entropy_mesh {-1};
|
||||
int32_t index_ufs_mesh {-1};
|
||||
|
||||
int32_t index_cmfd_mesh {-1};
|
||||
|
||||
int32_t n_batches;
|
||||
int32_t n_inactive {0};
|
||||
int32_t gen_per_batch {1};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue