mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Add comments in filter headers
This commit is contained in:
parent
6984b695c0
commit
26a0d7d972
20 changed files with 247 additions and 29 deletions
|
|
@ -17,8 +17,14 @@ namespace openmc {
|
|||
class AzimuthalFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~AzimuthalFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "azimuthal";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -26,12 +32,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<double> bins_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,14 @@ namespace openmc {
|
|||
class CellFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~CellFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "cell";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -27,12 +33,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_cells(gsl::span<int32_t> cells);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_cells(gsl::span<int32_t> cells);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! The indices of the cells binned by this filter.
|
||||
std::vector<int32_t> cells_;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ namespace openmc {
|
|||
class CellbornFilter : public CellFilter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "cellborn";}
|
||||
|
||||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ namespace openmc {
|
|||
class CellFromFilter : public CellFilter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "cellfrom";}
|
||||
|
||||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,14 @@ namespace openmc {
|
|||
class DelayedGroupFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~DelayedGroupFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "delayedgroup";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -28,12 +34,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_groups(gsl::span<int> groups);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_groups(gsl::span<int> groups);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<int> groups_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,14 @@ namespace openmc {
|
|||
class DistribcellFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~DistribcellFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "distribcell";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -23,12 +29,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_cell(int32_t cell);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_cell(int32_t cell);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
int32_t cell_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@ namespace openmc {
|
|||
class EnergyFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~EnergyFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "energy";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -25,12 +31,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_bins(gsl::span<const double> bins);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_bins(gsl::span<const double> bins);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<double> bins_;
|
||||
|
||||
//! True if transport group number can be used directly to get bin number
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ namespace openmc {
|
|||
class EnergyFunctionFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
EnergyFunctionFilter()
|
||||
: Filter {}
|
||||
{
|
||||
|
|
@ -23,6 +26,9 @@ public:
|
|||
|
||||
~EnergyFunctionFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "energyfunction";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -34,6 +40,9 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! Incident neutron energy interpolation grid.
|
||||
std::vector<double> energy_;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,14 @@ namespace openmc {
|
|||
class LegendreFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~LegendreFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "legendre";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -23,12 +29,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_order(int order);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_order(int order);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
int order_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,14 @@ namespace openmc {
|
|||
class MaterialFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~MaterialFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "material";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -31,7 +37,9 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
std::vector<int32_t>& materials() { return materials_; }
|
||||
|
||||
const std::vector<int32_t>& materials() const { return materials_; }
|
||||
|
|
@ -39,6 +47,9 @@ public:
|
|||
void set_materials(gsl::span<const int32_t> materials);
|
||||
|
||||
private:
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! The indices of the materials binned by this filter.
|
||||
std::vector<int32_t> materials_;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@ namespace openmc {
|
|||
class MeshFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~MeshFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "mesh";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -29,11 +35,17 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
virtual int32_t mesh() const {return mesh_;}
|
||||
|
||||
virtual void set_mesh(int32_t mesh);
|
||||
|
||||
protected:
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
int32_t mesh_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ namespace openmc {
|
|||
class MeshSurfaceFilter : public MeshFilter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "meshsurface";}
|
||||
|
||||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
|
|
@ -15,6 +18,9 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_mesh(int32_t mesh) override;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,14 @@ namespace openmc {
|
|||
class MuFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~MuFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "mu";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -26,12 +32,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<double> bins_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,14 @@ namespace openmc {
|
|||
class ParticleFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~ParticleFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "particle";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -24,12 +30,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_particles(gsl::span<Particle::Type> particles);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_particles(gsl::span<Particle::Type> particles);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<Particle::Type> particles_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,14 @@ namespace openmc {
|
|||
class PolarFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~PolarFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "polar";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -26,12 +32,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_bins(gsl::span<double> bins);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
std::vector<double> bins_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,14 @@ enum class SphericalHarmonicsCosine {
|
|||
class SphericalHarmonicsFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~SphericalHarmonicsFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "sphericalharmonics";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -29,13 +35,19 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_order(int order);
|
||||
|
||||
void set_cosine(gsl::cstring_span cosine);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
int order_;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,14 @@ enum class LegendreAxis {
|
|||
class SpatialLegendreFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~SpatialLegendreFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "spatiallegendre";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -27,15 +33,21 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_order(int order);
|
||||
|
||||
void set_axis(LegendreAxis axis);
|
||||
|
||||
void set_minmax(double min, double max);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
int order_;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,14 @@ namespace openmc {
|
|||
class SurfaceFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~SurfaceFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "surface";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -27,12 +33,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_surfaces(gsl::span<int32_t> surfaces);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_surfaces(gsl::span<int32_t> surfaces);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! The indices of the surfaces binned by this filter.
|
||||
std::vector<int32_t> surfaces_;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,14 @@ namespace openmc {
|
|||
class UniverseFilter : public Filter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~UniverseFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "universe";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
|
@ -27,12 +33,18 @@ public:
|
|||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
const override;
|
||||
|
||||
void set_universes(gsl::span<int32_t> universes);
|
||||
|
||||
void to_statepoint(hid_t filter_group) const override;
|
||||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_universes(gsl::span<int32_t> universes);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! The indices of the universes binned by this filter.
|
||||
std::vector<int32_t> universes_;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,16 @@ namespace openmc {
|
|||
class ZernikeFilter : public Filter
|
||||
{
|
||||
public:
|
||||
std::string type() const override {return "zernike";}
|
||||
//----------------------------------------------------------------------------
|
||||
// Constructors, destructors
|
||||
|
||||
~ZernikeFilter() = default;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "zernike";}
|
||||
|
||||
void from_xml(pugi::xml_node node) override;
|
||||
|
||||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
|
|
@ -27,10 +33,16 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
int order() const {return order_;}
|
||||
|
||||
virtual void set_order(int order);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Data members
|
||||
|
||||
//! Cartesian x coordinate for the origin of this expansion.
|
||||
double x_;
|
||||
|
||||
|
|
@ -51,6 +63,9 @@ protected:
|
|||
class ZernikeRadialFilter : public ZernikeFilter
|
||||
{
|
||||
public:
|
||||
//----------------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
std::string type() const override {return "zernikeradial";}
|
||||
|
||||
void get_all_bins(const Particle* p, int estimator, FilterMatch& match)
|
||||
|
|
@ -58,6 +73,9 @@ public:
|
|||
|
||||
std::string text_label(int bin) const override;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Accessors
|
||||
|
||||
void set_order(int order) override;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue