mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #1113 from paulromano/timer-bugfix
Assortment of small bug fixes
This commit is contained in:
commit
008c8f80d4
10 changed files with 69 additions and 65 deletions
|
|
@ -13,19 +13,6 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int32_t n_filters;
|
||||
|
||||
class FilterMatch;
|
||||
extern std::vector<FilterMatch> filter_matches;
|
||||
#pragma omp threadprivate(filter_matches)
|
||||
|
||||
class Filter;
|
||||
extern std::vector<std::unique_ptr<Filter>> tally_filters;
|
||||
|
||||
//==============================================================================
|
||||
//! Stores bins and weights for filtered tally events.
|
||||
//==============================================================================
|
||||
|
|
@ -37,6 +24,15 @@ public:
|
|||
std::vector<double> weights_;
|
||||
};
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
// Without an explicit instantiation of vector<FilterMatch>, the Intel compiler
|
||||
// will complain about the threadprivate directive on filter_matches. Note that
|
||||
// this has to happen *outside* of the openmc namespace
|
||||
template class std::vector<openmc::FilterMatch>;
|
||||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
//! Modifies tally score events.
|
||||
//==============================================================================
|
||||
|
|
@ -77,6 +73,17 @@ public:
|
|||
int n_bins_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int32_t n_filters;
|
||||
|
||||
extern std::vector<FilterMatch> filter_matches;
|
||||
#pragma omp threadprivate(filter_matches)
|
||||
|
||||
extern std::vector<std::unique_ptr<Filter>> tally_filters;
|
||||
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void free_memory_tally_c();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public:
|
|||
private:
|
||||
bool running_ {false}; //!< is timer running?
|
||||
std::chrono::time_point<clock> start_; //!< starting point for clock
|
||||
double elapsed_; //!< elasped time in [s]
|
||||
double elapsed_ {0.0}; //!< elasped time in [s]
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue