Implement filter for cosine of angle of surface crossing (#2768)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Zoe Prieto 2024-10-04 02:07:03 -03:00 committed by GitHub
parent 1a520c9f4d
commit c285a2c4ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 254 additions and 6 deletions

View file

@ -36,6 +36,7 @@ enum class FilterType {
MESHBORN,
MESH_SURFACE,
MU,
MUSURFACE,
PARTICLE,
POLAR,
SPHERICAL_HARMONICS,

View file

@ -40,7 +40,7 @@ public:
void set_bins(gsl::span<double> bins);
private:
protected:
//----------------------------------------------------------------------------
// Data members

View file

@ -0,0 +1,34 @@
#ifndef OPENMC_TALLIES_FILTER_MU_SURFACE_H
#define OPENMC_TALLIES_FILTER_MU_SURFACE_H
#include <gsl/gsl-lite.hpp>
#include "openmc/tallies/filter_mu.h"
#include "openmc/vector.h"
namespace openmc {
//==============================================================================
//! Bins the incoming-outgoing direction cosine. This is only used for surface
//! crossings.
//==============================================================================
class MuSurfaceFilter : public MuFilter {
public:
//----------------------------------------------------------------------------
// Constructors, destructors
~MuSurfaceFilter() = default;
//----------------------------------------------------------------------------
// Methods
std::string type_str() const override { return "musurface"; }
FilterType type() const override { return FilterType::MUSURFACE; }
void get_all_bins(const Particle& p, TallyEstimator estimator,
FilterMatch& match) const override;
};
} // namespace openmc
#endif // OPENMC_TALLIES_FILTER_MU_SURFACE_H