diff --git a/include/openmc/tallies/filter_azimuthal.h b/include/openmc/tallies/filter_azimuthal.h index f753bb280..1761c01bc 100644 --- a/include/openmc/tallies/filter_azimuthal.h +++ b/include/openmc/tallies/filter_azimuthal.h @@ -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 bins); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_bins(gsl::span bins); + + //---------------------------------------------------------------------------- + // Data members + std::vector bins_; }; diff --git a/include/openmc/tallies/filter_cell.h b/include/openmc/tallies/filter_cell.h index eb3ff5236..9c40d4259 100644 --- a/include/openmc/tallies/filter_cell.h +++ b/include/openmc/tallies/filter_cell.h @@ -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 cells); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_cells(gsl::span cells); + + //---------------------------------------------------------------------------- + // Data members + //! The indices of the cells binned by this filter. std::vector cells_; diff --git a/include/openmc/tallies/filter_cellborn.h b/include/openmc/tallies/filter_cellborn.h index 400e82c28..706f6c47a 100644 --- a/include/openmc/tallies/filter_cellborn.h +++ b/include/openmc/tallies/filter_cellborn.h @@ -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) diff --git a/include/openmc/tallies/filter_cellfrom.h b/include/openmc/tallies/filter_cellfrom.h index bd3e08dcb..e86e34854 100644 --- a/include/openmc/tallies/filter_cellfrom.h +++ b/include/openmc/tallies/filter_cellfrom.h @@ -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) diff --git a/include/openmc/tallies/filter_delayedgroup.h b/include/openmc/tallies/filter_delayedgroup.h index ae2ad0cb4..044e27944 100644 --- a/include/openmc/tallies/filter_delayedgroup.h +++ b/include/openmc/tallies/filter_delayedgroup.h @@ -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 groups); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_groups(gsl::span groups); + + //---------------------------------------------------------------------------- + // Data members + std::vector groups_; }; diff --git a/include/openmc/tallies/filter_distribcell.h b/include/openmc/tallies/filter_distribcell.h index db4cd4b1a..7768af590 100644 --- a/include/openmc/tallies/filter_distribcell.h +++ b/include/openmc/tallies/filter_distribcell.h @@ -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_; }; diff --git a/include/openmc/tallies/filter_energy.h b/include/openmc/tallies/filter_energy.h index b2123d7e7..277357cdf 100644 --- a/include/openmc/tallies/filter_energy.h +++ b/include/openmc/tallies/filter_energy.h @@ -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 bins); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_bins(gsl::span bins); + + //---------------------------------------------------------------------------- + // Data members + std::vector bins_; //! True if transport group number can be used directly to get bin number diff --git a/include/openmc/tallies/filter_energyfunc.h b/include/openmc/tallies/filter_energyfunc.h index 6f5182626..4024b06db 100644 --- a/include/openmc/tallies/filter_energyfunc.h +++ b/include/openmc/tallies/filter_energyfunc.h @@ -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 energy_; diff --git a/include/openmc/tallies/filter_legendre.h b/include/openmc/tallies/filter_legendre.h index 25cf99e15..9e1f32003 100644 --- a/include/openmc/tallies/filter_legendre.h +++ b/include/openmc/tallies/filter_legendre.h @@ -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_; }; diff --git a/include/openmc/tallies/filter_material.h b/include/openmc/tallies/filter_material.h index 97d0b2f8d..65cf832a3 100644 --- a/include/openmc/tallies/filter_material.h +++ b/include/openmc/tallies/filter_material.h @@ -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& materials() { return materials_; } const std::vector& materials() const { return materials_; } @@ -39,6 +47,9 @@ public: void set_materials(gsl::span materials); private: + //---------------------------------------------------------------------------- + // Data members + //! The indices of the materials binned by this filter. std::vector materials_; diff --git a/include/openmc/tallies/filter_mesh.h b/include/openmc/tallies/filter_mesh.h index a6caa8f56..98dec5d50 100644 --- a/include/openmc/tallies/filter_mesh.h +++ b/include/openmc/tallies/filter_mesh.h @@ -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_; }; diff --git a/include/openmc/tallies/filter_meshsurface.h b/include/openmc/tallies/filter_meshsurface.h index 32393cfac..19d178c7f 100644 --- a/include/openmc/tallies/filter_meshsurface.h +++ b/include/openmc/tallies/filter_meshsurface.h @@ -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; }; diff --git a/include/openmc/tallies/filter_mu.h b/include/openmc/tallies/filter_mu.h index 06044e760..16af26be7 100644 --- a/include/openmc/tallies/filter_mu.h +++ b/include/openmc/tallies/filter_mu.h @@ -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 bins); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_bins(gsl::span bins); + + //---------------------------------------------------------------------------- + // Data members + std::vector bins_; }; diff --git a/include/openmc/tallies/filter_particle.h b/include/openmc/tallies/filter_particle.h index 05e3d0505..d718ad8b5 100644 --- a/include/openmc/tallies/filter_particle.h +++ b/include/openmc/tallies/filter_particle.h @@ -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 particles); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_particles(gsl::span particles); + + //---------------------------------------------------------------------------- + // Data members + std::vector particles_; }; diff --git a/include/openmc/tallies/filter_polar.h b/include/openmc/tallies/filter_polar.h index 93488e5b0..25c8c13ac 100644 --- a/include/openmc/tallies/filter_polar.h +++ b/include/openmc/tallies/filter_polar.h @@ -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 bins); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_bins(gsl::span bins); + + //---------------------------------------------------------------------------- + // Data members + std::vector bins_; }; diff --git a/include/openmc/tallies/filter_sph_harm.h b/include/openmc/tallies/filter_sph_harm.h index 522e89e78..fbb572212 100644 --- a/include/openmc/tallies/filter_sph_harm.h +++ b/include/openmc/tallies/filter_sph_harm.h @@ -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_; diff --git a/include/openmc/tallies/filter_sptl_legendre.h b/include/openmc/tallies/filter_sptl_legendre.h index c65bb0cfc..642aaf00a 100644 --- a/include/openmc/tallies/filter_sptl_legendre.h +++ b/include/openmc/tallies/filter_sptl_legendre.h @@ -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_; diff --git a/include/openmc/tallies/filter_surface.h b/include/openmc/tallies/filter_surface.h index 61b320ad6..7f8607225 100644 --- a/include/openmc/tallies/filter_surface.h +++ b/include/openmc/tallies/filter_surface.h @@ -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 surfaces); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_surfaces(gsl::span surfaces); + + //---------------------------------------------------------------------------- + // Data members + //! The indices of the surfaces binned by this filter. std::vector surfaces_; diff --git a/include/openmc/tallies/filter_universe.h b/include/openmc/tallies/filter_universe.h index 0b43bb85c..a315df076 100644 --- a/include/openmc/tallies/filter_universe.h +++ b/include/openmc/tallies/filter_universe.h @@ -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 universes); - void to_statepoint(hid_t filter_group) const override; std::string text_label(int bin) const override; + //---------------------------------------------------------------------------- + // Accessors + + void set_universes(gsl::span universes); + + //---------------------------------------------------------------------------- + // Data members + //! The indices of the universes binned by this filter. std::vector universes_; diff --git a/include/openmc/tallies/filter_zernike.h b/include/openmc/tallies/filter_zernike.h index 19fff1336..833422bf4 100644 --- a/include/openmc/tallies/filter_zernike.h +++ b/include/openmc/tallies/filter_zernike.h @@ -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; };