CYCLUS
Loading...
Searching...
No Matches
mat_query.h
Go to the documentation of this file.
1#ifndef CYCLUS_SRC_TOOLKIT_MAT_QUERY_H_
2#define CYCLUS_SRC_TOOLKIT_MAT_QUERY_H_
3
4#include "comp_math.h"
5#include "cyc_limits.h"
6#include "material.h"
7
8namespace cyclus {
9namespace toolkit {
10
11/// A class that provides convenience methods for querying a material's properties.
12class MatQuery {
13 public:
14 /// Creates a new query object inspecting m.
16
17 /// Returns the mass in kg of the material.
18 double qty();
19
20 /// Returns the mass in kg of nuclide nuc in the material.
21 double mass(Nuc nuc);
22
23 /// Returns the mass in kg of nuclide nuc in the material.
24 double mass(std::string nuc);
25
26 /// Returns the number of moles of nuclide nuc in the material.
27 double moles(Nuc nuc);
28
29 /// Returns the number of moles of nuclide nuc in the material.
30 double moles(std::string nuc);
31
32 /// Returns the mass fraction of nuclide nuc in the material.
33 double mass_frac(Nuc nuc);
34
35 /// Returns the mass fraction of nuclide nuc in the material.
36 double mass_frac(std::string nuc);
37
38 /// Returns the combined mass fraction of the set of nuclides
39 /// nuc in the material.
40 double mass_frac(std::set<Nuc> nucs);
41
42 /// returns the atom/mole fraction of nuclide nuc in the material.
43 double atom_frac(Nuc nuc);
44
45 /// returns the atom/mole fraction of nuclide nuc in the material.
46 double atom_frac(std::string nuc);
47
48 /// Returns the combined atom/mole fraction of the set of nuclides
49 /// nuc in the material.
50 double atom_frac(std::set<Nuc> nucs);
51
52 /// Returns true if all nuclide fractions of the material and other
53 /// are the same within threshold.
55
56 /// Returns the maximum mass quantity of composition c that can be extracted
57 /// from the material.
59
60 private:
62};
63
64} // namespace toolkit
65} // namespace cyclus
66
67#endif // CYCLUS_SRC_TOOLKIT_MAT_QUERY_H_
boost::shared_ptr< Composition > Ptr
Definition composition.h:43
boost::shared_ptr< Material > Ptr
Definition material.h:75
A class that provides convenience methods for querying a material's properties.
Definition mat_query.h:12
MatQuery(Material::Ptr m)
Creates a new query object inspecting m.
Definition mat_query.cc:9
double atom_frac(Nuc nuc)
returns the atom/mole fraction of nuclide nuc in the material.
Definition mat_query.cc:38
bool AlmostEq(Material::Ptr other, double threshold=eps_rsrc())
Returns true if all nuclide fractions of the material and other are the same within threshold.
Definition mat_query.cc:74
double qty()
Returns the mass in kg of the material.
Definition mat_query.cc:11
double mass_frac(Nuc nuc)
Returns the mass fraction of nuclide nuc in the material.
Definition mat_query.cc:23
double mass(Nuc nuc)
Returns the mass in kg of nuclide nuc in the material.
Definition mat_query.cc:15
double moles(Nuc nuc)
Returns the number of moles of nuclide nuc in the material.
Definition mat_query.cc:19
double Amount(Composition::Ptr c)
Returns the maximum mass quantity of composition c that can be extracted from the material.
Definition mat_query.cc:82
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14
double eps_rsrc()
an epsilon value to be used by resources
Definition cyc_limits.h:19
int Nuc
Definition composition.h:14
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters