Skip to content

Commit

Permalink
Merge pull request #15 from njoy/bugfix/misc
Browse files Browse the repository at this point in the history
Fixes while integrating into NJOY21
  • Loading branch information
jlconlin committed Mar 22, 2021
2 parents 24efb1d + ad862dc commit 665bac1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/RECONR/ENDFtk.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "ENDFtk/tree/Tape.hpp"
#include "ENDFtk/tree/fromFile.hpp"
#include "ENDFtk/file/1.hpp"
#include "ENDFtk/file/2.hpp"
#include "ENDFtk/file/3.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/RECONR/RECONR/ProcessedEvaluation/src/mf1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ auto mf1( const Logger& logger,

double err = sequence[ "err" ];
ENDFtk::section::Type< 1, 451 > mt451(
mt.ZA(), mt.AWR(), mt.LRP(), mt.LFI(), mt.NLIB(), mt.NMOD(),
mt.ZA(), mt.AWR(), 2, /*LRP*/ mt.LFI(), mt.NLIB(), mt.NMOD(),
mt.ELIS(), mt.STA(), mt.LIS(), mt.LISO(), mt.NFOR(),
mt.AWI(), mt.EMAX(), mt.LREL(), mt.NSUB(), mt.NVER(),
mt.TEMP(), mt.LDRV(),
mt.TEMP(), 1, /*LDRV*/
std::move( description ),
std::move( directory ),
err // rtol
Expand Down
4 changes: 2 additions & 2 deletions src/RECONR/RECONR/src/getEvaluated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Format_t getEvaluated( const Logger& logger, std::string filename ){
"\nReading evaluated data from file: {}", filename )
<< std::endl;
try {
auto evaluated = njoy::utility::slurpFileToMemory( filename );
return Format_t{ std::move( evaluated ) };
auto tree = ENDFtk::tree::fromFile( filename );
return tree;
} catch( ... ){
Log::info( "Error ocurred when trying to open evaluated data file: {}.",
filename );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ RPVariant collectRP( const Material_t& material ){

static
RPVariant collectRP( const ENDFMaterial_t& material ){
if( not material.hasFile( 2 ) ){
Log::error( "ENDF file does not have MF=2." );
Log::info( "Unable to proceed---until changes are made." );
}
return material.file( 2 ).section( 151 ).parse< 2, 151 >();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ elementary::ParticleID projectile(
case 10010:
return elementary::ParticleID( elementary::NuclideID( 1, 1, 0 ) );
break;
case 3:
return elementary::ParticleID(
elementary::FundamentalParticleID( "photon" ) );
break;
default:
Log::error( "Failed to create a projectile." );
Log::info( "I don't know how to make a particle ID out of: {}.",
info.NSUB() );
throw std::exception();

}
}

Expand Down

0 comments on commit 665bac1

Please sign in to comment.