Skip to content

Commit

Permalink
More changes due to review
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Oct 7, 2024
1 parent 5daa0ac commit ed43167
Show file tree
Hide file tree
Showing 31 changed files with 64 additions and 36 deletions.
3 changes: 2 additions & 1 deletion python/src/multigroup/FissionNeutronMultiplicity.python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void wrapFissionNeutronMultiplicity( python::module& module, python::module& ) {
"Initialise the record\n\n"
"Arguments:\n"
" self the record\n"
" type the fission type (prompt, delayed or total)\n"
" values the fission neutron multiplicity values"
)
.def_property_readonly(
Expand All @@ -63,7 +64,7 @@ void wrapFissionNeutronMultiplicity( python::module& module, python::module& ) {
"record\n\n"
"Arguments:\n"
" string the string representing the record\n"
" number the fission neutron multiplicity values"
" number the number of groups"
);

// add standard record definitions
Expand Down
3 changes: 2 additions & 1 deletion python/src/multigroup/FissionNeutronProduction.python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void wrapFissionNeutronProduction( python::module& module, python::module& ) {
"Initialise the record\n\n"
"Arguments:\n"
" self the record\n"
" type the fission type (prompt, delayed or total)\n"
" values the fission neutron production values"
)
.def_property_readonly(
Expand All @@ -63,7 +64,7 @@ void wrapFissionNeutronProduction( python::module& module, python::module& ) {
"record\n\n"
"Arguments:\n"
" string the string representing the record\n"
" number the fission neutron production values"
" number the number of groups"
);

// add standard record definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void wrapFissionNeutronSpectrumMatrix( python::module& module, python::module& )
"Initialise the record\n\n"
"Arguments:\n"
" self the record\n"
" type the fission type (prompt, delayed or total)\n"
" values the fission neutron spectrum matrix values"
)
.def_property_readonly(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void wrapFissionNeutronSpectrumVector( python::module& module, python::module& )
"Initialise the record\n\n"
"Arguments:\n"
" self the record\n"
" type the fission type (prompt, delayed or total)\n"
" values the fission neutron spectrum vector values"
)
.def_property_readonly(
Expand Down
16 changes: 8 additions & 8 deletions src/NDItk/MultigroupTable/src/verify.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ void verify() {
// secondary particles
if ( this->metadata().numberOutgoingParticles().has_value() ) {

const auto types = this->metadata().numberOutgoingParticles().value();
if ( types > 0 ) {
const auto number = this->metadata().numberOutgoingParticles().value();
if ( number > 0 ) {

if ( ( this->outgoingParticleTypes().numberOutgoingParticles() != types ) ||
( ! this->outgoingParticleTransportData().empty() && this->outgoingParticleTransportData().numberOutgoingParticles() != types ) ||
( this->outgoing_structure_.size() && this->outgoing_structure_.size() != types ) ||
( this->outgoing_production_.size() && this->outgoing_production_.size() != types ) ||
( this->outgoing_heating_.size() && this->outgoing_heating_.size() != types ) ||
( this->outgoing_kerma_.size() && this->outgoing_kerma_.size() != types ) ) {
if ( ( this->outgoingParticleTypes().numberOutgoingParticles() != number ) ||
( ! this->outgoingParticleTransportData().empty() && this->outgoingParticleTransportData().numberOutgoingParticles() != number ) ||
( this->outgoing_structure_.size() && this->outgoing_structure_.size() != number ) ||
( this->outgoing_production_.size() && this->outgoing_production_.size() != number ) ||
( this->outgoing_heating_.size() && this->outgoing_heating_.size() != number ) ||
( this->outgoing_kerma_.size() && this->outgoing_kerma_.size() != number ) ) {

Log::error( "Found inconsistent number of outgoing particle types across the table" );
Log::info( "Number of outgoing particles in the metadata: {}",
Expand Down
3 changes: 3 additions & 0 deletions src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ ReactionMultiplicities() : IntegerListRecord( base::Keyword( "rprod" ) ) {}

/**
* @brief Constructor for a multiplicity type
*
* @param[in] type the multiplicity type (all, few or rmo)
*/
ReactionMultiplicities( ReactionMultiplicityType type ) :
IntegerListRecord( base::Keyword( "rprod", type ) ) {}

/**
* @brief Constructor
*
* @param[in] type the multiplicity type (all, few or rmo)
* @param[in] multiplicities the multiplicity data
*/
ReactionMultiplicities( std::vector< Multiplicities > multiplicities ) :
Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/AverageFissionEnergyRelease.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace multigroup {

/**
* @brief An average fission energy release record for multigroup
* neutron and photon data
* neutron data
*/
class AverageFissionEnergyRelease : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/CrossSection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A cross section subrecord for multigroup neutron and photon data
* @brief A cross section subrecord for multigroup neutron data
*/
class CrossSection : protected base::SubListRecord< CrossSection, double > {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/EnergyGroupStructure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief An energy group structure record for multigroup neutron and photon data
* @brief An energy group structure record for multigroup neutron data
*
* This corresponds to an e_bounds or e_bounds_x record for the primary
* energy boundaries or outgoing particle energy boundaries.
Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/FissionNeutronMultiplicity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A fission neutron multiplicity record for multigroup neutron and photon data
* @brief A fission neutron multiplicity record for multigroup neutron data
*/
class FissionNeutronMultiplicity : protected base::RealListRecord {

Expand Down
5 changes: 4 additions & 1 deletion src/NDItk/multigroup/FissionNeutronMultiplicity/src/ctor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
FissionNeutronMultiplicity() : RealListRecord( base::Keyword( "nu" ) ) {}

/**
* @brief Default constructor
* @brief Constructor for a fission type
*
* @param[in] type the fission type (prompt, delayed or total)
*/
FissionNeutronMultiplicity( FissionType type ) : RealListRecord( base::Keyword( "nu", type ) ) {}

/**
* @brief Constructor
*
* @param[in] type the fission type (prompt, delayed or total)
* @param[in] values the fission neutron multiplicity values
*/
FissionNeutronMultiplicity( FissionType type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ SCENARIO( "FissionNeutronMultiplicity" ) {

GIVEN( "invalid data for a FissionNeutronMultiplicity instance" ) {

WHEN( "the number of weight values is insufficient" ) {
WHEN( "the number of multiplicity values is insufficient" ) {

THEN( "an exception is thrown" ) {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/FissionNeutronProduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A fission neutron production record for multigroup neutron and photon data
* @brief A fission neutron production record for multigroup neutron data
*/
class FissionNeutronProduction : protected base::RealListRecord {

Expand Down
5 changes: 4 additions & 1 deletion src/NDItk/multigroup/FissionNeutronProduction/src/ctor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
FissionNeutronProduction() : RealListRecord( base::Keyword( "nu_sig_f" ) ) {}

/**
* @brief Default constructor
* @brief Constructor for a fission type
*
* @param[in] type the fission type (prompt, delayed or total)
*/
FissionNeutronProduction( FissionType type ) : RealListRecord( base::Keyword( "nu_sig_f", type ) ) {}

/**
* @brief Constructor
*
* @param[in] type the fission type (prompt, delayed or total)
* @param[in] values the fission neutron production values
*/
FissionNeutronProduction( FissionType type,
Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/FissionNeutronSpectrumMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A fission neutron spectrum matrix record for multigroup neutron and photon data
* @brief A fission neutron spectrum matrix record for multigroup neutron data
*/
class FissionNeutronSpectrumMatrix : protected base::RealListRecord {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
FissionNeutronSpectrumMatrix() : RealListRecord( base::Keyword( "chi_mat" ) ) {}

/**
* @brief Default constructor
* @brief Constructor for a fission type
*
* @param[in] type the fission type (prompt, delayed or total)
*/
FissionNeutronSpectrumMatrix( FissionType type ) : RealListRecord( base::Keyword( "chi_mat", type ) ) {}

/**
* @brief Constructor
*
* @param[in] type the fission type (prompt, delayed or total)
* @param[in] values the fission neutron spectrum matrix values
*/
FissionNeutronSpectrumMatrix( FissionType type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* The following verification tests are performed:
* - there is at least one value
* - verify matrix size
*
* @param[in] values the production values to be verified
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ SCENARIO( "FissionNeutronSpectrumMatrix" ) {

GIVEN( "invalid data for a FissionNeutronSpectrumMatrix instance" ) {

WHEN( "the number of weight values is insufficient" ) {
WHEN( "the number of matrix values is insufficient" ) {

THEN( "an exception is thrown" ) {

Expand All @@ -88,6 +88,16 @@ SCENARIO( "FissionNeutronSpectrumMatrix" ) {
} // THEN
} // WHEN

WHEN( "the matrix is not square" ) {

THEN( "an exception is thrown" ) {

std::vector< double > three = { 1., 2., 3. };

CHECK_THROWS( FissionNeutronSpectrumMatrix( FissionType::Prompt, std::move( three ) ) );
} // THEN
} // WHEN

WHEN( "reading the data of the record and the number of "
"values is insufficient" ) {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/FissionNeutronSpectrumVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A fission neutron spectrum vector record for multigroup neutron and photon data
* @brief A fission neutron spectrum vector record for multigroup neutron data
*/
class FissionNeutronSpectrumVector : protected base::RealListRecord {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
FissionNeutronSpectrumVector() : RealListRecord( base::Keyword( "chi_vec" ) ) {}

/**
* @brief Default constructor
* @brief Constructor for a fission type
*
* @param[in] type the fission type (prompt, delayed or total)
*/
FissionNeutronSpectrumVector( FissionType type ) : RealListRecord( base::Keyword( "chi_vec", type ) ) {}

/**
* @brief Constructor
*
* @param[in] type the fission type (prompt, delayed or total)
* @param[in] values the fission neutron spectrum vector values
*/
FissionNeutronSpectrumVector( FissionType type,
Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/FluxWeights.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A flux weight record for multigroup neutron and photon data
* @brief A flux weight record for multigroup neutron data
*/
class FluxWeights : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/HeatingNumbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A heating numbers record for multigroup neutron and photon data
* @brief A heating numbers record for multigroup neutron data
*/
class HeatingNumbers : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/Kerma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A kerma record for multigroup neutron and photon data
* @brief A kerma record for multigroup neutron data
*/
class Kerma : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/LegendreMoment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A Legendre moment subrecord for multigroup neutron and photon data
* @brief A Legendre moment subrecord for multigroup neutron data
*/
class LegendreMoment : protected base::SubListRecord< LegendreMoment, double > {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief Metadata associated with multigroup neutron and photon data
* @brief Metadata associated with multigroup neutron data
*/
class Metadata {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/OutgoingParticleTransportData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief An outgoing particle type record for multigroup neutron and photon data
* @brief An outgoing particle type record for multigroup neutron data
*/
class OutgoingParticleTransportData : protected base::StringListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/OutgoingParticleTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief An outgoing particle type record for multigroup neutron and photon data
* @brief An outgoing particle type record for multigroup neutron data
*/
class OutgoingParticleTypes : protected base::IntegerListRecord {

Expand Down
3 changes: 1 addition & 2 deletions src/NDItk/multigroup/ReactionCrossSections.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A reaction cross section record for multigroup neutron and photon
* data
* @brief A reaction cross section record for multigroup neutron data
*/
class ReactionCrossSections : protected base::RealListRecord {

Expand Down
3 changes: 1 addition & 2 deletions src/NDItk/multigroup/ScatteringMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A scattering matrix record for multigroup neutron and photon
* data
* @brief A scattering matrix record for multigroup neutron data
*/
class ScatteringMatrix : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/TotalCrossSection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A total cross section record for multigroup neutron and photon data
* @brief A total cross section record for multigroup neutron data
*/
class TotalCrossSection : protected base::RealListRecord {

Expand Down
2 changes: 1 addition & 1 deletion src/NDItk/multigroup/Velocities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace NDItk {
namespace multigroup {

/**
* @brief A velocity record for multigroup neutron and photon data
* @brief A velocity record for multigroup neutron data
*/
class Velocities : protected base::RealListRecord {

Expand Down

0 comments on commit ed43167

Please sign in to comment.