diff --git a/include/openmc/capi.h b/include/openmc/capi.h index 69d3ff1f61..e04d4898e7 100644 --- a/include/openmc/capi.h +++ b/include/openmc/capi.h @@ -118,6 +118,7 @@ int openmc_regular_mesh_get_params( int openmc_regular_mesh_set_dimension(int32_t index, int n, const int* dims); int openmc_regular_mesh_set_params(int32_t index, int n, const double* ll, const double* ur, const double* width); +int openmc_remove_tally(int32_t id); int openmc_reset(); int openmc_reset_timers(); int openmc_run(); diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 72c4fa4fe3..8d54570efe 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -1273,12 +1273,13 @@ extern "C" size_t tallies_size() } // given a tally ID, remove it from the tallies vector -extern "C" void openmc_remove_tally_from_tallies(int32_t id) +extern "C" int openmc_remove_tally(int32_t id) { // query map for index corersponding to the given id int32_t index = model::tally_map[id]; // delete the tally via iterator pointing to correct position model::tallies.erase(model::tallies.begin() + index); + return 0; } } // namespace openmc