8 #ifndef PYNE_MR34UE5INRGMZK2QYRDWICFHVM 9 #define PYNE_MR34UE5INRGMZK2QYRDWICFHVM 20 #if !defined(JSON_IS_AMALGAMATION) 21 #define JSON_IS_AMALGAMATION 24 #ifndef PYNE_IS_AMALGAMATED 25 #include "json-forwards.h" 40 #ifdef PYNE_IS_AMALGAMATED 42 extern comp_map
decay(comp_map,
double);
49 static std::string fluka_mat_strings[] = {
50 "BLCKHOLE",
"VACUUM",
"HYDROGEN",
"HELIUM",
"BERYLLIU",
"CARBON",
51 "NITROGEN",
"OXYGEN",
"MAGNESIU",
"ALUMINUM",
"IRON",
"COPPER",
52 "SILVER",
"SILICON",
"GOLD",
"MERCURY",
"LEAD",
"TANTALUM",
53 "SODIUM",
"ARGON",
"CALCIUM",
"TIN",
"TUNGSTEN",
"TITANIUM",
54 "NICKEL",
"WATER",
"POLYSTYR",
"PLASCINT",
"PMMA",
"BONECOMP",
55 "BONECORT",
"MUSCLESK",
"MUSCLEST",
"ADTISSUE",
"KAPTON",
"POLYETHY",
"AIR" 58 static int FLUKA_MAT_NUM = 37;
66 double get_comp_sum ();
72 Material(comp_map cm,
double m=-1.0,
double d=-1.0,
double apm=-1.0,
93 Material(
char * filename,
double m=-1.0,
double d=-1.0,
double apm=-1.0,
107 Material(std::string filename,
double m=-1.0,
double d=-1.0,
double apm=-1.0,
121 void _load_comp_protocol0(hid_t db, std::string datapath,
int row);
128 void _load_comp_protocol1(hid_t db, std::string datapath,
int row);
135 void from_hdf5(
char * filename,
char * datapath,
int row=-1,
int protocol=1);
142 void from_hdf5(std::string filename, std::string datapath=
"/material",
143 int row=-1,
int protocol=1);
154 void write_hdf5(
char * filename,
char * datapath,
char * nucpath,
float row=-0.0,
165 void write_hdf5(std::string filename, std::string datapath=
"/material",
166 std::string nucpath=
"/nucid",
float row=-0.0,
int chunksize=100);
169 std::string mcnp(std::string frac_type =
"mass");
172 std::string fluka(
int id, std::string frac_type =
"mass");
174 bool not_fluka_builtin(std::string fluka_name);
176 std::string fluka_material_str(
int id);
178 std::string fluka_material_component(
int fid,
int nucid,
179 std::string fluka_name);
181 std::string fluka_material_line(
int znum,
double atomic_mass,
182 int fid, std::string fluka_name);
184 std::string fluka_format_field(
float field);
187 std::string fluka_compound_str(
int id, std::string frac_type =
"mass");
190 void from_text(
char * filename);
192 void from_text(std::string filename);
195 void write_text(
char * filename);
197 void write_text(std::string filename);
200 void load_json(Json::Value);
202 Json::Value dump_json();
204 void from_json(
char * filename);
206 void from_json(std::string filname);
208 void write_json(
char * filename);
210 void write_json(std::string filename);
218 Json::Value metadata;
223 comp_map mult_by_mass();
231 double molecular_mass(
double apm=-1.0);
238 comp_map decay_heat();
248 comp_map dose_per_g(std::string dose_type,
int source=0);
254 Material collapse_elements(std::set<int> exception_znum);
256 Material collapse_elements(
int **int_ptr_arry);
262 double mass_density(
double num_dens=-1.0,
double apm=-1.0);
268 double number_density(
double mass_dens=-1.0,
double apm=-1.0);
273 Material sub_mat(std::set<int> nucset);
276 Material sub_mat(std::set<std::string> nucset);
281 Material set_mat(std::set<int> nucset,
double value);
284 Material set_mat(std::set<std::string> nucset,
double value);
288 Material del_mat(std::set<int> nucset);
291 Material del_mat(std::set<std::string> nucset);
294 Material sub_range(
int lower=0,
int upper=10000000);
297 Material set_range(
int lower=0,
int upper=10000000,
double value=0.0);
299 Material del_range(
int lower=0,
int upper=10000000);
318 std::map<int, double> to_atom_frac();
321 void from_atom_frac(std::map<int, double> atom_fracs);
325 std::map<int, double> to_atom_dens();
330 std::vector<std::pair<double, double> >
gammas();
333 std::vector<std::pair<double, double> > xrays();
336 std::vector<std::pair<double, double> > photons(
bool norm);
339 std::vector<std::pair<double, double> > normalize_radioactivity(
340 std::vector<std::pair<double, double> > unnormed);
373 virtual const char* what()
const throw()
375 return "Invalid loading protocol number; please use 0 or 1.";
382 #endif // PYNE_MR34UE5INRGMZK2QYRDWICFHVM comp_map::iterator comp_iter
Nuclide-mass composition iter type.
Definition: material.h:38
struct pyne::material_data material_data
comp_map comp
composition, maps nuclides in id form to normalized mass weights.
Definition: material.h:214
Material composed of nuclides.
Definition: material.h:61
double density
density (in arbitrary units) of the Material.
Definition: material.h:216
object value (collection of name/value pairs).
Definition: json.h:358
Implements basic nuclear data functions.
Definition: material.h:362
double density
material density
Definition: material.h:364
std::map< int, double > comp_map
Nuclide-mass composition map type.
Definition: material.h:37
double atoms_per_molecule
Definition: material.h:217
double mass
material mass
Definition: material.h:363
struct pyne::decay decay
a struct matching the '/decay/decays' table in nuc_data.h5.
Provides some HDF5 helper functionality in its own namespace.
double atoms_per_mol
material atoms per mole
Definition: material.h:365
std::ostream & operator<<(std::ostream &os, Material mat)
Definition: material.cpp:1053
std::vector< std::pair< double, double > > gammas(int parent_state_id)
Returns a list of energies and intensities normalized to branching ratios.
Definition: data.cpp:2358
Custom exception for invalid HDF5 protocol numbers.
Definition: material.h:370
A container representing enrichment cascades.
Definition: _atomic_data.h:7
double atomic_mass(int nuc)
Returns the atomic mass of a nuclide nuc.
Definition: data.cpp:95
double mass
mass (in arbitrary units) of the Material.
Definition: material.h:215