-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdecay.h
More file actions
56 lines (48 loc) · 2.3 KB
/
decay.h
File metadata and controls
56 lines (48 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef DECAY_H
#define DECAY_H
#include <array>
#include <cstddef>
#include <ostream>
#include <span>
#include <string>
#include "packet.h"
namespace decay {
enum decaytypes {
DECAYTYPE_ALPHA = 0,
DECAYTYPE_ELECTRONCAPTURE = 1,
DECAYTYPE_BETAPLUS = 2,
DECAYTYPE_BETAMINUS = 3,
DECAYTYPE_NONE = 4,
DECAYTYPE_SPONTFISSION = 5,
DECAYTYPE_COUNT = 6,
};
constexpr std::array<enum decaytypes, 5> all_decaytypes{
decaytypes::DECAYTYPE_ALPHA, decaytypes::DECAYTYPE_ELECTRONCAPTURE, decaytypes::DECAYTYPE_BETAPLUS,
decaytypes::DECAYTYPE_BETAMINUS, decaytypes::DECAYTYPE_SPONTFISSION};
void init_nuclides(std::span<const int> custom_zlist, std::span<const int> custom_alist);
[[nodiscard]] auto get_nucstring_z(const std::string& strnuc) -> int;
[[nodiscard]] auto get_nucstring_a(const std::string& strnuc) -> int;
[[gnu::pure]] [[nodiscard]] auto get_num_nuclides() -> ptrdiff_t;
[[nodiscard]] auto get_elname(int z) -> std::string;
[[nodiscard]] auto get_nuc_z(int nucindex) -> int;
[[nodiscard]] auto get_nuc_a(int nucindex) -> int;
[[nodiscard]] auto get_nucindex(int z, int a) -> int;
[[nodiscard]] auto nuc_exists(int z, int a) -> bool;
[[nodiscard]] auto nucdecayenergygamma(int nucindex) -> double;
[[nodiscard]] auto nucdecayenergygamma(int z, int a) -> double;
[[nodiscard]] auto get_decay_neutrino_frac(int nucindex, int decaytype) -> double;
void set_nucdecayenergygamma(int nucindex, double value);
void update_abundances(int nonemptymgi, double t_current);
[[nodiscard]] auto get_endecay_per_ejectamass_tmodel_to_time_withexpansion(int nonemptymgi, double tstart) -> double;
[[nodiscard]] auto get_modelcell_simtime_endecay_per_mass(int nonemptymgi) -> double;
void setup_decaypath_energy_per_mass();
void free_decaypath_energy_per_mass();
[[nodiscard]] auto get_qdot_modelcell(int nonemptymgi, double t, int decaytype) -> double;
[[nodiscard]] auto get_particle_injection_rate(int nonemptymgi, double t, int decaytype) -> double;
[[nodiscard]] auto get_gamma_emission_rate(int nonemptymgi, double t) -> double;
[[nodiscard]] auto get_global_etot_tmodel_tinf() -> double;
void output_nuc_abundances(std::ostream& estimators_file, int nonemptymgi, double t_current, int element);
void setup_radioactive_pellet(double e_cmf_per_packet, int nonemptymgi, Packet& pkt);
void cleanup();
} // namespace decay
#endif // DECAY_H