mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
fix a bug in total timer
This commit is contained in:
parent
6580206868
commit
296dc72b3b
3 changed files with 6 additions and 18 deletions
|
|
@ -274,6 +274,7 @@ class Operator(TransportOperator):
|
|||
# Run OpenMC
|
||||
openmc.lib.reset()
|
||||
openmc.lib.run()
|
||||
openmc.lib.reset_timers()
|
||||
|
||||
# Extract results
|
||||
op_result = self._unpack_tallies_and_normalize(power)
|
||||
|
|
|
|||
|
|
@ -307,8 +307,12 @@ def plot_geometry():
|
|||
|
||||
|
||||
def reset():
|
||||
"""Reset tallies and timers."""
|
||||
"""Reset tallies but keep timers."""
|
||||
_dll.openmc_reset()
|
||||
|
||||
|
||||
def reset_timers():
|
||||
"""Reset timers and restart for next batch."""
|
||||
_dll.openmc_reset_timers()
|
||||
_dll.openmc_restart_timers()
|
||||
|
||||
|
|
|
|||
|
|
@ -89,24 +89,7 @@ void reset_timers()
|
|||
|
||||
void restart_timers()
|
||||
{
|
||||
simulation::time_active.start();
|
||||
simulation::time_bank.start();
|
||||
simulation::time_bank_sample.start();
|
||||
simulation::time_bank_sendrecv.start();
|
||||
simulation::time_finalize.start();
|
||||
simulation::time_inactive.start();
|
||||
simulation::time_initialize.start();
|
||||
simulation::time_read_xs.start();
|
||||
simulation::time_sample_source.start();
|
||||
simulation::time_tallies.start();
|
||||
simulation::time_total.start();
|
||||
simulation::time_transport.start();
|
||||
simulation::time_event_init.start();
|
||||
simulation::time_event_calculate_xs.start();
|
||||
simulation::time_event_advance_particle.start();
|
||||
simulation::time_event_surface_crossing.start();
|
||||
simulation::time_event_collision.start();
|
||||
simulation::time_event_death.start();
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue