BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Data Fields | Private Member Functions
GMAD::Material Struct Reference

Material class. More...

#include <material.h>

Inheritance diagram for GMAD::Material:
Inheritance graph
Collaboration diagram for GMAD::Material:
Collaboration graph

Public Member Functions

 Material ()
 constructor More...
 
void clear ()
 reset More...
 
void print () const
 printout More...
 
template<typename T >
void set_value (const std::string &property, T value)
 set methods by property name and value More...
 
void set_value (const std::string &property, Array *value)
 Set method for lists. More...
 
- Public Member Functions inherited from GMAD::Published< Material >
bool NameExists (const std::string &name) const
 
Published< Material >::template AttributeMap< T > & attribute_map () const
 

Data Fields

std::string name
 name More...
 
double A
 g*mol^-1 More...
 
double Z
 
double density
 g*cm-3 More...
 
double temper
 Kelvin. More...
 
double pressure
 atm More...
 
std::string state
 "solid", "liquid", or "gas" More...
 
std::list< std::string > components
 
std::list< double > componentsFractions
 
std::list< int > componentsWeights
 

Private Member Functions

void PublishMembers ()
 publish members so these can be looked up from parser More...
 

Additional Inherited Members

- Protected Types inherited from GMAD::Published< Material >
using AttributeMap = typename std::unordered_map< std::string, T C::* >
 Define AttributeMap of string and class member pointer. More...
 
- Protected Member Functions inherited from GMAD::Published< Material >
void publish (const std::string &name, T C::*mp)
 Make pointer to member from class C and type T with accessible with a name. More...
 
void set (Material *instance, const Material *instance2, const std::string &name)
 Set member with name of class instance to value of second instance. More...
 
AttributeMap< T > & attribute_map () const
 Access method to static map for type T and class C.
 
get (const Material *instance, const std::string &name) const
 Get method for class C. More...
 
void set (Material *instance, const std::string &name, double value)
 
void set (Material *instance, const std::string &name, GMAD::Array *const &value)
 
void set (Material *instance, const std::string &name, const T &value)
 

Detailed Description

Material class.

Author
Jochem Snuverink

Definition at line 39 of file material.h.

Constructor & Destructor Documentation

◆ Material()

Material::Material ( )

constructor

Definition at line 25 of file material.cc.

References clear(), and PublishMembers().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Material::clear ( )

reset

Definition at line 31 of file material.cc.

References A, density, pressure, state, and temper.

Referenced by Material().

Here is the caller graph for this function:

◆ print()

void Material::print ( ) const

printout

Definition at line 59 of file material.cc.

References A, density, name, pressure, state, and temper.

◆ PublishMembers()

void Material::PublishMembers ( )
private

publish members so these can be looked up from parser

Definition at line 45 of file material.cc.

References A, density, name, pressure, GMAD::Published< Material >::publish(), state, and temper.

Referenced by Material().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_value() [1/2]

void Material::set_value ( const std::string &  property,
Array value 
)

Set method for lists.

Definition at line 77 of file material.cc.

References GMAD::Array::set_vector().

Here is the call graph for this function:

◆ set_value() [2/2]

template<typename T >
void GMAD::Material::set_value ( const std::string &  property,
value 
)

set methods by property name and value

Definition at line 72 of file material.h.

References GMAD::Published< Material >::set().

Here is the call graph for this function:

Field Documentation

◆ A

double GMAD::Material::A

g*mol^-1

Definition at line 43 of file material.h.

Referenced by clear(), print(), and PublishMembers().

◆ components

std::list<std::string> GMAD::Material::components

Definition at line 49 of file material.h.

◆ componentsFractions

std::list<double> GMAD::Material::componentsFractions

Definition at line 50 of file material.h.

◆ componentsWeights

std::list<int> GMAD::Material::componentsWeights

Definition at line 51 of file material.h.

◆ density

double GMAD::Material::density

g*cm-3

Definition at line 45 of file material.h.

Referenced by clear(), print(), and PublishMembers().

◆ name

std::string GMAD::Material::name

name

Definition at line 41 of file material.h.

Referenced by print(), and PublishMembers().

◆ pressure

double GMAD::Material::pressure

atm

Definition at line 47 of file material.h.

Referenced by clear(), print(), and PublishMembers().

◆ state

std::string GMAD::Material::state

"solid", "liquid", or "gas"

Definition at line 48 of file material.h.

Referenced by clear(), print(), and PublishMembers().

◆ temper

double GMAD::Material::temper

Kelvin.

Definition at line 46 of file material.h.

Referenced by clear(), print(), and PublishMembers().

◆ Z

double GMAD::Material::Z

Definition at line 44 of file material.h.


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