CYCLUS
Loading...
Searching...
No Matches
cyclus::toolkit::MatQuery Class Reference

Detailed Description

A class that provides convenience methods for querying a material's properties.

Definition at line 12 of file mat_query.h.

#include <mat_query.h>

Public Member Functions

bool AlmostEq (Material::Ptr other, double threshold=eps_rsrc())
 
double Amount (Composition::Ptr c)
 
double atom_frac (Nuc nuc)
 
double atom_frac (std::set< Nuc > nucs)
 
double atom_frac (std::string nuc)
 
double mass (Nuc nuc)
 
double mass (std::string nuc)
 
double mass_frac (Nuc nuc)
 
double mass_frac (std::set< Nuc > nucs)
 
double mass_frac (std::string nuc)
 
 MatQuery (Material::Ptr m)
 
double moles (Nuc nuc)
 
double moles (std::string nuc)
 
double qty ()
 

Constructor & Destructor Documentation

◆ MatQuery()

cyclus::toolkit::MatQuery::MatQuery ( Material::Ptr m)

Creates a new query object inspecting m.

Definition at line 9 of file mat_query.cc.

Member Function Documentation

◆ AlmostEq()

bool cyclus::toolkit::MatQuery::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 at line 74 of file mat_query.cc.

◆ Amount()

double cyclus::toolkit::MatQuery::Amount ( Composition::Ptr c)

Returns the maximum mass quantity of composition c that can be extracted from the material.

Definition at line 82 of file mat_query.cc.

◆ atom_frac() [1/3]

double cyclus::toolkit::MatQuery::atom_frac ( Nuc nuc)

returns the atom/mole fraction of nuclide nuc in the material.

Definition at line 38 of file mat_query.cc.

◆ atom_frac() [2/3]

double cyclus::toolkit::MatQuery::atom_frac ( std::set< Nuc > nucs)

Returns the combined atom/mole fraction of the set of nuclides nuc in the material.

Definition at line 44 of file mat_query.cc.

◆ atom_frac() [3/3]

double cyclus::toolkit::MatQuery::atom_frac ( std::string nuc)

returns the atom/mole fraction of nuclide nuc in the material.

Definition at line 70 of file mat_query.cc.

◆ mass() [1/2]

double cyclus::toolkit::MatQuery::mass ( Nuc nuc)

Returns the mass in kg of nuclide nuc in the material.

Definition at line 15 of file mat_query.cc.

◆ mass() [2/2]

double cyclus::toolkit::MatQuery::mass ( std::string nuc)

Returns the mass in kg of nuclide nuc in the material.

Definition at line 58 of file mat_query.cc.

◆ mass_frac() [1/3]

double cyclus::toolkit::MatQuery::mass_frac ( Nuc nuc)

Returns the mass fraction of nuclide nuc in the material.

Definition at line 23 of file mat_query.cc.

◆ mass_frac() [2/3]

double cyclus::toolkit::MatQuery::mass_frac ( std::set< Nuc > nucs)

Returns the combined mass fraction of the set of nuclides nuc in the material.

Definition at line 29 of file mat_query.cc.

◆ mass_frac() [3/3]

double cyclus::toolkit::MatQuery::mass_frac ( std::string nuc)

Returns the mass fraction of nuclide nuc in the material.

Definition at line 66 of file mat_query.cc.

◆ moles() [1/2]

double cyclus::toolkit::MatQuery::moles ( Nuc nuc)

Returns the number of moles of nuclide nuc in the material.

Definition at line 19 of file mat_query.cc.

◆ moles() [2/2]

double cyclus::toolkit::MatQuery::moles ( std::string nuc)

Returns the number of moles of nuclide nuc in the material.

Definition at line 62 of file mat_query.cc.

◆ qty()

double cyclus::toolkit::MatQuery::qty ( )

Returns the mass in kg of the material.

Definition at line 11 of file mat_query.cc.


The documentation for this class was generated from the following files: