Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit faed8a2

Browse files
committedDec 5, 2024
Correcting how MF27 MT505 and MT506 are interpreted (inversed use)
1 parent 74a28c4 commit faed8a2

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed
 

‎src/dryad/format/endf/createReactionProducts.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ namespace endf {
9696
auto section = material.section( 27, mt ).parse< 27 >();
9797
std::optional< ENDFtk::section::Type< 27 > > real = std::nullopt;
9898
std::optional< ENDFtk::section::Type< 27 > > imaginary = std::nullopt;
99-
if ( material.hasSection( 27, 505 ) ) { real = material.section( 27, 505 ).parse< 27 >(); }
100-
if ( material.hasSection( 27, 506 ) ) { imaginary = material.section( 27, 506 ).parse< 27 >(); }
99+
if ( material.hasSection( 27, 506 ) ) { real = material.section( 27, 506 ).parse< 27 >(); }
100+
if ( material.hasSection( 27, 505 ) ) { imaginary = material.section( 27, 505 ).parse< 27 >(); }
101101
products.emplace_back( createReactionProduct( projectile, target, section, real, imaginary, mt ) );
102102
break;
103103
}

‎src/dryad/format/endf/test/createReactionProduct.test.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ SCENARIO( "createReactionProduct" ) {
6060
THEN( "a Reaction can be created" ) {
6161

6262
auto coherent = tape.materials().front().section( 27, 502 ).parse< 27 >();
63-
auto real = std::make_optional( tape.materials().front().section( 27, 505 ).parse< 27 >() );
64-
auto imaginary = std::make_optional( tape.materials().front().section( 27, 506 ).parse< 27 >() );
63+
auto real = std::make_optional( tape.materials().front().section( 27, 506 ).parse< 27 >() );
64+
auto imaginary = std::make_optional( tape.materials().front().section( 27, 505 ).parse< 27 >() );
6565
auto incoherent = tape.materials().front().section( 27, 504 ).parse< 27 >();
6666

6767
id::ParticleID projectile( "g" );
@@ -320,9 +320,9 @@ void verifyPhotonCoherentProduct( const ReactionProduct& chunk ) {
320320
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
321321
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
322322
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
323-
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
324-
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
325-
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
323+
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
324+
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
325+
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
326326
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
327327
CHECK( 296 == factor.boundaries()[0] );
328328
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );
@@ -340,9 +340,9 @@ void verifyPhotonCoherentProduct( const ReactionProduct& chunk ) {
340340
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
341341
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
342342
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
343-
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
344-
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
345-
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
343+
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
344+
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
345+
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
346346
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
347347
CHECK( 296 == factor.boundaries()[0] );
348348
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );

‎src/dryad/format/endf/test/createReactionProducts.test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ void verifyPhotonCoherentProduct( const ReactionProduct& chunk ) {
226226
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
227227
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
228228
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
229-
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
230-
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
231-
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
229+
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
230+
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
231+
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
232232
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
233233
CHECK( 296 == factor.boundaries()[0] );
234234
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );
@@ -246,9 +246,9 @@ void verifyPhotonCoherentProduct( const ReactionProduct& chunk ) {
246246
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
247247
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
248248
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
249-
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
250-
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
251-
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
249+
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
250+
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
251+
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
252252
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
253253
CHECK( 296 == factor.boundaries()[0] );
254254
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );

‎src/dryad/format/endf/test/test_verification_functions.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,9 @@ void verifyPhotonCoherentReaction( const Reaction& coherent ) {
798798
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
799799
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
800800
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
801-
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
802-
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
803-
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
801+
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
802+
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
803+
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
804804
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
805805
CHECK( 296 == factor.boundaries()[0] );
806806
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );
@@ -818,9 +818,9 @@ void verifyPhotonCoherentReaction( const Reaction& coherent ) {
818818
CHECK_THAT( 2. , WithinRel( factor.energies()[1] ) );
819819
CHECK_THAT( 9549925.86, WithinRel( factor.energies()[295] ) );
820820
CHECK_THAT( 1e+7 , WithinRel( factor.energies()[296] ) );
821-
CHECK_THAT( -1.00260813, WithinRel( factor.values()[0] ) );
822-
CHECK_THAT( -1.01054501, WithinRel( factor.values()[1] ) );
823-
CHECK_THAT( 2.8024E-11, WithinRel( factor.values()[295] ) );
821+
CHECK_THAT( 0. , WithinRel( factor.values()[0] ) );
822+
CHECK_THAT( 0. , WithinRel( factor.values()[1] ) );
823+
CHECK_THAT( 8.9767E-15, WithinRel( factor.values()[295] ) );
824824
CHECK_THAT( 0. , WithinRel( factor.values()[296] ) );
825825
CHECK( 296 == factor.boundaries()[0] );
826826
CHECK( InterpolationType::LinearLinear == factor.interpolants()[0] );

0 commit comments

Comments
 (0)