mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Making dagmc_enabled flag a const. Handling compiler warning for dagmc filename.
This commit is contained in:
parent
1642b9fb15
commit
161a4c9b53
3 changed files with 8 additions and 8 deletions
|
|
@ -16,6 +16,8 @@ namespace openmc {
|
|||
|
||||
namespace model {
|
||||
|
||||
extern "C" const bool dagmc_enabled;
|
||||
|
||||
extern moab::DagMC* DAG;
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
extern "C" bool dagmc_enabled;
|
||||
|
||||
//==============================================================================
|
||||
// Global variable declarations
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
namespace openmc {
|
||||
|
||||
#ifdef DAGMC
|
||||
bool dagmc_enabled = true;
|
||||
const bool dagmc_enabled = true;
|
||||
#else
|
||||
bool dagmc_enabled = false;
|
||||
const bool dagmc_enabled = false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ bool dagmc_enabled = false;
|
|||
#include "uwuw.hpp"
|
||||
#include "dagmcmetadata.hpp"
|
||||
|
||||
#define DAGMC_FILENAME "dagmc.h5m"
|
||||
const std::string DAGMC_FILENAME = "dagmc.h5m";
|
||||
|
||||
namespace openmc {
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ moab::DagMC* DAG;
|
|||
|
||||
|
||||
std::string get_uwuw_materials_xml() {
|
||||
UWUW uwuw(DAGMC_FILENAME);
|
||||
UWUW uwuw(DAGMC_FILENAME.c_str());
|
||||
|
||||
std::stringstream ss;
|
||||
if (uwuw.material_library.size() != 0) {
|
||||
|
|
@ -93,7 +93,7 @@ void load_dagmc_geometry()
|
|||
}
|
||||
|
||||
// create uwuw instance
|
||||
UWUW uwuw(DAGMC_FILENAME);
|
||||
UWUW uwuw(DAGMC_FILENAME.c_str());
|
||||
|
||||
// check for uwuw material definitions
|
||||
bool using_uwuw = (uwuw.material_library.size() == 0) ? false : true;
|
||||
|
|
@ -111,7 +111,7 @@ void load_dagmc_geometry()
|
|||
|
||||
int32_t dagmc_univ_id = 0; // universe is always 0 for DAGMC runs
|
||||
|
||||
moab::ErrorCode rval = model::DAG->load_file(DAGMC_FILENAME);
|
||||
moab::ErrorCode rval = model::DAG->load_file(DAGMC_FILENAME.c_str());
|
||||
MB_CHK_ERR_CONT(rval);
|
||||
|
||||
rval = model::DAG->init_OBBTree();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue