-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcpp_material.pxd
More file actions
122 lines (102 loc) · 4.55 KB
/
cpp_material.pxd
File metadata and controls
122 lines (102 loc) · 4.55 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
"""C++ wrapper for material class."""
from libcpp.set cimport set
from libcpp.string cimport string as std_string
from libcpp.set cimport set as std_set
from libcpp.map cimport map
from libcpp.vector cimport vector
from libcpp.utility cimport pair
from libcpp cimport bool
cimport cpp_jsoncpp
cdef extern from "material.h" namespace "pyne":
# Cython does not allow for typdef'ing tamplated types :(
#ctypedef map[int, double] comp_map
#ctypedef map[int, double].iterator comp_iter
cdef cppclass Material:
# Constuctors
Material()
Material(map[int, double]) except +
Material(map[int, double], double) except +
Material(map[int, double], double, double) except +
Material(map[int, double], double, double, double) except +
Material(map[int, double], double, double, double, cpp_jsoncpp.Value) except +
Material(char *) except +
Material(char *, double) except +
Material(char *, double, double) except +
Material(char *, double, double, double) except +
Material(char *, double, double, double, cpp_jsoncpp.Value) except +
# Attributes
map[int, double] comp
double mass
double density
double atoms_per_molecule
cpp_jsoncpp.Value metadata
# Methods
void norm_comp() except +
std_string openmc(std_string, int) except +
std_string mcnp(std_string) except +
std_string mcnp(std_string, bool) except +
std_string get_uwuw_name() except +
std_string phits(std_string) except +
std_string phits(std_string, bool) except +
std_string fluka(int, std_string) except +
bool not_fluka_builtin(std_string) except +
std_string fluka_material_str(int) except +
std_string fluka_material_component(int, int, std_string) except +
std_string fluka_material_line(int, double, int, std_string) except +
std_string fluka_format_field(float) except +
std_string fluka_compound_str(int, std_string) except +
void from_hdf5(char *, char *) except +
void from_hdf5(char *, char *, int) except +
void from_hdf5(char *, char *, int, int) except +
void deprecated_write_hdf5(char *, char *, char *, float, int) except +
void write_hdf5(char *, char *, float, int) except +
void from_text(char *) except +
void write_text(char *) except +
void load_json(cpp_jsoncpp.Value) except +
cpp_jsoncpp.Value dump_json() except +
void from_json(char *) except +
void write_json(char *) except +
void normalize() except +
map[int, double] mult_by_mass() except +
map[int, double] activity() except +
map[int, double] decay_heat() except +
map[int, double] dose_per_g(std_string, int) except +
double molecular_mass() except +
double molecular_mass(double) except +
Material expand_elements(std_set[int]) except +
Material collapse_elements(std_set[int]) except +
double mass_density() except +
double mass_density(double) except +
double mass_density(double, double) except +
double number_density() except +
double number_density(double) except +
double number_density(double, double) except +
# Substream Methods
Material sub_mat(set[int]) except +
Material set_mat(set[int], double) except +
Material del_mat(set[int]) except +
Material sub_range(int, int) except +
Material set_range(int, int, double) except +
Material del_range(int, int) except +
Material sub_elem(int) except +
Material sub_lan() except +
Material sub_act() except +
Material sub_tru() except +
Material sub_ma() except +
Material sub_fp() except +
# Atom frac member functions
map[int, double] to_atom_frac() except +
void from_atom_frac(map[int, double]) except +
map[int, double] to_atom_dens() except +
vector[pair[double, double]] gammas() except +
vector[pair[double, double]] xrays() except +
vector[pair[double, double]] photons(bool) except +
void from_activity(map[int, double]) except +
Material decay(double) except +
Material cram(vector[double]) except +
Material cram(vector[double], int) except +
# Operator Overloads
Material operator+(double) except +
Material operator+(Material) except +
Material operator*(double) except +
Material operator/(double) except +