21 #ifndef PYNE_52BMSKGZ3FHG3NQI566D4I2ZLY 22 #define PYNE_52BMSKGZ3FHG3NQI566D4I2ZLY 24 #define PYNE_IS_AMALGAMATED 79 #ifndef PYNE_KMMHYNANYFF5BFMEYIP7TUNLHA 80 #define PYNE_KMMHYNANYFF5BFMEYIP7TUNLHA 92 #include <sys/types.h> 99 #define isnan(x) std::isnan(x) 102 #define isnan(x) __isnand((double)x) 106 #define isnan(x) ((x) != (x)) 109 #ifndef JSON_IS_AMALGAMATION 110 #define JSON_IS_AMALGAMATION 128 static std::string words =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
147 extern double (*
endftod)(
char * s);
194 double slope (
double x2,
double y2,
double x1,
double y1);
198 double solve_line (
double x,
double x2,
double y2,
double x1,
double y1);
200 double tanh(
double x);
201 double coth(
double x);
235 virtual const char*
what()
const throw()
238 if (!filename.empty())
241 return (
const char *) FNFstr.c_str();
252 #endif // PYNE_KMMHYNANYFF5BFMEYIP7TUNLHA 266 #if !defined(_XDRESS_EXTRA_TYPES_) 267 #define _XDRESS_EXTRA_TYPES_ 269 #if defined(__cplusplus) 270 namespace extra_types
292 T * defnew(){
return new T();};
298 T * renew(
void * ptr){
return new (ptr) T();};
302 void deall(T * ptr){
delete ptr;};
308 #elif defined(__STDC__) 336 #ifndef PYNE_MRNAFG5GNZDNPCRPX3UCBZ5MFE 337 #define PYNE_MRNAFG5GNZDNPCRPX3UCBZ5MFE 351 #ifndef PYNE_IS_AMALGAMATED 352 #include "extra_types.h" 362 virtual const char*
what()
const throw()
364 return "Index of point is out of bounds. Cannot handle in HDF5 file.";
387 virtual const char*
what()
const throw()
390 if (!filename.empty())
393 return (
const char *) FNH5str.c_str();
419 virtual const char*
what()
const throw()
423 msg +=
" not found in the file ";
425 return (
const char *) msg.c_str();
452 virtual const char*
what()
const throw()
456 msg +=
" was not found in the HDF5 file ";
458 return (
const char *) msg.c_str();
472 template <
typename T>
475 hsize_t count [1] = {1};
476 hsize_t
offset [1] = {
static_cast<hsize_t
>(n)};
478 hid_t dspace = H5Dget_space(dset);
479 hsize_t npoints = H5Sget_simple_extent_npoints(dspace);
483 offset[0] = offset[0] + npoints;
486 if (npoints <= offset[0])
489 H5Sselect_hyperslab(dspace, H5S_SELECT_SET, offset, NULL, count, NULL);
492 hsize_t dimsm[1] = {1};
493 hid_t memspace = H5Screate_simple(1, dimsm, NULL);
495 hsize_t count_out [1] = {1};
496 hsize_t offset_out [1] = {0};
498 H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL,
502 H5Dread(dset, dtype, memspace, dspace, H5P_DEFAULT, data_out);
516 template <
typename T>
519 std::set<T> cpp_set = std::set<T>();
521 hid_t dset = H5Dopen2(h5file, data_path.c_str(), H5P_DEFAULT);
524 hid_t arr_space = H5Dget_space(dset);
525 int arr_dim = H5Sget_simple_extent_dims(arr_space, arr_len, NULL);
528 T * mem_arr =
new T [arr_len[0]];
529 H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, mem_arr);
532 cpp_set.insert(&mem_arr[0], &mem_arr[arr_len[0]]);
547 template <
typename T>
549 hid_t dtype=H5T_NATIVE_DOUBLE)
551 std::vector<T> cpp_vec;
552 hsize_t arr_dims [1];
553 hid_t dset = H5Dopen2(h5file, data_path.c_str(), H5P_DEFAULT);
556 hid_t arr_space = H5Dget_space(dset);
557 int arr_ndim = H5Sget_simple_extent_dims(arr_space, arr_dims, NULL);
560 T mem_arr [arr_dims[0]];
561 H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, mem_arr);
564 cpp_vec.assign(mem_arr, mem_arr+arr_dims[0]);
577 template <
typename T>
579 hid_t dtype=H5T_NATIVE_DOUBLE)
581 hsize_t arr_dims [2];
582 hid_t dset = H5Dopen2(h5file, data_path.c_str(), H5P_DEFAULT);
585 hid_t arr_space = H5Dget_space(dset);
586 int arr_ndim = H5Sget_simple_extent_dims(arr_space, arr_dims, NULL);
591 T mem_arr [arr_dims[0] * arr_dims[1]];
592 H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, mem_arr);
595 std::vector< std::vector<T> > cpp_vec (arr_dims[0], std::vector<T>(arr_dims[1]));
596 for(
int i = 0; i < arr_dims[0]; i++)
598 cpp_vec[i].assign(mem_arr+(i*arr_dims[1]), mem_arr+((i+1)*arr_dims[1]));
612 template <
typename T>
615 hid_t dtype=H5T_NATIVE_DOUBLE)
617 hsize_t arr_dims [3];
618 hid_t dset = H5Dopen2(h5file, data_path.c_str(), H5P_DEFAULT);
621 hid_t arr_space = H5Dget_space(dset);
622 int arr_ndim = H5Sget_simple_extent_dims(arr_space, arr_dims, NULL);
627 T mem_arr [arr_dims[0] * arr_dims[1] * arr_dims[2]];
628 H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, mem_arr);
631 std::vector< std::vector< std::vector<T> > > cpp_vec (arr_dims[0], std::vector< std::vector<T> >(arr_dims[1], std::vector<T>(arr_dims[2])));
632 for(
int i = 0; i < arr_dims[0]; i++)
634 for(
int j = 0; j < arr_dims[1]; j++)
636 cpp_vec[i][j].assign(mem_arr+((i*arr_dims[1]*arr_dims[2]) + (j*arr_dims[2])), mem_arr+((i*arr_dims[1]*arr_dims[2]) + ((j+1)*arr_dims[2])));
649 template <
typename T>
667 hid_t h5_set = H5Dopen2(h5file, data_path.c_str(), H5P_DEFAULT);
668 hid_t h5_space = H5Dget_space(h5_set);
669 hid_t h5_type = H5Dget_type(h5_set);
675 shape[0] = H5Sget_simple_extent_npoints(h5_space);
676 shape[1] = H5Tget_nmembers(h5_type);
680 for(
int n = 0; n < shape[1]; n++)
681 cols_buf[n] = H5Tget_member_name(h5_type, n);
682 cols.assign(cols_buf, cols_buf+shape[1]);
686 T * col_buf =
new T [shape[0]];
689 for(
int n = 0; n < shape[1]; n++)
692 col_type = H5Tcreate(H5T_COMPOUND,
sizeof(T));
693 H5Tinsert(col_type, cols[n].c_str(), 0, dtype);
696 H5Dread(h5_set, col_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, col_buf);
699 data[cols[n]] = std::vector<T>(col_buf, col_buf+shape[0]);
709 std::map<std::string, std::vector<T> >
data;
717 return data[col_name];
721 std::map<std::string, T> operator[] (
int m)
723 std::map<std::string, T> row = std::map<std::string, T>();
725 for(
int n = 0; n < shape[1]; n++)
726 row[cols[n]] = data[cols[n]][m];
737 hid_t ct = H5Tcreate(H5T_COMPOUND,
sizeof(
xd_complex_t));
738 H5Tinsert(ct,
"r", HOFFSET(
xd_complex_t, re), H5T_NATIVE_DOUBLE);
739 H5Tinsert(ct,
"i", HOFFSET(
xd_complex_t, im), H5T_NATIVE_DOUBLE);
754 hid_t ds = H5Dopen2(h5file, path.c_str(), H5P_DEFAULT);
762 hid_t grp = H5Gopen2(h5file, path.c_str(), H5P_DEFAULT);
789 #ifndef PYNE_D35WIXV5DZAA5LLOWBY2BL2DPA 790 #define PYNE_D35WIXV5DZAA5LLOWBY2BL2DPA 799 #ifndef PYNE_IS_AMALGAMATED 843 extern name_group
LAN;
847 extern name_group
ACT;
851 extern name_group
TRU;
855 extern name_group
MA;
859 extern name_group
FP;
916 virtual const char*
what()
const throw()
927 return (
const char *) NaNEstr.c_str();
984 virtual const char*
what()
const throw()
986 std::string INFEstr (
"Indeterminate nuclide form: ");
995 return (
const char *) INFEstr.c_str();
1054 int id(
const char * nuc);
1083 int znum(
const char * nuc);
1094 int anum(
const char * nuc);
1106 int snum(
const char * nuc);
1120 int zzaaam(
const char * nuc);
1145 int zzzaaa(
const char * nuc);
1198 int mcnp(
const char * nuc);
1293 int cinder(
const char * nuc);
1342 int sza(
const char * nuc);
1391 #endif // PYNE_D35WIXV5DZAA5LLOWBY2BL2DPA 1402 #ifndef PYNE_7DOEB2PKSBEFFIA3Q2NARI3KFY 1403 #define PYNE_7DOEB2PKSBEFFIA3Q2NARI3KFY 1409 #include <exception> 1413 #ifndef PYNE_IS_AMALGAMATED 1415 #include "nucname.h" 1419 #define NUM_RX_NAMES 572 1428 extern std::set<std::string>
names;
1430 extern std::map<unsigned int, std::string>
id_name;
1432 extern std::map<std::string, unsigned int>
name_id;
1434 extern std::map<std::string, unsigned int>
altnames;
1436 extern std::map<unsigned int, unsigned int>
id_mt;
1438 extern std::map<unsigned int, unsigned int>
mt_id;
1440 extern std::map<unsigned int, std::string>
labels;
1442 extern std::map<unsigned int, std::string>
docs;
1445 extern std::map<std::pair<std::string, int>,
unsigned int>
offset_id;
1448 extern std::map<std::pair<std::string, unsigned int>,
int>
id_offset;
1455 inline int offset(
int dz,
int da,
int ds=0) {
return dz*10000000 + da*10000 + ds;}
1463 unsigned int hash(
const char * s);
1499 unsigned int id(
int x);
1500 unsigned int id(
unsigned int x);
1501 unsigned int id(
const char * x);
1503 unsigned int id(
int from_nuc,
int to_nuc,
std::string z=
"n");
1520 unsigned int mt(
int x);
1521 unsigned int mt(
unsigned int x);
1522 unsigned int mt(
char * x);
1524 unsigned int mt(
int from_nuc,
int to_nuc,
std::string z=
"n");
1670 virtual const char*
what()
const throw()
1681 return (
const char *) narxstr.c_str();
1735 virtual const char*
what()
const throw()
1737 std::string INFEstr (
"Indeterminate reaction form: ");
1746 return (
const char *) INFEstr.c_str();
1756 #endif // PYNE_7DOEB2PKSBEFFIA3Q2NARI3KFY 1808 #ifndef PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ 1809 #define PYNE_TEWK4A7VOFFLHDDXD5ZZ7KPXEQ 1816 #include <exception> 1823 #include "hdf5_hl.h" 1825 #ifndef PYNE_IS_AMALGAMATED 1827 #include "extra_types.h" 1829 #include "nucname.h" 1837 extern const double pi;
1838 extern const double N_A;
1931 double q_val(
int nuc);
1932 double q_val(
const char * nuc);
1982 double dose_ratio(
const char * nuc,
int source);
2002 extern std::map<int, double>
b_map;
2042 double b(
char * nuc);
2100 double fpyield(std::pair<int, int> from_to,
int source,
bool get_error);
2102 double fpyield(
int from_nuc,
int to_nuc,
int source,
bool get_error);
2104 double fpyield(
char * from_nuc,
char * to_nuc,
int source,
bool get_error);
2120 bool operator()(
const std::pair<int, double>& lhs,
2121 const std::pair<int, double>& rhs)
const;
2127 template<
typename T,
typename U> std::vector<T>
data_access(
double emin,
2128 double emax,
size_t valoffset, std::map<std::pair<int, double>, U> &data);
2133 double min,
double max,
size_t valoffset,
2134 std::map<std::pair<int, double>, U> &data);
2138 template<
typename T,
typename U> T
data_access(std::pair<int, int> from_to,
2139 size_t valoffset, std::map<std::pair<int, int>, U> &data);
2143 template<
typename T,
typename U> std::vector<T>
data_access(
int parent,
2144 size_t valoffset, std::map<std::pair<int, int>, U> &data);
2145 template<
typename T,
typename U> std::vector<T>
data_access(
int parent,
2146 size_t valoffset, std::map<std::pair<int, unsigned int>, U> &data);
2150 template<
typename U>
double data_access(
int parent,
2151 size_t valoffset, std::map<int, U> &data);
2190 std::vector<std::pair<double, double> >
2346 std::vector<std::pair<double, double> >
gamma_energy(
int parent);
2347 std::vector<std::pair<double, double> >
gamma_energy(
double energy,
2358 std::vector<std::pair<int, int> >
gamma_from_to(
int parent);
2360 std::vector<std::pair<int, int> >
gamma_from_to(
double energy,
double error);
2364 std::vector<int>
gamma_parent(
double energy,
double error);
2366 std::vector<int>
gamma_child(
double energy,
double error);
2371 std::vector<std::pair<double, double> >
gamma_xrays(
int parent);
2374 std::vector<std::pair<double, double> >
gammas(
int parent_state_id);
2375 std::vector<std::pair<double, double> >
alphas(
int parent_state_id);
2376 std::vector<std::pair<double, double> >
betas(
int parent_state_id);
2377 std::vector<std::pair<double, double> >
xrays(
int parent);
2398 std::vector<int>
alpha_parent(
double energy,
double error);
2400 std::vector<int>
alpha_child(
double energy,
double error);
2425 std::vector<int>
beta_parent(
double energy,
double error);
2427 std::vector<int>
beta_child(
double energy,
double error);
2463 std::vector<int>
ecbp_parent(
double energy,
double error);
2466 std::vector<int>
ecbp_child(
double energy,
double error);
2472 std::vector<std::pair<double, double> >
ecbp_xrays(
int parent);
2476 extern std::map<std::string, std::map<int, std::map<int, double> > >
2508 virtual const char*
what()
const throw() {
2509 return msg_.c_str();
2599 #ifdef PYNE_IS_AMALGAMATED 2600 #if !defined(JSON_IS_AMALGAMATION) 2601 #define JSON_IS_AMALGAMATION 2606 #ifndef JSON_FORWARD_AMALGATED_H_INCLUDED 2607 # define JSON_FORWARD_AMALGATED_H_INCLUDED 2610 #define JSON_IS_AMALGATED 2621 #ifndef JSON_CONFIG_H_INCLUDED 2622 # define JSON_CONFIG_H_INCLUDED 2644 # define JSON_USE_EXCEPTION 1 2652 # ifdef JSON_IN_CPPTL 2653 # include <cpptl/config.h> 2654 # ifndef JSON_USE_CPPTL 2655 # define JSON_USE_CPPTL 1 2659 # ifdef JSON_IN_CPPTL 2660 # define JSON_API CPPTL_API 2661 # elif defined(JSON_DLL_BUILD) 2662 # define JSON_API __declspec(dllexport) 2663 # elif defined(JSON_DLL) 2664 # define JSON_API __declspec(dllimport) 2673 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 2676 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 2677 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 2679 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 2681 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 2684 #if !defined(JSONCPP_DEPRECATED) 2685 # define JSONCPP_DEPRECATED(message) 2686 #endif // if !defined(JSONCPP_DEPRECATED) 2691 # if defined(JSON_NO_INT64) 2694 # undef JSON_HAS_INT64 2695 # else // if defined(JSON_NO_INT64) 2697 # if defined(_MSC_VER) // Microsoft Visual Studio 2698 typedef __int64
Int64;
2699 typedef unsigned __int64
UInt64;
2700 # else // if defined(_MSC_VER) // Other platforms, use long long 2703 # endif // if defined(_MSC_VER) 2706 # define JSON_HAS_INT64 2707 # endif // if defined(JSON_NO_INT64) 2711 #endif // JSON_CONFIG_H_INCLUDED 2731 #ifndef JSON_FORWARDS_H_INCLUDED 2732 # define JSON_FORWARDS_H_INCLUDED 2734 #if !defined(JSON_IS_AMALGAMATION) 2735 # include "config.h" 2736 #endif // if !defined(JSON_IS_AMALGAMATION) 2759 #ifdef JSON_VALUE_USE_INTERNAL_MAP 2760 class ValueMapAllocator;
2761 class ValueInternalLink;
2762 class ValueInternalArray;
2763 class ValueInternalMap;
2764 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 2769 #endif // JSON_FORWARDS_H_INCLUDED 2779 #endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED 2858 #ifdef PYNE_IS_AMALGAMATED 2859 #if !defined(JSON_IS_AMALGAMATION) 2860 #define JSON_IS_AMALGAMATION 2866 #ifndef JSON_AMALGATED_H_INCLUDED 2867 # define JSON_AMALGATED_H_INCLUDED 2870 #define JSON_IS_AMALGATED 2881 #ifndef JSON_CONFIG_H_INCLUDED 2882 # define JSON_CONFIG_H_INCLUDED 2904 # define JSON_USE_EXCEPTION 1 2912 # ifdef JSON_IN_CPPTL 2913 # include <cpptl/config.h> 2914 # ifndef JSON_USE_CPPTL 2915 # define JSON_USE_CPPTL 1 2919 # ifdef JSON_IN_CPPTL 2920 # define JSON_API CPPTL_API 2921 # elif defined(JSON_DLL_BUILD) 2922 # define JSON_API __declspec(dllexport) 2923 # elif defined(JSON_DLL) 2924 # define JSON_API __declspec(dllimport) 2933 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 2936 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 2937 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 2939 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 2941 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 2944 #if !defined(JSONCPP_DEPRECATED) 2945 # define JSONCPP_DEPRECATED(message) 2946 #endif // if !defined(JSONCPP_DEPRECATED) 2950 typedef unsigned int UInt;
2951 # if defined(JSON_NO_INT64) 2954 # undef JSON_HAS_INT64 2955 # else // if defined(JSON_NO_INT64) 2957 # if defined(_MSC_VER) // Microsoft Visual Studio 2958 typedef __int64
Int64;
2959 typedef unsigned __int64
UInt64;
2960 # else // if defined(_MSC_VER) // Other platforms, use long long 2961 typedef long long int Int64;
2962 typedef unsigned long long int UInt64;
2963 # endif // if defined(_MSC_VER) 2966 # define JSON_HAS_INT64 2967 # endif // if defined(JSON_NO_INT64) 2971 #endif // JSON_CONFIG_H_INCLUDED 2991 #ifndef JSON_FORWARDS_H_INCLUDED 2992 # define JSON_FORWARDS_H_INCLUDED 2994 #if !defined(JSON_IS_AMALGAMATION) 2995 # include "config.h" 2996 #endif // if !defined(JSON_IS_AMALGAMATION) 3016 class ValueIteratorBase;
3017 class ValueIterator;
3018 class ValueConstIterator;
3019 #ifdef JSON_VALUE_USE_INTERNAL_MAP 3020 class ValueMapAllocator;
3021 class ValueInternalLink;
3022 class ValueInternalArray;
3023 class ValueInternalMap;
3024 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 3029 #endif // JSON_FORWARDS_H_INCLUDED 3049 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED 3050 # define CPPTL_JSON_FEATURES_H_INCLUDED 3052 #if !defined(JSON_IS_AMALGAMATION) 3053 # include "forwards.h" 3054 #endif // if !defined(JSON_IS_AMALGAMATION) 3092 #endif // CPPTL_JSON_FEATURES_H_INCLUDED 3112 #ifndef CPPTL_JSON_H_INCLUDED 3113 # define CPPTL_JSON_H_INCLUDED 3115 #if !defined(JSON_IS_AMALGAMATION) 3116 # include "forwards.h" 3117 #endif // if !defined(JSON_IS_AMALGAMATION) 3121 # ifndef JSON_USE_CPPTL_SMALLMAP 3124 # include <cpptl/smallmap.h> 3126 # ifdef JSON_USE_CPPTL 3127 # include <cpptl/forwards.h> 3183 operator const char *()
const 3227 # ifdef JSON_VALUE_USE_INTERNAL_MAP 3228 friend class ValueInternalLink;
3229 friend class ValueInternalMap;
3237 # if defined(JSON_HAS_INT64) 3240 #endif // defined(JSON_HAS_INT64) 3268 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3269 # ifndef JSON_VALUE_USE_INTERNAL_MAP 3273 enum DuplicationPolicy
3279 CZString( ArrayIndex index );
3280 CZString(
const char *cstr, DuplicationPolicy allocate );
3281 CZString(
const CZString &other );
3283 CZString &operator =(
const CZString &other );
3284 bool operator<(
const CZString &other )
const;
3285 bool operator==(
const CZString &other )
const;
3286 ArrayIndex index()
const;
3287 const char *c_str()
const;
3288 bool isStaticString()
const;
3290 void swap( CZString &other );
3296 # ifndef JSON_USE_CPPTL_SMALLMAP 3299 typedef CppTL::SmallMap<CZString, Value> ObjectValues;
3300 # endif // ifndef JSON_USE_CPPTL_SMALLMAP 3301 # endif // ifndef JSON_VALUE_USE_INTERNAL_MAP 3302 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3322 Value( UInt value );
3323 #if defined(JSON_HAS_INT64) 3324 Value( Int64 value );
3325 Value( UInt64 value );
3326 #endif // if defined(JSON_HAS_INT64) 3327 Value(
double value );
3328 Value(
const char *value );
3329 Value(
const char *beginValue,
const char *endValue );
3342 # ifdef JSON_USE_CPPTL 3343 Value(
const CppTL::ConstString &value );
3345 Value(
bool value );
3353 void swap(
Value &other );
3358 bool operator <=(
const Value &other )
const;
3359 bool operator >=(
const Value &other )
const;
3360 bool operator >(
const Value &other )
const;
3363 bool operator !=(
const Value &other )
const;
3365 int compare(
const Value &other )
const;
3367 const char *asCString()
const;
3369 # ifdef JSON_USE_CPPTL 3370 CppTL::ConstString asConstString()
const;
3373 UInt asUInt()
const;
3374 Int64 asInt64()
const;
3375 UInt64 asUInt64()
const;
3376 LargestInt asLargestInt()
const;
3377 LargestUInt asLargestUInt()
const;
3378 float asFloat()
const;
3379 double asDouble()
const;
3380 bool asBool()
const;
3382 bool isNull()
const;
3383 bool isBool()
const;
3385 bool isUInt()
const;
3386 bool isIntegral()
const;
3387 bool isDouble()
const;
3388 bool isNumeric()
const;
3389 bool isString()
const;
3390 bool isArray()
const;
3391 bool isObject()
const;
3393 bool isConvertibleTo(
ValueType other )
const;
3396 ArrayIndex size()
const;
3403 bool operator!()
const;
3415 void resize( ArrayIndex size );
3422 Value &operator[]( ArrayIndex index );
3429 Value &operator[](
int index );
3434 const Value &operator[]( ArrayIndex index )
const;
3439 const Value &operator[](
int index )
const;
3443 Value get( ArrayIndex index,
3444 const Value &defaultValue )
const;
3446 bool isValidIndex( ArrayIndex index )
const;
3453 Value &operator[](
const char *key );
3455 const Value &operator[](
const char *key )
const;
3472 # ifdef JSON_USE_CPPTL 3474 Value &operator[](
const CppTL::ConstString &key );
3476 const Value &operator[](
const CppTL::ConstString &key )
const;
3479 Value get(
const char *key,
3480 const Value &defaultValue )
const;
3483 const Value &defaultValue )
const;
3484 # ifdef JSON_USE_CPPTL 3486 Value get(
const CppTL::ConstString &key,
3487 const Value &defaultValue )
const;
3495 Value removeMember(
const char* key );
3500 bool isMember(
const char *key )
const;
3503 # ifdef JSON_USE_CPPTL 3505 bool isMember(
const CppTL::ConstString &key )
const;
3513 Members getMemberNames()
const;
3521 void setComment(
const char *comment,
3532 const_iterator
begin()
const;
3533 const_iterator
end()
const;
3539 Value &resolveReference(
const char *key,
3542 # ifdef JSON_VALUE_USE_INTERNAL_MAP 3543 inline bool isItemAvailable()
const 3545 return itemIsUsed_ == 0;
3548 inline void setItemUsed(
bool isUsed =
true )
3550 itemIsUsed_ = isUsed ? 1 : 0;
3553 inline bool isMemberNameStatic()
const 3555 return memberNameIsStatic_ == 0;
3558 inline void setMemberNameIsStatic(
bool isStatic )
3560 memberNameIsStatic_ = isStatic ? 1 : 0;
3562 # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP 3570 void setComment(
const char *text );
3591 # ifdef JSON_VALUE_USE_INTERNAL_MAP 3592 ValueInternalArray *array_;
3593 ValueInternalMap *map_;
3600 # ifdef JSON_VALUE_USE_INTERNAL_MAP 3601 unsigned int itemIsUsed_ : 1;
3602 int memberNameIsStatic_ : 1;
3604 CommentInfo *comments_;
3653 const Value &resolve(
const Value &root )
const;
3655 const Value &defaultValue )
const;
3660 typedef std::vector<const PathArgument *> InArgs;
3661 typedef std::vector<PathArgument> Args;
3667 InArgs::const_iterator &itInArg,
3668 PathArgument::Kind kind );
3677 #ifdef JSON_VALUE_USE_INTERNAL_MAP 3725 virtual ~ValueMapAllocator();
3726 virtual ValueInternalMap *newMap() = 0;
3727 virtual ValueInternalMap *newMapCopy(
const ValueInternalMap &other ) = 0;
3728 virtual void destructMap( ValueInternalMap *map ) = 0;
3729 virtual ValueInternalLink *allocateMapBuckets(
unsigned int size ) = 0;
3730 virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
3731 virtual ValueInternalLink *allocateMapLink() = 0;
3732 virtual void releaseMapLink( ValueInternalLink *link ) = 0;
3741 enum { itemPerLink = 6 };
3742 enum InternalFlags {
3747 ValueInternalLink();
3749 ~ValueInternalLink();
3751 Value items_[itemPerLink];
3752 char *keys_[itemPerLink];
3753 ValueInternalLink *previous_;
3754 ValueInternalLink *next_;
3775 typedef unsigned int HashKey;
3776 typedef unsigned int BucketIndex;
3778 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3779 struct IteratorState
3788 ValueInternalMap *map_;
3789 ValueInternalLink *link_;
3790 BucketIndex itemIndex_;
3791 BucketIndex bucketIndex_;
3793 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3796 ValueInternalMap(
const ValueInternalMap &other );
3797 ValueInternalMap &operator =(
const ValueInternalMap &other );
3798 ~ValueInternalMap();
3800 void swap( ValueInternalMap &other );
3802 BucketIndex size()
const;
3806 bool reserveDelta( BucketIndex growth );
3808 bool reserve( BucketIndex newItemCount );
3810 const Value *find(
const char *key )
const;
3812 Value *find(
const char *key );
3814 Value &resolveReference(
const char *key,
3817 void remove(
const char *key );
3819 void doActualRemove( ValueInternalLink *link,
3821 BucketIndex bucketIndex );
3823 ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
3825 Value &setNewItem(
const char *key,
3827 ValueInternalLink *link,
3828 BucketIndex index );
3830 Value &unsafeAdd(
const char *key,
3832 HashKey hashedKey );
3834 HashKey
hash(
const char *key )
const;
3836 int compare(
const ValueInternalMap &other )
const;
3839 void makeBeginIterator( IteratorState &it )
const;
3840 void makeEndIterator( IteratorState &it )
const;
3841 static bool equals(
const IteratorState &x,
const IteratorState &other );
3842 static void increment( IteratorState &iterator );
3843 static void incrementBucket( IteratorState &iterator );
3844 static void decrement( IteratorState &iterator );
3845 static const char *key(
const IteratorState &iterator );
3846 static const char *key(
const IteratorState &iterator,
bool &isStatic );
3847 static Value &value(
const IteratorState &iterator );
3848 static int distance(
const IteratorState &x,
const IteratorState &y );
3851 ValueInternalLink *buckets_;
3852 ValueInternalLink *tailLink_;
3853 BucketIndex bucketsSize_;
3854 BucketIndex itemCount_;
3873 enum { itemsPerPage = 8 };
3875 typedef unsigned int PageIndex;
3877 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3878 struct IteratorState
3882 , currentPageIndex_(0)
3883 , currentItemIndex_(0)
3886 ValueInternalArray *array_;
3887 Value **currentPageIndex_;
3888 unsigned int currentItemIndex_;
3890 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION 3892 ValueInternalArray();
3893 ValueInternalArray(
const ValueInternalArray &other );
3894 ValueInternalArray &operator =(
const ValueInternalArray &other );
3895 ~ValueInternalArray();
3896 void swap( ValueInternalArray &other );
3899 void resize( ArrayIndex newSize );
3901 Value &resolveReference( ArrayIndex index );
3903 Value *find( ArrayIndex index )
const;
3905 ArrayIndex size()
const;
3907 int compare(
const ValueInternalArray &other )
const;
3910 static bool equals(
const IteratorState &x,
const IteratorState &other );
3911 static void increment( IteratorState &iterator );
3912 static void decrement( IteratorState &iterator );
3913 static Value &dereference(
const IteratorState &iterator );
3914 static Value &unsafeDereference(
const IteratorState &iterator );
3915 static int distance(
const IteratorState &x,
const IteratorState &y );
3916 static ArrayIndex indexOf(
const IteratorState &iterator );
3917 void makeBeginIterator( IteratorState &it )
const;
3918 void makeEndIterator( IteratorState &it )
const;
3919 void makeIterator( IteratorState &it, ArrayIndex index )
const;
3921 void makeIndexValid( ArrayIndex index );
3925 PageIndex pageCount_;
3990 virtual ~ValueArrayAllocator();
3991 virtual ValueInternalArray *newArray() = 0;
3992 virtual ValueInternalArray *newArrayCopy(
const ValueInternalArray &other ) = 0;
3993 virtual void destructArray( ValueInternalArray *array ) = 0;
4005 virtual void reallocateArrayPageIndex(
Value **&indexes,
4006 ValueInternalArray::PageIndex &indexCount,
4007 ValueInternalArray::PageIndex minNewIndexCount ) = 0;
4008 virtual void releaseArrayPageIndex(
Value **indexes,
4009 ValueInternalArray::PageIndex indexCount ) = 0;
4010 virtual Value *allocateArrayPage() = 0;
4011 virtual void releaseArrayPage(
Value *value ) = 0;
4013 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP 4027 #ifndef JSON_VALUE_USE_INTERNAL_MAP 4036 return isEqual( other );
4039 bool operator !=(
const SelfType &other )
const 4041 return !isEqual( other );
4046 return computeDistance( other );
4056 const char *memberName()
const;
4059 Value &deref()
const;
4065 difference_type computeDistance(
const SelfType &other )
const;
4067 bool isEqual(
const SelfType &other )
const;
4069 void copy(
const SelfType &other );
4072 #ifndef JSON_VALUE_USE_INTERNAL_MAP 4073 Value::ObjectValues::iterator current_;
4079 ValueInternalArray::IteratorState array_;
4080 ValueInternalMap::IteratorState map_;
4103 #ifndef JSON_VALUE_USE_INTERNAL_MAP 4114 SelfType temp( *
this );
4121 SelfType temp( *
this );
4163 #ifndef JSON_VALUE_USE_INTERNAL_MAP 4164 explicit ValueIterator(
const Value::ObjectValues::iterator ¤t );
4166 ValueIterator(
const ValueInternalArray::IteratorState &state );
4167 ValueIterator(
const ValueInternalMap::IteratorState &state );
4171 SelfType &operator =(
const SelfType &other );
4175 SelfType temp( *
this );
4182 SelfType temp( *
this );
4209 #endif // CPPTL_JSON_H_INCLUDED 4229 #ifndef CPPTL_JSON_READER_H_INCLUDED 4230 # define CPPTL_JSON_READER_H_INCLUDED 4232 #if !defined(JSON_IS_AMALGAMATION) 4233 # include "features.h" 4235 #endif // if !defined(JSON_IS_AMALGAMATION) 4239 # include <iostream> 4274 bool collectComments =
true );
4288 bool parse(
const char *beginDoc,
const char *endDoc,
4290 bool collectComments =
true );
4294 bool parse( std::istream &is,
4296 bool collectComments =
true );
4305 std::
string getFormatedErrorMessages() const;
4312 std::
string getFormattedErrorMessages() const;
4317 tokenEndOfStream = 0,
4327 tokenArraySeparator,
4328 tokenMemberSeparator,
4349 typedef std::deque<ErrorInfo> Errors;
4351 bool expectToken( TokenType type, Token &token,
const char *message );
4352 bool readToken( Token &token );
4354 bool match( Location pattern,
4355 int patternLength );
4357 bool readCStyleComment();
4358 bool readCppStyleComment();
4362 bool readObject( Token &token );
4363 bool readArray( Token &token );
4364 bool decodeNumber( Token &token );
4365 bool decodeString( Token &token );
4366 bool decodeString( Token &token,
std::string &decoded );
4367 bool decodeDouble( Token &token );
4368 bool decodeUnicodeCodePoint( Token &token,
4371 unsigned int &unicode );
4372 bool decodeUnicodeEscapeSequence( Token &token,
4375 unsigned int &unicode );
4378 Location extra = 0 );
4379 bool recoverFromError( TokenType skipUntilToken );
4380 bool addErrorAndRecover(
const std::string &message,
4382 TokenType skipUntilToken );
4383 void skipUntilSpace();
4384 Value ¤tValue();
4386 void getLocationLineAndColumn( Location location,
4388 int &column )
const;
4389 std::string getLocationLineAndColumn( Location location )
const;
4390 void addComment( Location
begin,
4393 void skipCommentTokens( Token &token );
4395 typedef std::stack<Value *> Nodes;
4402 Location lastValueEnd_;
4406 bool collectComments_;
4437 #endif // CPPTL_JSON_READER_H_INCLUDED 4457 #ifndef JSON_WRITER_H_INCLUDED 4458 # define JSON_WRITER_H_INCLUDED 4460 #if !defined(JSON_IS_AMALGAMATION) 4462 #endif // if !defined(JSON_IS_AMALGAMATION) 4465 # include <iostream> 4493 void enableYAMLCompatibility();
4499 void writeValue(
const Value &value );
4502 bool yamlCompatiblityEnabled_;
4537 void writeValue(
const Value &value );
4538 void writeArrayValue(
const Value &value );
4539 bool isMultineArray(
const Value &value );
4545 void writeCommentBeforeValue(
const Value &root );
4546 void writeCommentAfterValueOnSameLine(
const Value &root );
4547 bool hasCommentForValue(
const Value &value );
4550 typedef std::vector<std::string> ChildValues;
4552 ChildValues childValues_;
4557 bool addChildValues_;
4592 void write( std::ostream &out,
const Value &root );
4595 void writeValue(
const Value &value );
4596 void writeArrayValue(
const Value &value );
4597 bool isMultineArray(
const Value &value );
4603 void writeCommentBeforeValue(
const Value &root );
4604 void writeCommentAfterValueOnSameLine(
const Value &root );
4605 bool hasCommentForValue(
const Value &value );
4608 typedef std::vector<std::string> ChildValues;
4610 ChildValues childValues_;
4611 std::ostream* document_;
4615 bool addChildValues_;
4618 # if defined(JSON_HAS_INT64) 4621 # endif // if defined(JSON_HAS_INT64) 4636 #endif // JSON_WRITER_H_INCLUDED 4646 #endif //ifndef JSON_AMALGATED_H_INCLUDED 4680 #ifndef PYNE_46Z7LQYFI5HZNASIPCWHVX3X5E 4681 #define PYNE_46Z7LQYFI5HZNASIPCWHVX3X5E 4714 bool isMultiline(
const Value &value );
4747 #ifndef PYNE_MR34UE5INRGMZK2QYRDWICFHVM 4748 #define PYNE_MR34UE5INRGMZK2QYRDWICFHVM 4759 #if !defined(JSON_IS_AMALGAMATION) 4760 #define JSON_IS_AMALGAMATION 4763 #ifndef PYNE_IS_AMALGAMATED 4764 #include "json-forwards.h" 4768 #include "nucname.h" 4779 #ifdef PYNE_IS_AMALGAMATED 4780 namespace decayers {
4781 extern comp_map
decay(comp_map,
double);
4789 "BLCKHOLE",
"VACUUM",
"HYDROGEN",
"HELIUM",
"BERYLLIU",
"CARBON",
4790 "NITROGEN",
"OXYGEN",
"MAGNESIU",
"ALUMINUM",
"IRON",
"COPPER",
4791 "SILVER",
"SILICON",
"GOLD",
"MERCURY",
"LEAD",
"TANTALUM",
4792 "SODIUM",
"ARGON",
"CALCIUM",
"TIN",
"TUNGSTEN",
"TITANIUM",
4793 "NICKEL",
"WATER",
"POLYSTYR",
"PLASCINT",
"PMMA",
"BONECOMP",
4794 "BONECORT",
"MUSCLESK",
"MUSCLEST",
"ADTISSUE",
"KAPTON",
"POLYETHY",
"AIR" 4805 double get_comp_sum ();
4818 Material(comp_map cm,
double m=-1.0,
double d=-1.0,
double apm=-1.0,
4832 Material(
char * filename,
double m=-1.0,
double d=-1.0,
double apm=-1.0,
4860 void _load_comp_protocol0(hid_t db,
std::string datapath,
int row);
4867 void _load_comp_protocol1(hid_t db,
std::string datapath,
int row);
4874 void from_hdf5(
char * filename,
char * datapath,
int row=-1,
int protocol=1);
4882 int row=-1,
int protocol=1);
4893 void write_hdf5(
char * filename,
char * datapath,
char * nucpath,
float row=-0.0,
4905 std::string nucpath=
"/nucid",
float row=-0.0,
int chunksize=100);
4917 std::string fluka_material_component(
int fid,
int nucid,
4929 void from_text(
char * filename);
4934 void write_text(
char * filename);
4943 void from_json(
char * filename);
4947 void write_json(
char * filename);
4964 comp_map mult_by_mass();
4970 double molecular_mass(
double apm=-1.0);
4973 comp_map activity();
4977 comp_map decay_heat();
4987 comp_map dose_per_g(
std::string dose_type,
int source=0);
4993 Material collapse_elements(std::set<int> exception_znum);
4995 Material collapse_elements(
int **int_ptr_arry);
5001 double mass_density(
double num_dens=-1.0,
double apm=-1.0);
5007 double number_density(
double mass_dens=-1.0,
double apm=-1.0);
5012 Material sub_mat(std::set<int> nucset);
5015 Material sub_mat(std::set<std::string> nucset);
5020 Material set_mat(std::set<int> nucset,
double value);
5023 Material set_mat(std::set<std::string> nucset,
double value);
5027 Material del_mat(std::set<int> nucset);
5030 Material del_mat(std::set<std::string> nucset);
5033 Material sub_range(
int lower=0,
int upper=10000000);
5036 Material set_range(
int lower=0,
int upper=10000000,
double value=0.0);
5038 Material del_range(
int lower=0,
int upper=10000000);
5057 std::map<int, double> to_atom_frac();
5060 void from_atom_frac(std::map<int, double> atom_fracs);
5064 std::map<int, double> to_atom_dens();
5069 std::vector<std::pair<double, double> >
gammas();
5072 std::vector<std::pair<double, double> >
xrays();
5075 std::vector<std::pair<double, double> > photons(
bool norm);
5078 std::vector<std::pair<double, double> > normalize_radioactivity(
5079 std::vector<std::pair<double, double> > unnormed);
5112 virtual const char*
what()
const throw()
5114 return "Invalid loading protocol number; please use 0 or 1.";
5121 #endif // PYNE_MR34UE5INRGMZK2QYRDWICFHVM 5132 #ifndef PYNE_3QGDWZMLZBHDHI424JL52SQHN4 5133 #define PYNE_3QGDWZMLZBHDHI424JL52SQHN4 5135 #ifndef PYNE_IS_AMALGAMATED 5137 #include "nucname.h" 5147 namespace enrichment {
5208 #ifndef PYNE_B3ANNCKDQ5HEJLI33RPZPDNX6A 5209 #define PYNE_B3ANNCKDQ5HEJLI33RPZPDNX6A 5211 #ifndef PYNE_IS_AMALGAMATED 5212 #include "enrichment_symbolic.h" 5221 namespace enrichment {
5230 double feed_per_prod(
double x_feed,
double x_prod,
double x_tail);
5233 double feed_per_tail(
double x_feed,
double x_prod,
double x_tail);
5236 double prod_per_feed(
double x_feed,
double x_prod,
double x_tail);
5239 double prod_per_tail(
double x_feed,
double x_prod,
double x_tail);
5242 double tail_per_feed(
double x_feed,
double x_prod,
double x_tail);
5245 double tail_per_prod(
double x_feed,
double x_prod,
double x_tail);
5250 double swu_per_feed(
double x_feed,
double x_prod,
double x_tail);
5253 double swu_per_prod(
double x_feed,
double x_prod,
double x_tail);
5256 double swu_per_tail(
double x_feed,
double x_prod,
double x_tail);
5273 Cascade
solve_numeric(Cascade & orig_casc,
double tolerance=1.0E-7,
5278 void _recompute_nm(Cascade & casc,
double tolerance=1.0E-7);
5295 Cascade
_norm_comp_secant(Cascade & casc,
double tolerance=1.0E-7,
int max_iter=100);
5320 double tolerance=1.0E-7,
int max_iter=100);
5322 double tolerance=1.0E-7,
int max_iter=100);
5329 virtual const char*
what()
const throw()
5331 return "Inifinite loop found while calculating enrichment cascade.";
5340 virtual const char*
what()
const throw()
5342 return "Iteration limit hit durring enrichment calculation.";
5350 virtual const char*
what()
const throw()
5352 return "Iteration has hit a point where some values are not-a-number.";
5383 #ifndef PYNE_OU4PO4TJDBDM5PY4VKAVL7JCSM 5384 #define PYNE_OU4PO4TJDBDM5PY4VKAVL7JCSM 5388 #ifndef PYNE_IS_AMALGAMATED 5389 #include "enrichment_cascade.h" 5393 namespace enrichment {
5416 #ifdef PYNE_DECAY_IS_DUMMY 5417 #ifndef PYNE_GEUP5PGEJBFGNHGI36TRBB4WGM 5418 #define PYNE_GEUP5PGEJBFGNHGI36TRBB4WGM 5432 #ifndef PYNE_IS_AMALGAMATED 5434 #include "nucname.h" 5438 namespace decayers {
5442 std::map<int, double>
decay(std::map<int, double> comp,
double t);
5447 #endif // PYNE_GEUP5PGEJBFGNHGI36TRBB4WGM 5448 #endif // PYNE_DECAY_IS_DUMMY// 5453 #endif // PYNE_52BMSKGZ3FHG3NQI566D4I2ZLY std::map< std::string, unsigned int > altnames
Mapping between alternative names for reactions and the reaction id.
unsigned int rx_id
rx id of reaction, 0 for basic level data
std::vector< int > beta_parent(double energy, double error)
double density
density (in arbitrary units) of the Material.
double prod_per_feed(double x_feed, double x_prod, double x_tail)
Computes the product per feed mass ratio for feed, product, and tails enrichments x_feed...
struct pyne::alpha alpha
a struct matching the '/decay/alphas' table in nuc_data.h5.
name_zz_t::iterator name_zz_iter
name and Z num iter type
comp_map::iterator comp_iter
Nuclide-mass composition iter type.
std::map< std::pair< int, int >, decay > decay_data
Mapping from a pair of nuclides in id form to a struct containing data associated with the decay from...
A struct matching the dose factor table in nuc_data.h5.
std::vector< double > ec_intensity(int parent)
double to_dbl(std::string s)
Converts a valid string to a float using atof().
xd_complex_t b_incoherent
incoherent scattering length [cm]
zz_group name_to_zz_group(name_group eg)
Converts a name group to a Z number group.
std::map< std::string, std::map< int, std::map< int, double > > > simple_xs_map
map<energy, map<nuclide, map<rx, xs> > >
NotANuclide()
default constructor
std::map< unsigned int, std::string > id_name
Mapping from reaction ids to reaction names.
int to_nuc
state id of child nuclide
double k_conv_e
k conversion electron fraction
int zzzaaa(std::string nuc)
double x_prod_j
enrichment of the j-th isotope in the product stream
~NotANuclide()
default destructor
struct pyne::material_data material_data
A stuct for reprensenting fundemental data in a material.
double yield_fast_err
fast yield error [fraction]
int groundstate(const char *nuc)
std::vector< std::string > Members
struct pyne::atomic atomic
Structure for atomic data.
HomogenousTypeTable(hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
Constructor to load in data upon initialization.
std::map< int, atomic > atomic_data_map
double prob
probability K shell hole is filled by L shell [fraction]
double yield_thermal
thermal yield [fraction]
std::map< int, double > q_val_map
Mapping from nuclides in id form to their q_values and the fraction of Q that comes from gammas...
struct pyne::ndsfpysub ndsfpysub
a struct for the nds data for fpyield
name_group LAN
lanthanide name group
zz_group lan
lanthanide Z number group
double photon_intensity
photon intensity
int to_nuc
state id of child nuclide
Cascade solve_symbolic(Cascade &orig_casc)
A multicomponent enrichment cascade solver using a symbolic solution to the mass flow rate equations...
Json::Value metadata
container for arbitrary metadata, following the JSON rules.
double ext_soil_dose(int nuc, int source)
Function for External Soil Dose Factors.
std::vector< std::pair< double, double > > gamma_energy(int parent)
GroupNotFound()
default constructor
double b(int nuc)
Computes the scattering length [cm] from the coherent and incoherent components.
int nuc
nuclide in id form
int mcnp(std::string nuc)
virtual const char * what() const
Exception returns the string passed when thrown.
bool allowComments_
true if comments are allowed. Default: true.
name_t MA_array[10]
array of minor actinide names
double branch_ratio(std::pair< int, int > from_to)
Returns the branch ratio for a parent/child nuclide pair.
std::string get_flag(char line[], int max_l)
Finds and returns the first white-space delimited token of a line.
PathNotFound(std::string fname, std::string pname)
constructor with the filename and the pathname
std::vector< int > ecbp_parent(double energy, double error)
Custom exception for when an enrichment solver iteration has produced a NaN.
std::vector< std::pair< int, int > > gamma_from_to(int parent)
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...
std::string natural_naming(std::string name)
Calculates a version of the string name that is also a valid variable name.
int nuc_id
state id of nuclide
double energy
energy of alpha
Json::LargestInt LargestInt
bool operator<(const CapacityConstraint< T > &lhs, const CapacityConstraint< T > &rhs)
CapacityConstraint-CapacityConstraint comparison operator, allows usage in ordered containers...
double dose_ratio(int nuc, int source)
Dose Ratio.
double swu_per_feed(double x_feed, double x_prod, double x_tail)
Computes the swu per feed ratio for feed, product, and tails enrichments x_feed, x_prod, and x_tails.
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
const char * c_str() const
void _insert_atomic_mass_map()
function to create mapping from nuclides in id form to their atomic masses
std::string last_char(std::string s)
Returns the last character in a string.
Custom exception to be thrown in the event that a required file is not able to be found...
double total_intensity
total decay intensity
const double Bq_per_Ci
Becquerel per Curie.
double xs
scattering cross section
std::string dose_lung_model(int nuc, int source)
Lung Model.
void _load_data< gamma >()
Loads the gamma ray data from the nuc_data.h5 file into memory.
std::vector< double > beta_endpoint_energy(int parent)
complex type struct, matching PyTables definition
NotAReaction(int wasptr, std::string nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
double ext_soil_dose
nuclide ext_soil dose factor [mrem/h per Ci/m^2]
void _load_dose_map(std::map< int, dose > &dm, std::string source_path)
Loads the dose factor data from the nuc_data.h5 file into memory according to the user-input source...
std::map< std::string, std::string > get_data_checksums()
int metastable_id(int nuc, int m)
Returns the nuc_id of a metastable state.
void _load_data< ecbp >()
Loads the electron capture and beta plus decay data from the nuc_data.h5 file into memory...
name_group MA
minor actinide name group
static const LargestInt minLargestInt
Minimum signed integer value that can be stored in a Json::Value.
double ka2_x_ray_en
Ka2 X-ray energy [keV].
double ingest_dose(int nuc, int source)
Functions for Ingestion Dose Factors and Fraction of activity that is absorbed by body fluids...
int nuc
nuclide in id form
double kb_to_ka_err
error in ratio of Kb to Ka fluorescence [fraction]
std::vector< double > beta_average_energy(int parent)
std::string nist(std::string nuc)
std::vector< std::pair< double, double > > gamma_total_intensity(int parent)
double ni_shell_be
N-shell binding energy [fraction].
double l_conv_e
l conversion electron fraction
PathNotFound()
default constructor
double conv_intensity_err
conversion intensity error
Experimental and untested: represents an element of the "path" to access a node.
FileNotHDF5(std::string fname)
constructor with the filename
double coth(double x)
The hyperbolic cotangent function.
int child_nuc
stateless id of the child nucleus
int parent(std::string nuc, std::string rx, std::string z="n")
std::vector< std::pair< double, double > > betas(int parent_state_id)
std::map< int, double > atomic_mass_map
Mapping from nuclides in id form to their atomic masses.
Json::ArrayIndex ArrayIndex
std::map< int, double > natural_abund_map
Mapping from nuclides in id form to their natural abundances.
double yield_14MeV
14 MeV yield [fraction]
std::set< T > h5_array_to_cpp_set(hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
Reads in data from an HDF5 file as a C++ set.
double l_t_per_feed
Total flow rate per feed rate.
const double barns_per_cm2
barns per cm^2
std::map< int, double > atomic_mass_error_map
Mapping from nuclides in id form to the associated error in abdundance.
struct pyne::wimsdfpy wimsdfpy
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5.
int to_nuc
state id of child nuclide
double avg_energy
beta decay average energy
NotANuclide(int wasptr, int nowptr)
Constructor given previous and current state of nulide name.
double half_life_error
half life error of the decay [s]
int anum(std::string nuc)
InvalidSimpleXS(std::string msg)
Exception thrown if energy group or rxname are invalid.
Custom exception for when a group cannot be found in an HDF5 file.
Cascade default_uranium_cascade
a cascade instance with default values for a uranium enrichment.
LMatrix operator+(const LMatrix &lhs, const LMatrix &rhs)
Lightweight wrapper to tag static string.
double l_auger
Auger electrons from l shell holes [fraction].
std::map< std::pair< int, unsigned int >, level_data > level_data_rx_map
ValueConstIterator const_iterator
double yield_fast
fast yield [fraction]
double yield_thermal_err
thermal yield error [fraction]
void * _fill_maps()
A helper function to set the contents of the variables in this library.
std::string fluka(int nuc)
Custom exception for when an enrichment solver has entered an infinite loop.
double swu_per_prod
This is the SWU for 1 kg of Product material.
double avg_energy
beta decay average energy
std::string PYNE_DATA
Path to the directory containing the PyNE data.
int sza_to_id(std::string nuc)
std::vector< std::pair< double, double > > decay_photon_branch_ratios(int parent)
Structure for atomic data.
bool ternary_ge(int a, int b, int c)
Returns true if a <= b <= c and flase otherwise.
struct pyne::ecbp ecbp
A struct matching the '/decay/ecbp' table in nuc_data.h5.
double mass
mass (in arbitrary units) of the Material.
double li_shell_be_err
L-shell binding energy error [fraction].
std::vector< std::pair< double, double > > xrays(int parent)
double m_conv_e
m conversion electron fraction
Cascade solve_numeric(Cascade &orig_casc, double tolerance=1.0E-7, int max_iter=100)
Finds the total flow rate (L) over the feed flow rate (F), the number of enriching stages (N)...
HomogenousTypeTable()
default constructor
int snum(std::string nuc)
void _load_data< decay >()
Loads the decay data from the nuc_data.h5 file into memory.
NotAReaction()
default constructor
LMatrix operator-(const LMatrix &lhs, const LMatrix &rhs)
std::string to_lower(std::string s)
Returns an all lower case copy of the string.
double mass
nuclide atomic mass [amu]
std::map< int, double > b_map
Mapping from nuclides in id form to their scattering length.
void _load_q_val_map()
Loads the q_value data from the nuc_data.h5 file into memory.
~GroupNotFound()
default destructor
double gamma_frac(int nuc)
A stuct for reprensenting fundemental data in a material.
~FileNotHDF5()
default destructor
double prod_per_tail(double x_feed, double x_prod, double x_tail)
Computes the product per tails mass ratio for feed, product, and tails enrichments x_feed...
int from_nuc
state id of parent nuclide
int alara_to_id(std::string nuc)
int from_nuc
state id of parent nuclide
const double N_A
Avogadro's Number.
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
double ratio
ratio of external air dose factor to dose factor due to inhalation
std::vector< std::pair< double, double > > decay_beta_branch_ratios(int parent)
std::vector< double > ecbp_endpoint_energy(int parent)
returns a list of electron capture/ beta plus decay endpoint energies from input parent nuclide ...
std::map< std::string, unsigned int > name_id
Mapping from reaction names to reaction ids.
double Mstar
mass separation factor
NotAReaction(unsigned int wasptr, unsigned int nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
name_t FP_array[88]
array of fission product names
std::string alara(std::string nuc)
double photon_branch_ratio
photon branching ratio of this decay [fraction]
xd_complex_t b_coherent(int nuc)
Finds the coherent scattering length [cm] for a nuclide nuc.
NotAReaction(std::string wasptr, unsigned int nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
int id_to_state_id(int nuc_id)
int id_from_level(int nuc, double level)
Returns the nuc_id of an energy level.
std::map< std::pair< int, double >, alpha > alpha_data
A vector of structs containing alpha data for access in memory.
zzname_t::iterator zzname_iter
Z num to name iter type.
double dose_fluid_frac(int nuc, int source)
Fluid Fraction.
a struct matching the '/neutron/wimsd_fission_product' table in nuc_data.h5.
name_t LAN_array[15]
array of lanthanide names
Configuration passed to reader and writer.
std::map< unsigned int, unsigned int > mt_id
Mapping from MT numbers to reaction names.
struct pyne::scattering_lengths scattering_lengths
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5.
void _load_atomic_mass_map_memory()
main function to be called when you whish to load the nuclide data into memory
static std::string alphabet
uppercase alphabetical characters
A class representing a high-level table contruct whose columns all have the same type T in C/C++ (and...
double branch_ratio_error
branching ratio of this decay [fraction]
a comment placed on the line before a value
double beta_branch_ratio_error
beta branching ratio error of this decay [fraction]
zzname_t zz_fluka
nucid to fluka-name map
static std::string fluka_mat_strings[]
Custom exception for when a path is not found in an HDF5 file.
double energy
energy of the photon [keV]
a struct matching the '/decay/betas' table in nuc_data.h5.
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
bool contains_substring(std::string s, std::string substr)
Returns true if substr is in s.
double l_shell_fluor_error
L-shell fluorescence error [fraction].
pyne::Material mat_prod
product material
std::vector< int > gamma_parent(double energy, double error)
double conv_intensity
conversion intensity
double l_x_ray_en
L X-ray energy [keV].
double ni_shell_be_err
N-shell binding energy error [fraction].
zzname_t get_zz_fluka()
Creates standard nucid to fluka-name mapping.
double level
level energy [keV]
std::vector< int > beta_child(double energy, double error)
std::vector< std::pair< int, int > > gamma_parent_child(double energy, double error)
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
bool toggle_warnings()
Toggles warnings on and off.
int fluka_to_id(char *name)
std::vector< int > ecbp_child(double energy, double error)
double endftod_f(char *s)
Converts a string from ENDF format to a float.
void _recompute_nm(Cascade &casc, double tolerance=1.0E-7)
So,ves for valid stage numbers N &nd M of a casc.
std::map< name_t, zz_t > name_zz_t
name and Z num map type
double branch_ratio
branch ratio [fraction]
int zzzaaa_to_id(std::string nuc)
NotAReaction(unsigned int wasptr, std::string nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
std::string NUC_DATA_PATH
Path to the nuc_data.h5 file.
a struct matching the q_value table in nuc_data.h5.
int from_nuc
from nuclide in id form
double density
material density
~PathNotFound()
default destructor
double feed_per_prod(double x_feed, double x_prod, double x_tail)
Computes the feed per product mass ratio for feed, product, and tails enrichments x_feed...
std::map< std::pair< int, double >, beta > beta_data
A vector of structs containing beta data for access in memory.
double ec_intensity
intensity of electron capture
Outputs a Value in JSON format without formatting (not human friendly).
int child
state id of decay child
#define NUM_RX_NAMES
Number of reactions supported by default.
~NotAReaction()
default destructor
double yield_fast
fast yield [fraction]
a struct matching the '/decay/alphas' table in nuc_data.h5.
void _recompute_prod_tail_mats(Cascade &casc)
This function takes a given initial guess number of enriching and stripping stages for a given compos...
int mcnp_to_id(std::string nuc)
virtual const char * what() const
Generates an informational message for the exception.
double alphastar_i(double alpha, double Mstar, double M_i)
Computes the nuclide-specific stage separation factor from the overall stage separation factor alpha...
std::map< zz_t, name_t > zzname_t
Z num to name map type.
const double Ci_per_Bq
Curies per Becquerel.
double branch_ratio
branching ratio of this decay [fraction]
Cascade _fill_default_uranium_cascade()
Greates a cascade instance with default values for a uranium enrichment.
int state_id_to_id(int state)
double l_conv_e
l conversion electron fraction
zz_group act
actinide Z number group
std::map< std::pair< std::string, int >, unsigned int > offset_id
Mapping from particle type and offset pairs to reaction ids.
double k_shell_be_err
K-shell binding energy error [fraction].
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
double inhale_dose
nuclide dose factor due to inhalation [mrem/pCi]
std::map< int, dose > genii_dose_map
std::map< int, double > comp_map
Nuclide-mass composition map type.
std::string valueToString(LargestInt value)
double yield_fast_err
fast yield error [fraction]
double ingest_dose
nuclide dose factor due to ingestion [mrem/pCi]
void _load_scattering_lengths()
Loads the scattering length data from the nuc_data.h5 file into memory.
std::string serpent(std::string nuc)
void _load_data< atomic >()
double gamma_frac
fraction of q that comes from gammas
int cinder(std::string nuc)
double k_shell_fluor_error
K-shell fluorescence error [fraction].
std::string to_str(int t)
Cascade multicomponent(Cascade &orig_casc, std::string solver="symbolic", double tolerance=1.0E-7, int max_iter=100)
struct pyne::dose dose
A struct matching the dose factor table in nuc_data.h5.
a struct matching the '/decay/decays' table in nuc_data.h5.
std::string doc(std::string from_nuc, std::string to_nuc, std::string z="n")
std::map< CZString, Value > ObjectValues
~HomogenousTypeTable()
default destructor
int nist_to_id(std::string nuc)
double state_energy(int nuc)
Returns the excitation energy [MeV] of a nuc in a given state.
struct pyne::ndsfpy ndsfpy
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5
double m_conv_e
m conversion electron fraction
std::string label(std::string from_nuc, std::string to_nuc, std::string z="n")
double yield_14MeV
14 MeV yield [fraction]
std::map< std::pair< std::string, unsigned int >, int > id_offset
Mapping from particle type and reaction ids to offsets.
virtual const char * what() const
helpful error message that includes the filename
static const Int64 minInt64
Minimum signed 64 bits int value that can be stored in a Json::Value.
std::string name_t
name type
double inhale_dose(int nuc, int source)
Functions for Inhalation Dose Factors and Lung Model used to obtain dose factors. ...
double endftod_cpp(char *s)
Converts a string from ENDF format to a float.
a struct matching the '/decay/level_list' table in nuc_data.h5.
void _load_ndsfpy()
Loads the NDS fission product yield data from the nuc_data.h5 file into memory.
Abstract class for writers.
A struct matching the '/decay/ecbp' table in nuc_data.h5.
char special
special high-spin state [character]
std::string slice_from_end(std::string s, int n=-1, int l=1)
Returns the slice of a string s using the negative index n and the length of the slice l...
int to_nuc
state id of final level
double fluid_frac
fraction of activity abosorbed in body fluids
std::vector< std::pair< double, double > > ecbp_xrays(int parent)
double photon_branch_ratio_error
photon branching ratio error of this decay [fraction]
int from_nuc
state id of starting level
ValueConstIterator SelfType
std::vector< std::pair< double, double > > gamma_photon_intensity(int parent)
std::vector< T > h5_array_to_cpp_vector_1d(hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
Reads in data from an HDF5 file as a 1 dimiensional vector.
virtual const char * what() const
helpful error message that includes the filename and the groupname
double k_shell_be
K-shell binding energy [fraction].
double natural_abund(int nuc)
Returns the natural abundance of a nuclide nuc.
double mi_shell_be_err
M-shell binding energy error [fraction].
struct pyne::q_val_data q_val_data
a struct matching the q_value table in nuc_data.h5.
std::vector< std::pair< double, double > > calculate_xray_data(int z, double k_conv, double l_conv)
double ext_air_dose(int nuc, int source)
Returns the dose factors of a nuclide.
std::vector< std::pair< double, double > > gamma_conversion_intensity(int parent)
std::map< std::string, std::vector< T > > data
mapping from column names to column data
name_group ACT
actinide name group
comp_map comp
composition, maps nuclides in id form to normalized mass weights.
virtual const char * what() const
helpful error message that includes the filename and the pathname
object value (collection of name/value pairs).
std::pair< double, double > decay_photon_branch_ratio(std::pair< int, int >)
Json::LargestUInt LargestUInt
double k_shell_fluor
K-shell fluorescence [fraction].
name_group FP
fission product name group
NotANuclide(std::string wasptr, std::string nowptr)
Constructor given previous and current state of nulide name.
name_t TRU_array[22]
array of transuranic names
Custom exception for declaring a simple_xs request invalid.
std::map< std::pair< int, double >, ecbp > ecbp_data
A vector of structs containing ecbp data for access in memory.
std::vector< std::vector< T > > h5_array_to_cpp_vector_2d(hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
Reads in data from an HDF5 file as a 2 dimiensional vector.
double ext_air_dose
nuclide ext_air dose factor [mrem/h per Ci/m^3]
xd_complex_t b_incoherent(int nuc)
Finds the incoherent scattering length [cm] for a nuclide nuc.
int to_int(std::string s)
Converts a string of digits to an int using atoi().
name_zz_t fluka_zz
fluka-name to nucid map
double intensity
beta intensity
NotAReaction(std::string wasptr, std::string nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
double alpha
stage separation factor
double l_shell_fluor
L-shell fluorescence [fraction].
ValueType
Type of the value held by a Value object.
struct pyne::decay decay
a struct matching the '/decay/decays' table in nuc_data.h5.
double _deltaU_i_OverG(Cascade &casc, int i)
Solves for a stage separative power relevant to the ith component per unit of flow G...
std::map< int, xd_complex_t > b_coherent_map
Mapping from nuclides in id form to their coherent scattering length.
std::vector< std::string > cols
column names
struct pyne::gamma gamma
a struct matching the '/decay/gammas' table in nuc_data.h5.
double q_val(int nuc)
Returns the q_value of a nuclide nuc.
std::string to_upper(std::string s)
switches endftod to fast cpp version
int to_nuc
from nuclide in id form
zz_group fp
fission product Z number group
const double MeV_per_MJ
MeV per MJ.
struct pyne::level_data level_data
a struct matching the '/decay/level_list' table in nuc_data.h5.
a struct matching the '/decay/gammas' table in nuc_data.h5.
def indent(text, prefix, predicate=None)
JSON (JavaScript Object Notation).
ValueIteratorBase SelfType
double abund
natural abundance of nuclide [atom fraction]
a comment just after a value on the same line
#define JSON_API
If defined, indicates that the source file is amalgated to prevent private header inclusion...
void _load_atomic_mass_map()
Loads the atomic mass and natural abundance data from the nuc_data.h5 file into memory.
NotANuclide(int wasptr, std::string nowptr)
Constructor given previous and current state of nulide name.
double intensity
intensity of alpha decay
LMatrix operator*(const LMatrix &lhs, const LMatrix &rhs)
int nuc
nuclide in id form
std::istream & operator>>(std::istream &sin, Value &root)
Read from 'sin' into 'root'.
std::string path
path in file to the data
zz_group::iterator zz_group_iter
Z number grouping iter.
FileNotFound()
default constructor
base class for Value iterators.
double k_auger
Auger electrons from k shell holes [fraction].
double endpoint_energy
beta decay endpoint energy
double tail_per_feed(double x_feed, double x_prod, double x_tail)
Computes the tails per feed mass ratio for feed, product, and tails enrichments x_feed, x_prod, and x_tails.
int j
Component to enrich (U-235), id form.
std::vector< int > alpha_child(double energy, double error)
std::map< std::pair< int, double >, level_data > level_data_lvl_map
Mapping from nuclides in id form to a struct containing data associated with that level...
int zzllaaam_to_id(std::string nuc)
Custom exception for invalid HDF5 protocol numbers.
std::vector< std::pair< double, double > > gamma_xrays(int parent)
std::vector< double > beta_intensity(int parent)
virtual const char * what() const
Returns a helpful error message containing prior and current reaction state.
double slope(double x2, double y2, double x1, double y1)
Finds the slope of a line from the points (x1, y1) and (x2, y2).
double N
number of enriching stages
std::vector< T > data_access(double emin, double emax, size_t valoffset, std::map< std::pair< int, double >, U > &data)
Access data in a std::map<std::pair<int, double> for a range of values of the second member of the pa...
name_group TRU
transuranic name group
Custom exception for HDF5 indexing errors.
std::string name(std::string from_nuc, std::string to_nuc, std::string z="n")
void _load_data< beta >()
Loads the beta decay data from the nuc_data.h5 file into memory.
static std::string words
string of all valid word characters for variable names in programing languages.
double yield_14MeV_err
14 MeV yield error [fraction]
int zzaaam(std::string nuc)
double atoms_per_mol
material atoms per mole
std::vector< double > ecbp_average_energy(int parent)
zz_group ma
minor actinide Z number group
unsigned int id(std::string from_nuc, std::string to_nuc, std::string z="n")
int ensdf_to_id(std::string nuc)
name_zz_t name_zz
name to Z num map
std::map< std::pair< int, int >, ndsfpysub > ndsfpy_data
double swu_per_tail(double x_feed, double x_prod, double x_tail)
Computes the swu per tails ratio for feed, product, and tails enrichments x_feed, x_prod...
double q_val
nuclide q_value [MeV/fission]
double ka1_x_ray_en_err
Ka1 X-ray energy error [keV].
double yield_14MeV_err
14 MeV yield error [fraction]
std::map< unsigned int, std::string > labels
Mapping from reaction ids to labels (short descriptions).
double xs_coherent
coherent scattering cross section
double M
number of stripping stages
double endpoint_energy
beta decay endpoint energy
std::vector< double > decay_branch_ratios(int parent)
double kb_to_ka
ratio of Kb to Ka fluorescence [fraction]
std::set< std::string > names
Set of reaction names, must be valid variable names.
std::set< int > decay_children(int nuc)
Returns a set of decay children of a nuc.
a comment on the line after a value (only make sense for root value)
const double cm2_per_barn
cm^2 per barn
name_zz_t get_fluka_zz()
Creates standard fluka-name to nucid mapping.
struct pyne::beta beta
a struct matching the '/decay/betas' table in nuc_data.h5.
zzname_t get_zz_name()
Creates standard Z number to name mapping.
double swu_per_prod(double x_feed, double x_prod, double x_tail)
Computes the swu per product ratio for feed, product, and tails enrichments x_feed, x_prod, and x_tails.
void _load_data< alpha >()
Loads the alpha decay data from the nuc_data.h5 file into memory.
static std::string digits
string of digit characters
std::ostream & operator<<(std::ostream &os, Material mat)
Converts a Material to a string stream representation for canonical writing.
a struct matching the atomic_mass table in nuc_data.h5.
Writes a Value in JSON format with custom formatting.
struct pyne::atomic_mass_data atomic_mass_data
a struct matching the atomic_mass table in nuc_data.h5.
double yields
fission product yield, fraction [unitless]
std::vector< int > gamma_child(double energy, double error)
Custom exception for when an existing file is not in a valid HDF5 format.
std::string valueToQuotedString(const char *value)
std::vector< double > bp_intensity(int parent)
name_group::iterator name_group_iter
name grouping iter type
std::map< unsigned int, unsigned int > id_mt
Mapping from reaction ids to MT numbers.
a struct matching the '/neutron/nds_fission_product' table in nuc_data.h5
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
std::string capitalize(std::string s)
Returns a capitalized copy of the string.
static hid_t PYTABLES_COMPLEX128
The HDF5 id for a complex data type compatible with PyTables generated data.
bool operator==(const CapacityConstraint< T > &lhs, const CapacityConstraint< T > &rhs)
CapacityConstraint-CapacityConstraint equality operator.
double energy_err
energy error of the photon [keV]
std::map< unsigned int, std::string > docs
Mapping from reaction ids to documentation strings (long descriptions).
double xs_incoherent
incoherent scattering cross section
int from_nuc
state id of parent nuclide
double value_func(double x)
Computes the value or separation potential of an assay x.
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
int parent
state id of decay parent
std::map< std::string, std::string > data_checksums
Mapping from nodes in nuc_data.h5 to hashes of nodes.
std::vector< double > alpha_energy(int parent)
void _insert_abund_map()
function to create mapping from nuclides in id form to their natural abundances
std::vector< std::pair< double, double > > gammas(int parent_state_id)
Returns a list of energies and intensities normalized to branching ratios.
Custom exception for when an enrichment solver has reached its maximum number of iterations.
double photon_intensity_err
photon intensity error
void warning(std::string s)
Prints a warning message.
double yield_thermal_err
thermal yield error [fraction]
double tail_per_prod(double x_feed, double x_prod, double x_tail)
Computes the tails per product mass ratio for feed, product, and tails enrichments x_feed...
FileNotFound(std::string fname)
constructor with the filename fname.
zz_group tru
transuranic Z number group
double total_intensity_err
total decay intensity error
const double pi
pi = 3.14159265359
std::pair< double, double > decay_beta_branch_ratio(std::pair< int, int >)
const double MeV_per_K
MeV per Kelvin.
int child(std::string nuc, std::string rx, std::string z="n")
std::map< std::pair< int, double >, gamma > gamma_data
unsigned int mt(std::string from_nuc, std::string to_nuc, std::string z="n")
double ka1_x_ray_en
Ka1 X-ray energy [keV].
std::vector< std::vector< std::vector< T > > > h5_array_to_cpp_vector_3d(hid_t h5file, std::string data_path, hid_t dtype=H5T_NATIVE_DOUBLE)
Reads in data from an HDF5 file as a 3 dimiensional vector.
StaticString(const char *czstring)
double half_life(int nuc)
Returns the half life for a nuclide nuc.
#define JSONCPP_DEPRECATED(message)
std::vector< std::pair< double, double > > alphas(int parent_state_id)
name_t ACT_array[15]
array of actinide names
Unserialize a JSON document into a Value.
int z
number of protons [int]
std::map< int, int > state_id_map
int from_nuc
id of fissioning nuclide
unsigned long long int UInt64
double decay_const(int nuc)
Returns the decay constant for a nuclide nuc.
int znum(std::string nuc)
std::set< zz_t > zz_group
Z number grouping type (for testing containment)
double yield_thermal
thermal yield [fraction]
The 'pyne' namespace all PyNE functionality is included in.
double fpyield(std::pair< int, int > from_to, int source, bool get_error)
Returns the fission product yield for a parent/child nuclide pair.
std::string _names[NUM_RX_NAMES]
Raw array of reaction names.
NotAReaction(int wasptr, int nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
double beta_plus_intensity
intensity of beta plus decay
int parent_nuc
state id of the primary decaying nucleus
std::map< int, xd_complex_t > b_incoherent_map
Mapping from nuclides in id form to their incoherent scattering length.
void _load_wimsdfpy()
Loads the WIMSD fission product yield data from the nuc_data.h5 file into memory. ...
double simple_xs(int nuc, int rx, std::string energy)
returns the microscopic cross section in barns for the specified nuclide, reaction, and energy group.
Wrapper for standard HDF5 operations.
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
std::vector< std::pair< double, double > > decay_half_lifes(int)
std::vector< int > decay_data_children(int parent)
virtual const char * what() const
Creates a helpful error message.
const double sec_per_day
seconds per day
name_zz_t get_name_zz()
Creates standard name to Z number mapping.
std::string replace_all_substrings(std::string s, std::string substr, std::string repstr)
Replaces all instance of substr in s with repstr.
FileNotHDF5()
default constructor
A set of physical parameters used to specify an enrichment cascade.
a struct matching the '/neutron/scattering_lengths' table in nuc_data.h5.
~FileNotFound()
default destructor
hid_t _get_PYTABLES_COMPLEX128()
Create an HDF5 data type for complex 128 bit data, which happens to match the complex data type that ...
Iterator for object and array value.
enable_if< has_const_iterator< T >::value, typename T::const_iterator >::type end(const T &c)
int serpent_to_id(std::string nuc)
std::map< int, dose > epa_dose_map
Mapping from int to dose for 3 sources.
double feed_per_tail(double x_feed, double x_prod, double x_tail)
Computes the feed per tails mass ratio for feed, product, and tails enrichments x_feed, x_prod, and x_tails.
double atomic_mass(int nuc)
Returns the atomic mass of a nuclide nuc.
bool file_exists(std::string strfilename)
Returns true if the file can be found.
void pyne_start()
Initializes PyNE based on environment.
zzname_t zz_name
Z num to name map.
double mi_shell_be
M-shell binding energy [fraction].
void _load_data< level_data >()
Writes a Value in JSON format in a human friendly way.
double(* endftod)(char *s)
endftod function pointer. defaults to fortran
Material composed of nuclides.
Experimental and untested: represents a "path" to access a node.
std::string remove_characters(std::string s, std::string chars)
Removes all characters in the string chars from s.
int nuc
nuclide in id form
double k_conv_e
k conversion electron fraction
unsigned int decay
rx id of decay
NotAReaction(std::string wasptr, int nowptr)
Constructor using original reaction (wasptr) and the eventual state that PyNE calculated (nowptr)...
double half_life
half life of the decay [s]
Custom exception for declaring a value not to be a valid reaction.
double ka2_to_ka1
Ka2 to Ka1 fluorescence ratio [fraction].
int zzaaam_to_id(std::string nuc)
Custom expection for declaring that a value does not follow a recognizable nuclide naming convention...
bool strictRoot_
true if root must be either an array or an object value. Default: false.
double solve_line(double x, double x2, double y2, double x1, double y1)
Solves the equation for the line y = mx + b, given x and the points that form the line: (x1...
std::string zzllaaam(std::string nuc)
int to_nuc
id of fission product
const iterator for object and array value.
int offset(int dz, int da, int ds=0)
A helper function to compute nuclide id offsets from z-, a-, and s- deltas.
a struct for the nds data for fpyield
double error
error in atomic mass [amu]
double ka2_x_ray_en_err
Ka2 X-ray energy error [keV].
double swu_per_feed
This is the SWU for 1 kg of Feed material.
double atoms_per_molecule
The number of atoms per molecule.
std::pair< double, double > decay_branch_ratio(std::pair< int, int >)
T get_array_index(hid_t dset, int n, hid_t dtype=H5T_NATIVE_DOUBLE)
Retrieves the nth index out of the dataset dset (which has an HDF5 datatype dtype).
double tanh(double x)
The hyperbolic tangent function.
std::vector< int > alpha_parent(double energy, double error)
int metastable
metastable level [int]
enable_if< has_const_iterator< T >::value, typename T::const_iterator >::type begin(const T &c)
double kb_x_ray_en
Kb X-ray energy [keV].
double x_tail_j
enrichment of the j-th isotope in the tails stream
GroupNotFound(std::string fname, std::string gname)
constructor with the filename and the groupname
std::map< std::pair< int, int >, double > wimsdfpy_data
Mapping from nuclides in id form to their scattering length.
void * _
A dummy variable used when calling _fill_maps().
double ka2_to_ka1_err
Ka2 to Ka1 fluorescence error [fraction].
pyne::Material mat_feed
feed material
std::set< name_t > name_group
name grouping type (for testing containment)
double x_feed_j
enrichment of the j-th isotope in the feed stream
std::pair< double, double > decay_half_life(std::pair< int, int >)
std::map< int, double > gamma_frac_map
unsigned int hash(const char *s)
NotANuclide(std::string wasptr, int nowptr)
Constructor given previous and current state of nulide name.
std::vector< double > alpha_intensity(int parent)
xd_complex_t b_coherent
coherent scattering length [cm]
int k
Component to de-enrich, or strip (U-238), id form.
char lung_mod
model of lung used (time of biological half life– D, W, or Y)
pyne::Material mat_tail
tails material
double beta_branch_ratio
beta branching ratio of this decay [fraction]
std::map< int, dose > doe_dose_map
double half_life
half life [seconds]
bool path_exists(hid_t h5file, std::string path)
Determines if a path exists in an hdf5 file.
std::string remove_substring(std::string s, std::string substr)
Creates a copy of s with all instances of substr taken out.
array value (ordered list)
double li_shell_be
L-shell binding energy [fraction].
int cinder_to_id(std::string nuc)
Cascade _norm_comp_secant(Cascade &casc, double tolerance=1.0E-7, int max_iter=100)
This function solves the whole system of equations.