Skip to content

Commit

Permalink
Fix warning about missing low-energy cross sections (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
amandalund committed Apr 4, 2024
1 parent a5d7bd3 commit 08d31d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/celeritas/io/LivermorePEReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ LivermorePEReader::operator()(AtomicNumber atomic_number) const
infile >> result.xs_lo.x[i] >> result.xs_lo.y[i];
}
}
else if (atomic_number <= AtomicNumber{2})
else if (atomic_number > AtomicNumber{2})
{
// Total cross sections below the K-shell energy aren't present for
// elements with only one subshell, but if another element is
Expand Down
4 changes: 4 additions & 0 deletions test/celeritas/ext/GeantImporter.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "celeritas_cmake_strings.h"
#include "celeritas_config.h"
#include "corecel/ScopedLogStorer.hh"
#include "corecel/io/Logger.hh"
#include "corecel/io/Repr.hh"
#include "corecel/io/StringUtils.hh"
#include "corecel/sys/Version.hh"
Expand Down Expand Up @@ -879,7 +881,9 @@ TEST_F(FourSteelSlabsEmStandard, sb_data)
//---------------------------------------------------------------------------//
TEST_F(FourSteelSlabsEmStandard, livermore_pe_data)
{
ScopedLogStorer scoped_log{&celeritas::world_logger(), LogLevel::warning};
auto&& import_data = this->imported_data();
EXPECT_TRUE(scoped_log.empty()) << scoped_log;

auto const& lpe_map = import_data.livermore_pe_data;
EXPECT_EQ(4, lpe_map.size());
Expand Down

0 comments on commit 08d31d6

Please sign in to comment.