mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
moved FilterMatch definition to its own file, so as to remove the circular dependency between filter.h and particle.h
This commit is contained in:
parent
b05dedb179
commit
3c43cb7d79
4 changed files with 23 additions and 26 deletions
|
|
@ -7,8 +7,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "openmc/particle.h"
|
||||
#include "openmc/tallies/filter.h"
|
||||
|
||||
|
||||
namespace openmc {
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -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<int> bins_;
|
||||
std::vector<double> weights_;
|
||||
int i_bin_;
|
||||
bool bins_present_ {false};
|
||||
};
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
21
include/openmc/tallies/filter_match.h
Normal file
21
include/openmc/tallies/filter_match.h
Normal file
|
|
@ -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<int> bins_;
|
||||
std::vector<double> weights_;
|
||||
int i_bin_;
|
||||
bool bins_present_ {false};
|
||||
};
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_TALLIES_FILTERMATCH_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue