From 5daa0ac5862d77b1cedf2991c76fc242f2e64866 Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Mon, 7 Oct 2024 14:26:30 -0600 Subject: [PATCH] Changes following review. --- python/src/depletion.python.cpp | 2 +- .../depletion/Test_NDItk_depletion_ReactionMultiplicities.py | 1 + src/NDItk/depletion/Multiplicities/src/verify.hpp | 2 +- src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp | 2 +- src/NDItk/depletion/ReactionMultiplicities/src/read.hpp | 2 ++ src/NDItk/depletion/ReactionMultiplicities/src/verify.hpp | 1 - .../ReactionMultiplicities/test/ReactionMultiplicities.test.cpp | 1 - 7 files changed, 6 insertions(+), 5 deletions(-) diff --git a/python/src/depletion.python.cpp b/python/src/depletion.python.cpp index dbc5c25..c8c9d11 100644 --- a/python/src/depletion.python.cpp +++ b/python/src/depletion.python.cpp @@ -23,7 +23,7 @@ void wrapDepletion( python::module& module, python::module& viewmodule ) { python::module submodule = module.def_submodule( "depletion", - "Depeltion NDI records and subrecords" + "Depletion NDI records and subrecords" ); depletion::wrapReactionMultiplicityType( submodule, viewmodule ); diff --git a/python/test/depletion/Test_NDItk_depletion_ReactionMultiplicities.py b/python/test/depletion/Test_NDItk_depletion_ReactionMultiplicities.py index ac0ab55..8bd2c3c 100644 --- a/python/test/depletion/Test_NDItk_depletion_ReactionMultiplicities.py +++ b/python/test/depletion/Test_NDItk_depletion_ReactionMultiplicities.py @@ -144,6 +144,7 @@ def verify_chunk_typed( self, chunk ) : # verify the record self.assertEqual( 'rprod_all', chunk.keyword ) + self.assertEqual( ReactionMultiplicityType.All, chunk.type ) self.assertEqual( False, chunk.empty ) self.assertEqual( 12, chunk.size ) diff --git a/src/NDItk/depletion/Multiplicities/src/verify.hpp b/src/NDItk/depletion/Multiplicities/src/verify.hpp index a6eb854..5913823 100644 --- a/src/NDItk/depletion/Multiplicities/src/verify.hpp +++ b/src/NDItk/depletion/Multiplicities/src/verify.hpp @@ -2,7 +2,7 @@ * @brief Verify the cross section data values * * The following verification tests are performed: - * - there are at least three values + * - there are at least two values * - the reaction identifier looks to be an integer * * @param[in] data the data values in the cross section subrecord diff --git a/src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp b/src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp index ee67bc2..68e6784 100644 --- a/src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp +++ b/src/NDItk/depletion/ReactionMultiplicities/src/ctor.hpp @@ -33,7 +33,7 @@ ReactionMultiplicities( ReactionMultiplicityType type, ReactionMultiplicities() : IntegerListRecord( base::Keyword( "rprod" ) ) {} /** - * @brief Default constructor + * @brief Constructor for a multiplicity type */ ReactionMultiplicities( ReactionMultiplicityType type ) : IntegerListRecord( base::Keyword( "rprod", type ) ) {} diff --git a/src/NDItk/depletion/ReactionMultiplicities/src/read.hpp b/src/NDItk/depletion/ReactionMultiplicities/src/read.hpp index 9afd585..971e9eb 100644 --- a/src/NDItk/depletion/ReactionMultiplicities/src/read.hpp +++ b/src/NDItk/depletion/ReactionMultiplicities/src/read.hpp @@ -13,6 +13,7 @@ std::vector< int > data; while ( reactions-- ) { + // read MT number and number of reaction products data.push_back( njoy::tools::disco::FreeFormatInteger::read< int >( iter, end ) ); data.push_back( njoy::tools::disco::FreeFormatInteger::read< int >( iter, end ) ); int number = data.back(); @@ -24,6 +25,7 @@ } else { + // read 2 numbers for each reaction product number *= 2; while ( number-- ) { diff --git a/src/NDItk/depletion/ReactionMultiplicities/src/verify.hpp b/src/NDItk/depletion/ReactionMultiplicities/src/verify.hpp index 5a37db0..fbf0d5c 100644 --- a/src/NDItk/depletion/ReactionMultiplicities/src/verify.hpp +++ b/src/NDItk/depletion/ReactionMultiplicities/src/verify.hpp @@ -3,7 +3,6 @@ * * The following verification tests are performed: * - there is at least one reaction - * - the number of groups for each reaction is the same * * @param[in] reactions the reactions to be verified */ diff --git a/src/NDItk/depletion/ReactionMultiplicities/test/ReactionMultiplicities.test.cpp b/src/NDItk/depletion/ReactionMultiplicities/test/ReactionMultiplicities.test.cpp index c023353..a29051a 100644 --- a/src/NDItk/depletion/ReactionMultiplicities/test/ReactionMultiplicities.test.cpp +++ b/src/NDItk/depletion/ReactionMultiplicities/test/ReactionMultiplicities.test.cpp @@ -214,7 +214,6 @@ void verifyChunk( const ReactionMultiplicities& chunk ) { CHECK( 2 == chunk.reactions()[1].multiplicities()[0] ); CHECK( 1 == chunk.reactions()[1].multiplicities()[1] ); - auto multiplicities = chunk.reaction( 2 ); CHECK( 2 == chunk.reaction( 2 ).identifier() ); CHECK( 2 == chunk.reaction( 2 ).numberReactionProducts() ); CHECK( 1 == chunk.reaction( 2 ).reactionProducts()[0] );