fisx
fisx::Material Class Reference

Class containing the composition of a material. More...

#include <fisx_material.h>

Public Member Functions

 Material ()
 
 Material (const std::string &materialName, const double &density=1.0, const double &thickness=1.0, const std::string &comment="")
 
void setName (const std::string &name)
 
void initialize (const std::string &materialName, const double &density=1.0, const double &thickness=1.0, const std::string &comment="")
 
void setComposition (const std::map< std::string, double > &)
 
void setComposition (const std::vector< std::string > &, const std::vector< double > &)
 
std::map< std::string, double > getComposition () const
 
std::string getName () const
 
std::string getComment () const
 
double getDefaultDensity ()
 
double getDefaultThickness ()
 

Detailed Description

Class containing the composition of a material.

A material is nothing else than a name and a map of elements and mass fractions.

The default density, default thickness and comment can be supplied for convenience purposes.

Constructor & Destructor Documentation

§ Material() [1/2]

fisx::Material::Material ( )

Minimalist constructor.

§ Material() [2/2]

fisx::Material::Material ( const std::string &  materialName,
const double &  density = 1.0,
const double &  thickness = 1.0,
const std::string &  comment = "" 
)

Expected constructor.

Member Function Documentation

§ getComposition()

std::map< std::string, double > fisx::Material::getComposition ( ) const

Return the material composition as normalized mass fractions

§ setComposition() [1/2]

void fisx::Material::setComposition ( const std::map< std::string, double > &  composition)

Set the composition of the material. This method normalizes the supplied amounts to make sure the sum is one.

§ setComposition() [2/2]

void fisx::Material::setComposition ( const std::vector< std::string > &  names,
const std::vector< double > &  amounts 
)

Alternative method to set the composition of the material This method normalizes the supplied amounts to make sure the sum is one.


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