diff --git a/include/openmc/geometry.h b/include/openmc/geometry.h index a7ac53ea31..85fd53a7c6 100644 --- a/include/openmc/geometry.h +++ b/include/openmc/geometry.h @@ -7,8 +7,6 @@ #include #include "openmc/particle.h" -#include "openmc/tallies/filter.h" - namespace openmc { diff --git a/include/openmc/particle.h b/include/openmc/particle.h index 5d87f7b158..447697d3fb 100644 --- a/include/openmc/particle.h +++ b/include/openmc/particle.h @@ -14,16 +14,10 @@ #include "openmc/constants.h" #include "openmc/position.h" #include "openmc/random_lcg.h" +#include "openmc/tallies/filter_match.h" namespace openmc { -// The FilterMatch class is declared here to avoid circular definition, as it will -// be defined later in filter.h. This issue arrises because the Particle object -// defined in this file contains a data member (filter_match_), which is a vector -// of type FilterMatch. Likewise, filter.h has a class that contains a Particle -// member. -class FilterMatch; - //============================================================================== // Constants //============================================================================== diff --git a/include/openmc/tallies/filter.h b/include/openmc/tallies/filter.h index dbe5252eab..58246c80be 100644 --- a/include/openmc/tallies/filter.h +++ b/include/openmc/tallies/filter.h @@ -12,26 +12,10 @@ #include "openmc/constants.h" #include "openmc/hdf5_interface.h" #include "openmc/particle.h" +#include "openmc/tallies/filter_match.h" #include "pugixml.hpp" -namespace openmc { - -//============================================================================== -//! Stores bins and weights for filtered tally events. -//============================================================================== - -class FilterMatch -{ -public: - std::vector bins_; - std::vector weights_; - int i_bin_; - bool bins_present_ {false}; -}; - -} // namespace openmc - namespace openmc { //============================================================================== diff --git a/include/openmc/tallies/filter_match.h b/include/openmc/tallies/filter_match.h new file mode 100644 index 0000000000..a4ab2e4075 --- /dev/null +++ b/include/openmc/tallies/filter_match.h @@ -0,0 +1,21 @@ +#ifndef OPENMC_TALLIES_FILTERMATCH_H +#define OPENMC_TALLIES_FILTERMATCH_H + + +namespace openmc { + +//============================================================================== +//! Stores bins and weights for filtered tally events. +//============================================================================== + +class FilterMatch +{ +public: + std::vector bins_; + std::vector weights_; + int i_bin_; + bool bins_present_ {false}; +}; + +} // namespace openmc +#endif // OPENMC_TALLIES_FILTERMATCH_H