Celeritas 0.6.0-129+develop.846910afa
Loading...
Searching...
No Matches
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 SPConstCoreGeo = std::shared_ptr< CoreGeoParams const >
 
using SPConstMaterial = std::shared_ptr< MaterialParams const >
 
using SPConstVolume = std::shared_ptr< VolumeParams const >
 
- Public Types inherited from celeritas::ParamsDataInterface< GeoMaterialParamsData >
using HostRef = HostCRef< GeoMaterialParamsData >
 
using DeviceRef = DeviceCRef< GeoMaterialParamsData >
 

Public Member Functions

 GeoMaterialParams (Input const &)
 Construct from geometry and material params.
 
HostRef consthost_ref () const final
 Access material properties on the host.
 
DeviceRef constdevice_ref () const final
 Access material properties on the device.
 
ImplVolumeId::size_type num_volumes () const
 Get the total number of volumes.
 
PhysMatId material_id (ImplVolumeId v) const
 Get the material ID corresponding to a volume ID.
 
- Public Member Functions inherited from celeritas::ParamsDataInterface< GeoMaterialParamsData >
GeoMaterialParamsData< Ownership::const_reference, M > const & ref () const
 
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, SPConstCoreGeo geo_params, SPConstVolume vol_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 foreseeable future this class should just be a vector of PhysicsMaterialIds, 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.

Todo:
This class's functionality should be split between VolumeParams (for mapping volume IDs to GeoMatId) and the physics (for determining the PhysMatId from the geometry/material/region state).

Constructor & Destructor Documentation

◆ GeoMaterialParams()

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

Construct from geometry and material params.

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

Member Function Documentation

◆ device_ref()

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

Access material properties on the device.

Implements celeritas::ParamsDataInterface< GeoMaterialParamsData >.

◆ from_import()

std::shared_ptr< GeoMaterialParams > celeritas::GeoMaterialParams::from_import ( ImportData const data,
SPConstCoreGeo  geo_params,
SPConstVolume  vol_params,
SPConstMaterial  material_params 
)
static

Construct with imported data.

Note that the import volume index (see GeantImporter.cc) corresponds to the canonical VolumeId .

◆ host_ref()

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

Access material properties on the host.

Implements celeritas::ParamsDataInterface< GeoMaterialParamsData >.

◆ material_id()

PhysMatId celeritas::GeoMaterialParams::material_id ( ImplVolumeId  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: