23 #ifndef REACTION_LIB_H 24 #define REACTION_LIB_H 35 #include <o2scl/err_hnd.h> 36 #include <o2scl/string_conv.h> 37 #include <o2scl/nucleus.h> 38 #include <o2scl/nucmass.h> 40 #ifndef DOXYGEN_NO_O2NS 79 std::ostringstream outs;
83 for(
size_t i=0;i<6;i++) {
84 if (name[i].length()>0 && A[i]>0) {
85 if (Z[i]==0 && A[i]==1) outs <<
"n ";
86 else if (Z[i]==1 && A[i]==1) outs <<
"p ";
87 else if (Z[i]==1 && A[i]==2) outs <<
"d ";
88 else if (Z[i]==1 && A[i]==3) outs <<
"t ";
89 else outs << nmi.
Ztoel(Z[i]) << A[i] <<
" ";
90 if (i==0 && (chap==1 || chap==2 || chap==3 || chap==11)) {
92 }
else if (i==1 && (chap==4 || chap==5 || chap==6 || chap==7)) {
94 }
else if (i==2 && (chap==8 || chap==9)) {
96 }
else if (i==3 && chap==10) {
98 }
else if (i<5 && name[i+1].length()>0 && A[i+1]>0) {
115 for(
size_t i=0;i<6;i++) {
134 for(
size_t i=0;i<6;i++) {
148 if (
this==&nr)
return *
this;
155 for(
size_t i=0;i<6;i++) {
172 double T913=cbrt(T9);
173 ret=exp(a[0]+a[1]/T9+a[2]/T913+a[3]*T913+a[4]*T9+
174 a[5]*T9*T913*T913)*pow(T9,a[6]);
215 std::vector<nuclear_reaction>
lib;
222 int read_file_reaclib2(std::string fname);
231 int find_in_chap(std::vector<nuclear_reaction> &nrl,
232 size_t chap, std::string nuc1, std::string nuc2=
"",
233 std::string nuc3=
"", std::string nuc4=
"",
234 std::string nuc5=
"", std::string nuc6=
"");
240 int fN[6], fZ[6], fA[6];
245 bool matches(
size_t ul,
size_t ri);
249 #ifndef DOXYGEN_NO_O2NS
int clear()
Clear the rate.
A simple nuclear reaction specification.
std::string Ztoel(size_t Z)
Return the element name abbreviation given Z.
std::string name[6]
Names of the participating nuclei.
size_t A[6]
Mass number of participating nuclei.
Nuclear mass information.
std::string ref
Reference.
nuclear_reaction & operator=(const nuclear_reaction &nr)
Copy constructor.
size_t Z[6]
Proton number of participating nuclei.
std::string to_string()
Convert the reaction to a string for screen output.
char type
Type of rate (resonant/non-resonant/weak)
size_t isomer[6]
Isomer designation of participating nuclei.
std::vector< nuclear_reaction > lib
The library.
char rev
Forward or reverse.
double rate(double T9)
Compute the reaction rate from the temperature in units of .
nuclear_reaction(const nuclear_reaction &nr)
Copy constructor.