mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
fix zero timing of initialization and eclapsed time
This commit is contained in:
parent
8ae7c783b5
commit
c05bb28b7a
2 changed files with 8 additions and 6 deletions
|
|
@ -37,7 +37,7 @@ public:
|
|||
Timer() {};
|
||||
|
||||
//! Start running the timer
|
||||
void start ();
|
||||
void start();
|
||||
|
||||
//! Get total elapsed time in seconds
|
||||
//! \return Elapsed time in [s]
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
private:
|
||||
bool running_ {false}; //!< is timer running?
|
||||
std::chrono::time_point<clock> start_; //!< starting point for clock
|
||||
double elapsed_ {0.0}; //!< elasped time in [s]
|
||||
double elapsed_ {0.0}; //!< elapsed time in [s]
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ int openmc_finalize()
|
|||
// Clear results
|
||||
openmc_reset();
|
||||
|
||||
// Reset timers
|
||||
reset_timers();
|
||||
reset_timers_f();
|
||||
|
||||
// Reset global variables
|
||||
settings::assume_separate = false;
|
||||
settings::check_overlaps = false;
|
||||
|
|
@ -115,10 +119,6 @@ int openmc_reset()
|
|||
simulation::k_abs_tra = 0.0;
|
||||
simulation::k_sum = {0.0, 0.0};
|
||||
|
||||
// Reset timers
|
||||
reset_timers();
|
||||
reset_timers_f();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -126,6 +126,8 @@ int openmc_hard_reset()
|
|||
{
|
||||
// Reset all tallies and timers
|
||||
openmc_reset();
|
||||
reset_timers();
|
||||
reset_timers_f();
|
||||
|
||||
// Reset total generations and keff guess
|
||||
simulation::keff = 1.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue