diff --git a/include/openmc/dagmc.h b/include/openmc/dagmc.h index 81aa163dc..1e66d8f17 100644 --- a/include/openmc/dagmc.h +++ b/include/openmc/dagmc.h @@ -23,7 +23,7 @@ namespace model { //============================================================================== void load_dagmc_geometry(); -void create_dagmc_universe(const std::string& filename); +int32_t create_dagmc_universe(const std::string& filename); void read_geometry_dagmc(); bool read_uwuw_materials(pugi::xml_document& doc); bool get_uwuw_materials_xml(std::string& s); diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 5b8a61f7e..a3567ebe1 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -151,10 +151,10 @@ void legacy_assign_material(std::string mat_string, DAGCell* c) void load_dagmc_geometry() { - create_dagmc_universe(dagmc_file()); + int32_t univ_idx = create_dagmc_universe(dagmc_file()); } -void create_dagmc_universe(const std::string& filename) { +int32_t create_dagmc_universe(const std::string& filename) { if (!model::DAG) { model::DAG = std::make_shared(); } @@ -338,7 +338,7 @@ void create_dagmc_universe(const std::string& filename) { model::surface_map[s->id_] = i; } - return; + return model::universes.size() - 1; } void read_geometry_dagmc()