MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MaterialProperties Class Reference

Class which represents the properties of a material. More...

#include <material_properties.h>

Collaboration diagram for MaterialProperties:

Public Member Functions

 MaterialProperties (std::string name, DataAccessObject &dao)
 Constructor for the MaterialProperties class.
 
std::string getName () const
 Returns the name of the material.
 
int getMaterialId () const
 Returns the ID of the material.
 
double getMassDensity () const
 Returns the mass density of the material.
 
double getNumberDensity () const
 Returns the number density of the material.
 
double getAtomicWeight () const
 Returns the atomic weight of the material.
 
std::unordered_map< int, double > getElementalComposition () const
 Returns the fractional elemental composition of the material.
 
std::unordered_map< int, double > getElementalMassDensity () const
 Returns the mass density of the elements in the material.
 
std::unordered_map< int, double > getElementalNumberDensity () const
 Returns the number density of the elements in the material.
 
std::unordered_map< int, double > getElementalAtomicWeight () const
 Returns the atomic weight of the elements in the material.
 
std::unordered_map< int, double > getElementalMassNumber () const
 Returns the mass number of the elements in the material.
 

Private Member Functions

void initializeProperties ()
 
void setMaterialId ()
 
void setElementalComposition ()
 
void initializeMaterialProperties ()
 
void setElementalDataForTableAndColumn (const std::string &table_name, const std::string &column_name, std::unordered_map< int, double > &map)
 
void setMassDensity ()
 
void setNumberDensity ()
 
void setAtomicWeight ()
 

Private Attributes

std::string name_
 
DataAccessObjectdao_
 
int material_id_
 
double mass_density_
 
double number_density_
 
double atomic_weight_
 
std::unordered_map< int, double > elemental_composition_
 
std::unordered_map< int, double > elemental_mass_density_
 
std::unordered_map< int, double > elemental_number_density_
 
std::unordered_map< int, double > elemental_atomic_weight_
 
std::unordered_map< int, double > elemental_mass_number_
 

Detailed Description

Class which represents the properties of a material.

This class contains the properties of a material obtained and calculated from the SQLite database.

Definition at line 15 of file material_properties.h.

Constructor & Destructor Documentation

◆ MaterialProperties()

MaterialProperties::MaterialProperties ( std::string name,
DataAccessObject & dao )

Constructor for the MaterialProperties class.

Parameters
nameThe name of the material.
daoThe DataAccessObject to use to query the database.

Member Function Documentation

◆ getAtomicWeight()

double MaterialProperties::getAtomicWeight ( ) const
inline

Returns the atomic weight of the material.

Returns
The atomic weight of the material.

Definition at line 58 of file material_properties.h.

◆ getElementalAtomicWeight()

std::unordered_map< int, double > MaterialProperties::getElementalAtomicWeight ( ) const
inline

Returns the atomic weight of the elements in the material.

Returns
The atomic weight of the elements in the material as a map of element ID to atomic weight.

Definition at line 86 of file material_properties.h.

◆ getElementalComposition()

std::unordered_map< int, double > MaterialProperties::getElementalComposition ( ) const
inline

Returns the fractional elemental composition of the material.

Returns
The elemental composition of the material as a map of element ID to fractional composition.

Definition at line 65 of file material_properties.h.

◆ getElementalMassDensity()

std::unordered_map< int, double > MaterialProperties::getElementalMassDensity ( ) const
inline

Returns the mass density of the elements in the material.

Returns
The mass density of the elements in the material as a map of element ID to mass density.

Definition at line 72 of file material_properties.h.

◆ getElementalMassNumber()

std::unordered_map< int, double > MaterialProperties::getElementalMassNumber ( ) const
inline

Returns the mass number of the elements in the material.

Returns
The mass number of the elements in the material as a map of element ID to mass number.

Definition at line 93 of file material_properties.h.

◆ getElementalNumberDensity()

std::unordered_map< int, double > MaterialProperties::getElementalNumberDensity ( ) const
inline

Returns the number density of the elements in the material.

Returns
The number density of the elements in the material as a map of element ID to number density.

Definition at line 79 of file material_properties.h.

◆ getMassDensity()

double MaterialProperties::getMassDensity ( ) const
inline

Returns the mass density of the material.

Returns
The mass density of the material.

Definition at line 44 of file material_properties.h.

◆ getMaterialId()

int MaterialProperties::getMaterialId ( ) const
inline

Returns the ID of the material.

Returns
The ID of the material.

Definition at line 37 of file material_properties.h.

◆ getName()

std::string MaterialProperties::getName ( ) const
inline

Returns the name of the material.

Returns
The name of the material.

Definition at line 30 of file material_properties.h.

◆ getNumberDensity()

double MaterialProperties::getNumberDensity ( ) const
inline

Returns the number density of the material.

Returns
The number density of the material.

Definition at line 51 of file material_properties.h.

Member Data Documentation

◆ atomic_weight_

double MaterialProperties::atomic_weight_
private

Definition at line 100 of file material_properties.h.

◆ dao_

DataAccessObject& MaterialProperties::dao_
private

Definition at line 96 of file material_properties.h.

◆ elemental_atomic_weight_

std::unordered_map<int, double> MaterialProperties::elemental_atomic_weight_
private

Definition at line 104 of file material_properties.h.

◆ elemental_composition_

std::unordered_map<int, double> MaterialProperties::elemental_composition_
private

Definition at line 101 of file material_properties.h.

◆ elemental_mass_density_

std::unordered_map<int, double> MaterialProperties::elemental_mass_density_
private

Definition at line 102 of file material_properties.h.

◆ elemental_mass_number_

std::unordered_map<int, double> MaterialProperties::elemental_mass_number_
private

Definition at line 105 of file material_properties.h.

◆ elemental_number_density_

std::unordered_map<int, double> MaterialProperties::elemental_number_density_
private

Definition at line 103 of file material_properties.h.

◆ mass_density_

double MaterialProperties::mass_density_
private

Definition at line 98 of file material_properties.h.

◆ material_id_

int MaterialProperties::material_id_
private

Definition at line 97 of file material_properties.h.

◆ name_

std::string MaterialProperties::name_
private

Definition at line 95 of file material_properties.h.

◆ number_density_

double MaterialProperties::number_density_
private

Definition at line 99 of file material_properties.h.


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