Celeritas  0.5.0-86+4a8eea4
Classes | Public Member Functions | Static Public Member Functions | List of all members
celeritas::GeoMaterialParams Class Referencefinal

Map a track's geometry state to a material ID. More...

#include <GeoMaterialParams.hh>

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

Classes

struct  Input
 Input parameters. More...
 

Public Types

Type aliases
using SPConstGeo = std::shared_ptr< GeoParams const >
 
using SPConstMaterial = std::shared_ptr< MaterialParams const >
 
- Public Types inherited from celeritas::ParamsDataInterface< GeoMaterialParamsData >
using HostRef = HostCRef< GeoMaterialParamsData >
 
using DeviceRef = DeviceCRef< GeoMaterialParamsData >
 

Public Member Functions

 GeoMaterialParams (Input)
 Construct from geometry and material params. More...
 
HostRef const & host_ref () const final
 Access material properties on the host.
 
DeviceRef const & device_ref () const final
 Access material properties on the device.
 
VolumeId::size_type num_volumes () const
 Get the total number of volumes.
 
MaterialId material_id (VolumeId v) const
 Get the material ID corresponding to a volume ID. More...
 
- Public Member Functions inherited from celeritas::ParamsDataInterface< GeoMaterialParamsData >
GeoMaterialParamsData< Ownership::const_reference, M > const & ref () const
 Dispatch a "ref" call to host or device data.
 

Static Public Member Functions

static std::shared_ptr< GeoMaterialParamsfrom_import (ImportData const &data, SPConstGeo geo_params, SPConstMaterial material_params)
 Construct with imported data.
 

Additional Inherited Members

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

Detailed Description

Map a track's geometry state to a material ID.

For the forseeable future this class should just be a vector of MaterialIds, one per volume.

The constructor takes an array of material IDs for every volume. Missing material IDs may be allowed if they correspond to unreachable volume IDs. If the list of volume_names strings is provided, it must be the same size as volume_to_mat and indicate a mapping for the geometry's volume IDs. Otherwise, the array is required to have exactly one entry per volume ID.

Warnings are emitted if materials are unavailable for any volumes, unless the corresponding volume name is empty (corresponding perhaps to a "parallel world" or otherwise unused volume) or is enclosed with braces (used for virtual volumes such as [EXTERIOR] or temporary boolean/reflected volumes.

Constructor & Destructor Documentation

◆ GeoMaterialParams()

celeritas::GeoMaterialParams::GeoMaterialParams ( Input  input)
explicit

Construct from geometry and material params.

Missing material IDs may be allowed if they correspond to unreachable volume IDs.

Member Function Documentation

◆ material_id()

MaterialId celeritas::GeoMaterialParams::material_id ( VolumeId  v) const
inline

Get the material ID corresponding to a volume ID.

Some "virtual" volumes may have a null ID.


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