mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
changed name and return type. added signature to capi.h. TODO error handling in tally.cpp
This commit is contained in:
parent
3730496018
commit
30b1ae92cb
2 changed files with 3 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue