Celeritas
0.5.0-86+4a8eea4
|
Manage material, element, and nuclide properties. More...
#include <MaterialParams.hh>
Classes | |
struct | ElementInput |
Define an element's input data. More... | |
struct | Input |
Input data to construct this class. More... | |
struct | IsotopeInput |
Define an element's isotope input data. More... | |
struct | MaterialInput |
Define a material's input data. More... | |
Public Types | |
Type aliases | |
using | SpanConstMaterialId = Span< MaterialId const > |
using | SpanConstElementId = Span< ElementId const > |
using | SpanConstIsotopeId = Span< IsotopeId const > |
Public Types inherited from celeritas::ParamsDataInterface< MaterialParamsData > | |
using | HostRef = HostCRef< MaterialParamsData > |
using | DeviceRef = DeviceCRef< MaterialParamsData > |
Public Member Functions | |
MaterialParams (Input const &inp) | |
Construct from a vector of material definitions. | |
MaterialId::size_type | size () const |
Number of material definitions. | |
MaterialView | get (MaterialId id) const |
Get material properties for the given material. | |
ElementView | get (ElementId id) const |
Get properties for the given element. | |
IsotopeView | get (IsotopeId id) const |
Get properties for the given isotope. | |
IsotopeComponentId::size_type | max_isotope_components () const |
Maximum number of isotopes in any one element. | |
ElementComponentId::size_type | max_element_components () const |
Maximum number of elements in any one material. | |
bool | is_missing_isotopes () const |
Whether isotopic data is present (may be false for EM-only physics) | |
HostRef const & | host_ref () const final |
Access material properties on the host. | |
DeviceRef const & | device_ref () const final |
Access material properties on the device. | |
Material metadata | |
MaterialId::size_type | num_materials () const |
Get the label of a material. | |
Label const & | id_to_label (MaterialId id) const |
Get the label of a material. | |
MaterialId | find_material (std::string const &name) const |
Locate the material ID corresponding to a label. More... | |
SpanConstMaterialId | find_materials (std::string const &name) const |
Get zero or more material IDs corresponding to a name. More... | |
Element metadata | |
ElementId::size_type | num_elements () const |
Get the label of a element. | |
Label const & | id_to_label (ElementId id) const |
Get the label of a element. | |
ElementId | find_element (std::string const &name) const |
Locate the element ID corresponding to a label. More... | |
SpanConstElementId | find_elements (std::string const &name) const |
Get zero or more element IDs corresponding to a name. | |
Isotope metadata | |
Number of distinct isotope definitions | |
IsotopeId::size_type | num_isotopes () const |
Get the label of an isotope. | |
Label const & | id_to_label (IsotopeId id) const |
Get the label of an isotope. | |
IsotopeId | find_isotope (std::string const &name) const |
Locate the isotope ID corresponding to a label. More... | |
SpanConstIsotopeId | find_isotopes (std::string const &name) const |
Get zero or more isotope IDs corresponding to a name. | |
Public Member Functions inherited from celeritas::ParamsDataInterface< MaterialParamsData > | |
MaterialParamsData< Ownership::const_reference, M > const & | ref () const |
Dispatch a "ref" call to host or device data. | |
Static Public Member Functions | |
static std::shared_ptr< MaterialParams > | from_import (ImportData const &data) |
Construct with imported data. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::ParamsDataInterface< MaterialParamsData > | |
CELER_DEFAULT_COPY_MOVE (ParamsDataInterface) | |
Manage material, element, and nuclide properties.
Materials in Celeritas currently correspond to "material cut couples" in Geant4, i.e. the outer product of geometry model-defined materials and user-defined physics regions.
ElementId celeritas::MaterialParams::find_element | ( | std::string const & | name | ) | const |
Locate the element ID corresponding to a label.
If the label isn't among the elements, a null ID will be returned.
IsotopeId celeritas::MaterialParams::find_isotope | ( | std::string const & | name | ) | const |
Locate the isotope ID corresponding to a label.
If the label isn't among the isotopes, a null ID will be returned.
MaterialId celeritas::MaterialParams::find_material | ( | std::string const & | name | ) | const |
Locate the material ID corresponding to a label.
If the label isn't among the materials, a null ID will be returned.
auto celeritas::MaterialParams::find_materials | ( | std::string const & | name | ) | const |
Get zero or more material IDs corresponding to a name.
This is useful for materials that are repeated with different uniquifying 'extensions'.