Go to the documentation of this file.
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] <<
" ";
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;
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
char type
Type of rate (resonant/non-resonant/weak)
double rate(double T9)
Compute the reaction rate from the temperature in units of .
int read_file_reaclib2(std::string fname)
Read from a file in the REACLIB2 format.
Nuclear mass information.
int clear()
Clear the rate.
std::vector< nuclear_reaction > lib
The library.
bool matches(size_t ul, size_t ri)
Test if entry ul in the arrays matches the library reaction.
nuclear_reaction & operator=(const nuclear_reaction &nr)
Copy constructor.
std::string name[6]
Names of the participating nuclei.
char rev
Forward or reverse.
A simple nuclear reaction specification.
std::string ref
Reference.
size_t isomer[6]
Isomer designation of participating nuclei.
size_t A[6]
Mass number of participating nuclei.
int find_in_chap(std::vector< nuclear_reaction > &nrl, size_t chap, std::string nuc1, std::string nuc2="", std::string nuc3="", std::string nuc4="", std::string nuc5="", std::string nuc6="")
Find a set of nuclear reactions in a specified chapter.
size_t Z[6]
Proton number of participating nuclei.
nuclear_reaction(const nuclear_reaction &nr)
Copy constructor.
std::string to_string()
Convert the reaction to a string for screen output.
std::string Ztoel(size_t Z)
Return the element name abbreviation given Z.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).