Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
celeritas::MaterialParams Class Referencefinal

Manage material, element, and nuclide properties. More...

#include <MaterialParams.hh>

Inheritance diagram for celeritas::MaterialParams:
Inheritance graph
[legend]

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 consthost_ref () const final
 Access material properties on the host.
 
DeviceRef constdevice_ref () const final
 Access material properties on the device.
 
Material metadata
MaterialId::size_type num_materials () const
 Number of materials.
 
Label constid_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.
 
SpanConstMaterialId find_materials (std::string const &name) const
 Get zero or more material IDs corresponding to a name.
 
Element metadata
ElementId::size_type num_elements () const
 Number of distinct elements definitions.
 
Label constid_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.
 
SpanConstElementId find_elements (std::string const &name) const
 Get zero or more element IDs corresponding to a name.
 
Isotope metadata
IsotopeId::size_type num_isotopes () const
 Number of distinct isotope definitions.
 
Label constid_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.
 
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
 
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< MaterialParamsfrom_import (ImportData const &data)
 Construct with imported data.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ParamsDataInterface< MaterialParamsData >
 CELER_DEFAULT_COPY_MOVE (ParamsDataInterface)
 

Detailed Description

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.

Todo:

Replace id_to_label etc. with direct access to LabelIdMultiMap

Split into isotope/element/geo material

Member Function Documentation

◆ device_ref()

DeviceRef const & celeritas::MaterialParams::device_ref ( ) const
inlinefinalvirtual

Access material properties on the device.

Implements celeritas::ParamsDataInterface< MaterialParamsData >.

◆ find_element()

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.

◆ find_isotope()

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.

◆ find_material()

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.

◆ find_materials()

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'.

◆ host_ref()

HostRef const & celeritas::MaterialParams::host_ref ( ) const
inlinefinalvirtual

Access material properties on the host.

Implements celeritas::ParamsDataInterface< MaterialParamsData >.


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