mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Meshborn filter (#2925)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
1a34ddf121
commit
cc848effe7
21 changed files with 720 additions and 11 deletions
|
|
@ -262,6 +262,10 @@ public:
|
|||
int& cell_last(int i) { return cell_last_[i]; }
|
||||
const int& cell_last(int i) const { return cell_last_[i]; }
|
||||
|
||||
// Coordinates at birth
|
||||
Position& r_born() { return r_born_; }
|
||||
const Position& r_born() const { return r_born_; }
|
||||
|
||||
// Coordinates of last collision or reflective/periodic surface
|
||||
// crossing for current tallies
|
||||
Position& r_last_current() { return r_last_current_; }
|
||||
|
|
@ -323,6 +327,7 @@ private:
|
|||
int n_coord_last_ {1}; //!< number of current coordinates
|
||||
vector<int> cell_last_; //!< coordinates for all levels
|
||||
|
||||
Position r_born_; //!< coordinates at birth
|
||||
Position r_last_current_; //!< coordinates of the last collision or
|
||||
//!< reflective/periodic surface crossing for
|
||||
//!< current tallies
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ enum class FilterType {
|
|||
MATERIAL,
|
||||
MATERIALFROM,
|
||||
MESH,
|
||||
MESHBORN,
|
||||
MESH_SURFACE,
|
||||
MU,
|
||||
PARTICLE,
|
||||
|
|
|
|||
26
include/openmc/tallies/filter_meshborn.h
Normal file
26
include/openmc/tallies/filter_meshborn.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef OPENMC_TALLIES_FILTER_MESHBORN_H
|
||||
#define OPENMC_TALLIES_FILTER_MESHBORN_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "openmc/position.h"
|
||||
#include "openmc/tallies/filter_mesh.h"
|
||||
|
||||
namespace openmc {
|
||||
|
||||
class MeshBornFilter : public MeshFilter {
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type_str() const override { return "meshborn"; }
|
||||
FilterType type() const override { return FilterType::MESHBORN; }
|
||||
|
||||
void get_all_bins(const Particle& p, TallyEstimator estimator,
|
||||
FilterMatch& match) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
};
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_TALLIES_FILTER_MESHBORN_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue