Commit 86811052 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Updating decaydb to rev07.

parent 5a034102
Pipeline #117923 failed with stages
in 79 minutes and 4 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -4,6 +4,7 @@
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include "radixcore/visibility.hh"
......@@ -63,7 +64,7 @@ struct DecayDBEntry
guides for continuous ingestion (from water) and inhalation (from air) in
unrestricted areas, in units of curies per cubic meter (Ci m ). -3 The RCG
values, as defined in the pre-1991 version of Part 10, Title 20, of the Code
of Federal Regulations16 (10CFR20), specify the maximum permissible
of Federal Regulations 16 (10CFR20), specify the maximum permissible
concentrations of an isotope in soluble and insoluble forms, for both
ingestion and inhalation, and for occupational and unrestricted exposure.
When the activity (in curies) of a given isotope is divided by WMPC (or
......@@ -80,7 +81,7 @@ struct DecayDBEntry
guides for continuous ingestion (from water) and inhalation (from air) in
unrestricted areas, in units of curies per cubic meter (Ci m ). -3 The RCG
values, as defined in the pre-1991 version of Part 10, Title 20, of the Code
of Federal Regulations16 (10CFR20), specify the maximum permissible
of Federal Regulations 16 (10CFR20), specify the maximum permissible
concentrations of an isotope in soluble and insoluble forms, for both
ingestion and inhalation, and for occupational and unrestricted exposure.
When the activity (in curies) of a given isotope is divided by WMPC (or
......@@ -111,10 +112,15 @@ struct DecayDBEntry
**/
std::array<float, 8> fractions;
int zaid() { return z * 10000 + a * 10 + m; }
bool operator==(const DecayDBEntry& rhs) const
{
return (z == rhs.z && a == rhs.a && m == rhs.m);
}
}; // struct
}; // struct DecayDBEntry
class RADIX_PUBLIC DecayDb
{
public:
std::unordered_map<int, DecayDBEntry> mActivation;
std::unordered_map<int, DecayDBEntry> mActinide;
std::unordered_map<int, DecayDBEntry> mFissionProduct;
......@@ -124,7 +130,6 @@ class RADIX_PUBLIC DecayDb
public:
DecayDb();
float calculate_activity(int zaid, float abundance) const;
float calculate_activity(int zaid, float lp_abundance, float ap_abundance,
float fp_abundance) const;
std::string activation_title() const;
......@@ -133,6 +138,33 @@ class RADIX_PUBLIC DecayDb
void set_activation_title(const std::string& title);
void set_actinide_title(const std::string& title);
void set_fission_product_title(const std::string& title);
std::unordered_map<int, DecayDBEntry>& activations();
const std::unordered_map<int, DecayDBEntry>& activations() const;
const DecayDBEntry& light_element(const int zaid) const;
std::unordered_map<int, DecayDBEntry>& actinides();
const std::unordered_map<int, DecayDBEntry>& actinides() const;
const DecayDBEntry& actinide(const int zaid) const;
std::unordered_map<int, DecayDBEntry>& fissionProducts();
const std::unordered_map<int, DecayDBEntry>& fissionProducts() const;
const DecayDBEntry& fission_product(const int zaid) const;
const std::unordered_map<int, DecayDBEntry>::iterator find_decayer(
const int zaid);
}; // class
} // namespace radix
namespace std
{
template <>
struct hash<radix::DecayDBEntry>
{
std::size_t operator()(const radix::DecayDBEntry& rhs) const
{
using std::hash;
using std::size_t;
using std::string;
return rhs.z * 10000 + rhs.a * 10 + rhs.m + int(rhs.energy);
}
}; // struct hash<radix::DecayDBEntry>
} // namespace std
#endif /** RADIX_RADIXIO_DECAYDB_HH_ */
  • @jap Is it intended for the abundances in the argument for the member function:

    float DecayDb::calculate_activity(int zaid, float lp_abundance,
                                      float ap_abundance, float fp_abundance) const

    to be given in moles?

Markdown is supported
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