Commit 5d6967cb authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Adding unit test on DecayDb.

parent 3476c8de
......@@ -13470,13 +13470,13 @@ float DecayDb::calculate_activity(int zaid, float lp_abundance,
const auto& fp_it = mFissionProduct.find(zaid);
float activity = 0.0f;
if (std::fabs(lp_abundance) > 1e-23 && lp_it != mActivation.end() &&
if (std::fabs(lp_abundance) > 1e-45f && lp_it != mActivation.end() &&
lp_it->second.halflife > 0.f)
activity += lp_abundance / lp_it->second.halflife;
if (std::fabs(ap_abundance) > 1e-23 && ac_it != mActinide.end() &&
if (std::fabs(ap_abundance) > 1e-45f && ac_it != mActinide.end() &&
ac_it->second.halflife > 0.f)
activity += ap_abundance / ac_it->second.halflife;
if (std::fabs(fp_abundance) > 1e-23 && fp_it != mFissionProduct.end() &&
if (std::fabs(fp_abundance) > 1e-45f && fp_it != mFissionProduct.end() &&
fp_it->second.halflife > 0.f)
activity += fp_abundance / fp_it->second.halflife;
activity = activity * avogadro * lntwo / curie;
......
......@@ -185,38 +185,38 @@ bool F71Stream::read_case(f71case_type& inventory)
std::vector<float> spectrum_fp((size_t(l3)));
mStream >> spectrum_fp;
std::vector<float> energy_bounds(ng + 1);
std::vector<float> energy_bounds((size_t(ng + 1)));
mStream >> energy_bounds;
std::vector<float> dsav(ng);
std::vector<float> dsav((size_t(ng)));
mStream >> dsav;
std::vector<float> esav(ng);
std::vector<float> esav((size_t(ng)));
mStream >> esav;
// photon spectrum title
std::string itsav = trim_string(mStream.readString(80));
// values of total neutron spectrum in neutron/s
std::vector<float> spnnuc(l4);
std::vector<float> spnnuc((size_t(l4)));
mStream >> spnnuc;
std::vector<float> alpnuc(l4);
std::vector<float> alpnuc((size_t(l4)));
mStream >> alpnuc;
// values of total neutron spectrum in neutrons/s
std::vector<float> spneut(ngrp);
std::vector<float> spneut((size_t(ngrp)));
mStream >> spneut;
// values of (alpha,n) spectrum in neutrons/s
std::vector<float> specan(ngrp);
std::vector<float> specan((size_t(ngrp)));
mStream >> specan;
// values of spontaneous fission neutron spectrum in neutrons/s
std::vector<float> specsp(ngrp);
std::vector<float> specsp((size_t(ngrp)));
mStream >> specsp;
std::vector<float> eneuts(ngrp + 1);
std::vector<float> eneuts((size_t(ngrp + 1)));
mStream >> eneuts;
// read end of record
......
......@@ -4,4 +4,5 @@ ADD_GOOGLE_TEST(tstCSVFile.cc NP 1)
ADD_GOOGLE_TEST(tstCFGFile.cc NP 1)
ADD_GOOGLE_TEST(tstEafstream.cc NP 1)
ADD_GOOGLE_TEST(tstF71Stream.cc NP 1)
ADD_GOOGLE_TEST(tstDecayDb.cc NP 1)
ADD_GOOGLE_TEST(tstHysplitCDump.cc NP 1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment